[pulseaudio-commits] r1936 - /branches/lennart/src/modules/rtp/module-rtp-recv.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Oct 7 06:56:08 PDT 2007


Author: lennart
Date: Sun Oct  7 15:56:07 2007
New Revision: 1936

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1936&root=pulseaudio&view=rev
Log:
s/timespec/timeval

Modified:
    branches/lennart/src/modules/rtp/module-rtp-recv.c

Modified: branches/lennart/src/modules/rtp/module-rtp-recv.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/rtp/module-rtp-recv.c?rev=1936&root=pulseaudio&r1=1935&r2=1936&view=diff
==============================================================================
--- branches/lennart/src/modules/rtp/module-rtp-recv.c (original)
+++ branches/lennart/src/modules/rtp/module-rtp-recv.c Sun Oct  7 15:56:07 2007
@@ -31,6 +31,7 @@
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
+#include <poll.h>
 
 #include <pulse/timeval.h>
 #include <pulse/xmalloc.h>
@@ -161,10 +162,10 @@
 static int rtpoll_work_cb(pa_rtpoll_item *i) {
     pa_memchunk chunk;
     int64_t k, j, delta;
-    struct timespec now;
+    struct timeval now;
     struct session *s;
     struct pollfd *p;
-    
+
     pa_assert_se(s = pa_rtpoll_item_get_userdata(i));
 
     p = pa_rtpoll_item_get_pollfd(i, NULL);
@@ -173,12 +174,12 @@
         pa_log("poll() signalled bad revents.");
         return -1;
     }
-    
+
     if ((p->revents & POLLIN) == 0)
         return 0;
 
     p->revents = 0;
-    
+
     if (pa_rtp_recv(&s->rtp_context, &chunk, s->userdata->module->core->mempool) < 0)
         return 0;
 
@@ -234,7 +235,7 @@
 static void sink_input_attach(pa_sink_input *i) {
     struct session *s;
     struct pollfd *p;
-    
+
     pa_sink_input_assert_ref(i);
     pa_assert_se(s = i->userdata);
 
@@ -317,7 +318,7 @@
     int fd = -1;
     pa_memblock *silence;
     pa_sink_input_new_data data;
-    struct timespec now;
+    struct timeval now;
 
     pa_assert(u);
     pa_assert(sdp_info);
@@ -406,7 +407,7 @@
 
     if (fd >= 0)
         pa_close(fd);
-    
+
     return NULL;
 }
 
@@ -422,7 +423,7 @@
     pa_assert(s->userdata->n_sessions >= 1);
     s->userdata->n_sessions--;
     pa_hashmap_remove(s->userdata->by_origin, s->sdp_info.origin);
-    
+
     pa_memblockq_free(s->memblockq);
     pa_sdp_info_destroy(&s->sdp_info);
     pa_rtp_context_destroy(&s->rtp_context);
@@ -461,10 +462,10 @@
                 pa_sdp_info_destroy(&info);
 
         } else {
-            struct timespec now;
+            struct timeval now;
             pa_rtclock_get(&now);
             pa_atomic_store(&s->timestamp, now.tv_sec);
-            
+
             pa_sdp_info_destroy(&info);
         }
     }
@@ -473,7 +474,7 @@
 static void check_death_event_cb(pa_mainloop_api *m, pa_time_event *t, const struct timeval *ptv, void *userdata) {
     struct session *s, *n;
     struct userdata *u = userdata;
-    struct timespec now;
+    struct timeval now;
     struct timeval tv;
 
     pa_assert(m);
@@ -484,7 +485,7 @@
     pa_rtclock_get(&now);
 
     pa_log_debug("Checking for dead streams ...");
-    
+
     for (s = u->sessions; s; s = n) {
         int k;
         n = s->next;
@@ -511,7 +512,7 @@
     const char *sap_address;
     int fd = -1;
     struct timeval tv;
-    
+
     pa_assert(m);
 
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
@@ -554,7 +555,7 @@
     pa_gettimeofday(&tv);
     pa_timeval_add(&tv, DEATH_TIMEOUT * PA_USEC_PER_SEC);
     u->check_death_event = m->core->mainloop->time_new(m->core->mainloop, &tv, check_death_event_cb, u);
-    
+
     pa_modargs_free(ma);
 
     return 0;
@@ -572,7 +573,7 @@
 void pa__done(pa_module*m) {
     struct userdata *u;
     struct session *s;
-    
+
     pa_assert(m);
 
     if (!(u = m->userdata))
@@ -589,7 +590,7 @@
     if (u->by_origin) {
         while ((s = pa_hashmap_get_first(u->by_origin)))
             session_free(s);
-        
+
         pa_hashmap_free(u->by_origin, NULL, NULL);
     }
 




More information about the pulseaudio-commits mailing list