PARA_NOTICE_LOG("started %s: %s receiver in slot %d\n",
audio_formats[s->format], a->receiver->name, slot_num);
rn->task.private_data = s->receiver_node;
- PARA_NOTICE_LOG("rn = %p\n", rn->task.private_data);
rn->task.pre_select = a->receiver->pre_select;
rn->task.post_select = a->receiver->post_select;
rn->task.event_handler = rn_event_handler;
{
struct filter_callback *fcb, *tmp;
- list_for_each_entry_safe(fcb, tmp, &fn->callbacks, node)
+ list_for_each_entry_safe(fcb, tmp, &fn->callbacks, node) {
+ PARA_INFO_LOG("closing %s filter callback\n",
+ fn->filter->name);
close_filter_callback(fcb);
+ }
}
static void call_callbacks(struct filter_node *fn, char *inbuf, size_t inlen,
*loaded -= t->ret;
conv += t->ret;
if (*loaded && t->ret) {
- PARA_DEBUG_LOG("moving %zd bytes in input buffer for %s filter\n",
+ PARA_INFO_LOG("moving %zd bytes in input buffer for %s filter\n",
*loaded, fn->filter->name);
memmove(ib, ib + t->ret, *loaded);
}
loaded = &fn->loaded;
}
conv_total += conv;
- PARA_DEBUG_LOG("eof (in/out/fc): %d/%d/%d out_loaded: %d, conv: %d, conv_total: %d\n", *fc->input_eof,
+ PARA_INFO_LOG("eof (in/out/fc): %d/%d/%d out_loaded: %d, conv: %d, conv_total: %d\n", *fc->input_eof,
*fc->output_eof, fc->eof, *fc->out_loaded, conv, conv_total);
if (conv)
goto again;
if (!fc)
return;
- PARA_DEBUG_LOG("closing filter chain %p\n", fc);
+ PARA_NOTICE_LOG("closing filter chain %p\n", fc);
list_for_each_entry_safe(fn, tmp, &fc->filters, node) {
- PARA_NOTICE_LOG("closing %s filter callbacks (fc %p, fn %p)\n", fn->filter->name, fc, fn);
close_callbacks(fn);
- PARA_NOTICE_LOG("closing %s filter (fc %p, fn %p)\n", fn->filter->name, fc, fn);
+ PARA_INFO_LOG("closing %s filter\n", fn->filter->name);
fn->filter->close(fn);
list_del(&fn->node);
free(fn);
out:
if (pmd->stream.next_frame) { /* we still have some data */
size_t off = pmd->stream.bufend - pmd->stream.next_frame;
- PARA_DEBUG_LOG("converted %zd, rate: %u, returning %zd\n", len - off,
- fn->fc->samplerate, copy - off);
+// PARA_DEBUG_LOG("converted %zd, rate: %u, returning %zd\n", len - off,
+// fn->fc->samplerate, copy - off);
return copy - off;
}
return copy;
char tmpbuf[CHUNK_SIZE + 3];
unsigned chunk_time;
-// PARA_DEBUG_LOG("rn: %p, pord: %p, session: %p\n", rn, pord, pord->session);
+// PARA_INFO_LOG("rn: %p, pord: %p, session: %p\n", rn, pord, pord->session);
t->ret = 1;
if (pord->start.tv_sec)
if (tv_diff(&s->now, &pord->next_chunk, NULL) < 0)
min_written = PARA_MIN(min_written, t->ret);
}
*g->loaded -= min_written;
- if (!*g->loaded && *g->input_eof)
+ if (!*g->loaded && *g->input_eof) {
+ g->eof = 1;
t->ret = -E_WNG_EOF;
- else
+ } else
t->ret = 1;
if (*g->loaded && min_written)
memmove(g->buf, g->buf + min_written, *g->loaded);
{
int i, ret = 1;
+ PARA_NOTICE_LOG("opening wng with %d writer(s)\n", g->num_writers);
FOR_EACH_WRITER_NODE(i, g) {
struct writer_node *wn = &g->writer_nodes[i];
ret = wn->writer->open(wn);
{
int i;
+ PARA_NOTICE_LOG("closing wng with %d writer(s)\n", g->num_writers);
FOR_EACH_WRITER_NODE(i, g) {
struct writer_node *wn = &g->writer_nodes[i];
unregister_task(&wn->task);