return ret;
}
+struct btr_node *audiod_get_btr_root(void)
+{
+ int i, newest_slot = -1;
+ struct timeval newest_rstime = {0, 0};
+
+ FOR_EACH_SLOT(i) {
+ struct slot_info *s = &slot[i];
+ struct timeval rstime;
+ if (!s->receiver_node)
+ continue;
+ if (s->receiver_node->task.error < 0)
+ continue;
+ btr_get_node_start(s->receiver_node->btrn, &rstime);
+ if (newest_slot >= 0 && tv_diff(&rstime, &newest_rstime, NULL) < 0)
+ continue;
+ newest_rstime = rstime;
+ newest_slot = i;
+ }
+ if (newest_slot == -1)
+ return NULL;
+ return slot[newest_slot].receiver_node->btrn;
+}
+
/* returns slot num on success. */
static int open_current_receiver(struct sched *s)
{
* this period begins to avoid restarting the receiver that
* belongs to the file just completed.
*/
- PARA_CRIT_LOG("->>>>>>>>>>>>>>>>>> no delay\n");
- if (stat_task->server_stream_start.tv_sec != 0) {
- PARA_CRIT_LOG("->>>>>>>>>>>>>>>>>><delay\n");
+ if (stat_task->server_stream_start.tv_sec != 0)
return -1;
- }
}
if (tv_diff(now, &afi[cafn].restart_barrier, &diff) < 0) {
/* avoid busy loop */
if (a->num_filters)
open_filters(sl);
open_writers(sl);
+ activate_grab_clients();
btr_log_tree(sl->receiver_node->btrn, LL_NOTICE);
s->timeout.tv_sec = 0;
s->timeout.tv_usec = 1;