*socket_name, *hostname;
static char *stat_item_values[NUM_STAT_ITEMS];
static FILE *logfile;
-static const struct timeval restart_delay = {0, 300 * 1000};
+static const struct timeval restart_delay = {0, 200 * 1000};
static struct audio_format_info afi[NUM_AUDIO_FORMATS];
static struct timeval *now;
FOR_EACH_SLOT(i) {
struct slot_info *s = &slot[i];
- if (s->receiver_node)
+ if (s->wng && !s->wng->eof) {
+ PARA_INFO_LOG("unregistering writer node group in slot %d\n",
+ i);
+ wng_unregister(s->wng);
+ s->wng->eof = 1;
+ }
+ if (s->fc && !s->fc->eof) {
+ PARA_INFO_LOG("unregistering filter chain in slot %d\n", i);
+ unregister_task(&s->fc->task);
+ s->fc->eof = 1;
+ }
+ if (s->receiver_node && !s->receiver_node->eof) {
+ PARA_INFO_LOG("unregistering receiver_node in slot %d\n", i);
+ unregister_task(&s->receiver_node->task);
s->receiver_node->eof = 1;
+ }
}
}
struct slot_info *s = &slot[i];
if (s->wng != wng)
continue;
-// if (s->fc)
-// s->fc->eof = 1;
-// if (s->receiver_node)
-// s->receiver_node->eof = 1;
PARA_INFO_LOG("slot %d: %s\n", i, PARA_STRERROR(-t->ret));
}
}
s->wng->writer_nodes[i].writer = a->writers[i];
sprintf(s->wng->writer_nodes[i].task.status, "writer_node");
}
- ret = wng_open(s->wng); /* FIXME */
+ ret = wng_open(s->wng);
+ if (ret < 0) {
+ PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
+ return;
+ }
s->wstime = *now;
current_decoder = slot_num;
activate_inactive_grab_clients(slot_num, s->format, &s->fc->filters);
count > 10? sign : sign * time_smooth, &diff,
&tmp);
sa_time_diff = tmp;
- PARA_INFO_LOG("time diff (cur/avg): %s%lums/%s%lums\n",
+ PARA_DEBUG_LOG("time diff (cur/avg): %s%lums/%s%lums\n",
sign > 0? "+" : "-",
tv2ms(&diff),
sa_time_diff_sign ? "+" : "-",