audiod: remove bogus check_timeouts()
authorAndre <maan@p133.(none)>
Mon, 29 May 2006 01:04:53 +0000 (03:04 +0200)
committerAndre <maan@p133.(none)>
Mon, 29 May 2006 01:04:53 +0000 (03:04 +0200)
With the new scheduler, audiod doesn't really know any more,
the number of transfered bytes. So kill that code for now.

audiod.c

index df7c1e1b4969d84591b8e24993cfb55cfcd999c7..0d8745d725bce902419afdd17c50a58cf51dd7fc 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -83,10 +83,6 @@ struct audio_format_info {
 struct slot_info {
        /** number of the audio format in this slot */
        int format;
 struct slot_info {
        /** number of the audio format in this slot */
        int format;
-       /** time of the last successful read from the receiver */
-       struct timeval rtime;
-       /** time the last write to the write fd happend */
-       struct timeval wtime;
        /** writer start time */
        struct timeval wstime;
        /** the receiver info associated with this slot */
        /** writer start time */
        struct timeval wstime;
        /** the receiver info associated with this slot */
@@ -710,8 +706,6 @@ static void open_receiver(int format)
                clean_exit(EXIT_FAILURE, PARA_STRERROR(-slot_num));
        s = &slot[slot_num];
        s->format = format;
                clean_exit(EXIT_FAILURE, PARA_STRERROR(-slot_num));
        s = &slot[slot_num];
        s->format = format;
-       s->rtime = *now;
-       s->wtime = s->rtime;
        s->receiver_node = para_calloc(sizeof(struct receiver_node));
        rn = s->receiver_node;
        rn->receiver = a->receiver;
        s->receiver_node = para_calloc(sizeof(struct receiver_node));
        rn = s->receiver_node;
        rn->receiver = a->receiver;
@@ -862,25 +856,6 @@ static void handle_signal(int sig)
        }
 }
 
        }
 }
 
-static void check_timeouts(void)
-{
-
-       int slot_num, timeout = conf.stream_timeout_arg;
-
-       FOR_EACH_SLOT(slot_num) {
-               struct slot_info *s = &slot[slot_num];
-               if (s->format < 0)
-                       continue;
-               /* check read time */
-               if (s->receiver_node &&
-                       now->tv_sec > s->rtime.tv_sec + timeout) {
-                       PARA_INFO_LOG("%s stream (slot %d) not ready\n",
-                               audio_formats[s->format], slot_num);
-                       s->receiver_node->eof = 1;
-               }
-       }
-}
-
 static void try_to_close_slot(int slot_num)
 {
        struct slot_info *s = &slot[slot_num];
 static void try_to_close_slot(int slot_num)
 {
        struct slot_info *s = &slot[slot_num];
@@ -911,7 +886,6 @@ static void audiod_pre_select(struct sched *s, __a_unused struct task *t)
                kill_all_decoders();
        else if (playing)
                open_current_receiver();
                kill_all_decoders();
        else if (playing)
                open_current_receiver();
-       check_timeouts();
        FOR_EACH_SLOT(i) {
                struct receiver_node *rn;
 
        FOR_EACH_SLOT(i) {
                struct receiver_node *rn;
 
@@ -928,15 +902,8 @@ static void audiod_pre_select(struct sched *s, __a_unused struct task *t)
 
 static void audiod_post_select(struct sched *s, __a_unused struct task *t)
 {
 
 static void audiod_post_select(struct sched *s, __a_unused struct task *t)
 {
-       int i;
-
+       /* only save away the current time for other users */
        now = &s->now;
        now = &s->now;
-       FOR_EACH_SLOT(i) {
-               struct receiver_node *rn = slot[i].receiver_node;
-
-               if (rn && rn->loaded)
-                       slot[i].rtime = *now;
-       }
 }
 
 static void init_audiod_task(struct audiod_task *at)
 }
 
 static void init_audiod_task(struct audiod_task *at)