[xiph-commits] r10350 - trunk/xiph-rtp

giles at svn.xiph.org giles at svn.xiph.org
Sun Nov 6 00:06:03 PST 2005


Author: giles
Date: 2005-11-06 00:06:02 -0800 (Sun, 06 Nov 2005)
New Revision: 10350

Modified:
   trunk/xiph-rtp/vorbisrtp.c
Log:
Document that the packet timing isn't correct.


Modified: trunk/xiph-rtp/vorbisrtp.c
===================================================================
--- trunk/xiph-rtp/vorbisrtp.c	2005-11-06 07:45:13 UTC (rev 10349)
+++ trunk/xiph-rtp/vorbisrtp.c	2005-11-06 08:06:02 UTC (rev 10350)
@@ -321,7 +321,7 @@
             packet = malloc (framesize + 4 + 2);
 
             makevorbisheader (packet, framesize + 2 + 4, vorbheader);
- //           memcpy (packet + 4, &framesize, 2);
+	    /* write 16-bit network order fragment length */
             packet[4]=(framesize&0xff00)>>8;
 	    packet[5]=framesize&0xff;
             memcpy (packet + 4 + 2, vorbdata + position, framesize);
@@ -425,7 +425,7 @@
             else
                 progressmarker (5);
 
-            usleep (sleeptime);
+            usleep (sleeptime); /* WRONG */
 
             RTPHeaders.sequence++;
             RTPHeaders.timestamp += sleeptime;
@@ -470,6 +470,8 @@
         RTPHeaders.sequence = htons (RTPHeaders.sequence);
         RTPHeaders.timestamp = ntohl (RTPHeaders.timestamp);
 
+	/* WRONG. We need to sleep something like 1/2 the time to the
+	   next packet. The caller should probably handle this. */
         sleeptime = timestamp;
         usleep (sleeptime);
 



More information about the commits mailing list