void **filter_conf;
/** the number of filters that should be activated for this audio format */
unsigned int num_writers;
- /** pointer to the array of writers to be activated */
- struct writer **writers;
+ /** Array of writer numbers to be activated. */
+ int *writer_nums;
/** pointer to the array of writer configurations */
void **writer_conf;
/** do not start receiver/filters/writer before this time */
s->fc->inbufp = &s->receiver_node->buf;
s->fc->in_loaded = &s->receiver_node->loaded;
s->fc->input_error = &s->receiver_node->task.error;
- s->fc->task.pre_select = filter_pre_select;
- s->fc->task.post_select = NULL;
+ s->fc->task.pre_select = NULL;
+ s->fc->task.post_select = filter_post_select;
s->fc->task.error = 0;
s->fc->num_filters = nf;
}
for (i = 0; i < a->num_writers; i++) {
s->wng->writer_nodes[i].conf = a->writer_conf[i];
- s->wng->writer_nodes[i].writer = a->writers[i];
+ s->wng->writer_nodes[i].writer_num = a->writer_nums[i];
}
ret = wng_open(s->wng);
- if (ret < 0) {
- PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ if (ret < 0)
return;
- }
s->wstime = *now;
s->server_stream_start = stat_task->server_stream_start.tv_sec?
stat_task->server_stream_start : *now;
FOR_EACH_AUDIO_FORMAT(i) {
a = &afi[i];
a->writer_conf = para_malloc(nw * sizeof(void *));
- a->writers = para_malloc(nw * sizeof(struct writer *));
+ a->writer_nums = para_malloc(nw * sizeof(int));
a->num_writers = 0;
}
for (i = 0; i < conf.writer_given; i++) {
ret = writer_num;
goto out;
}
- a->writers[nw] = &writers[writer_num];
+ a->writer_nums[nw] = writer_num;
a->writer_conf[nw] = wconf;
PARA_INFO_LOG("%s writer #%d: %s\n", audio_formats[ret],
nw, writer_names[writer_num]);