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

lu_zero at svn.xiph.org lu_zero at svn.xiph.org
Tue May 9 07:35:56 PDT 2006


Author: lu_zero
Date: 2006-05-09 07:35:47 -0700 (Tue, 09 May 2006)
New Revision: 11389

Modified:
   trunk/xiph-rtp/theorartp-client.c
   trunk/xiph-rtp/theorartp.c
   trunk/xiph-rtp/vorbisrtp-client.c
   trunk/xiph-rtp/vorbisrtp.c
   trunk/xiph-rtp/xiph_rtp.c
   trunk/xiph-rtp/xiph_rtp.h
Log:
Copyright notice updated, flush_stack() params reordered, 90kHz in, seems working, cosmetics

Modified: trunk/xiph-rtp/theorartp-client.c
===================================================================
--- trunk/xiph-rtp/theorartp-client.c	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/theorartp-client.c	2006-05-09 14:35:47 UTC (rev 11389)
@@ -271,7 +271,8 @@
   oggpack_read(&opb,1); //video marker
   
   frame_type = oggpackB_read(&opb,1);
-
+  timestamp/=90000;
+  timestamp*=ogg->time_num/ogg->time_den;
  
   if(timestamp)
   {
@@ -444,7 +445,7 @@
   ogg.prev_gp=-1;
 
 
-  fprintf (stderr, "  Vorbis RTP Client (draft-barbato-avt-rtp-theora-05)\n");
+  fprintf (stderr, "  Vorbis RTP Client (draft-barbato-avt-rtp-theora-00)\n");
 
   while ((opt = getopt (argc, argv, "i:p:f:v")) != -1)
     {

Modified: trunk/xiph-rtp/theorartp.c
===================================================================
--- trunk/xiph-rtp/theorartp.c	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/theorartp.c	2006-05-09 14:35:47 UTC (rev 11389)
@@ -4,7 +4,7 @@
   Date: 05/01/2005
   Platform: Linux
 
-  Copyright (c) 2005, Fluendo / Xiph.Org
+  Copyright (c) 2006, Fluendo / Xiph.Org
 
   Redistribution and use in source and binary forms, with or without 
   modification, are permitted provided that the following conditions are met:
@@ -109,7 +109,7 @@
 	unsigned int ttl  = 1;
 	long timestamp = 0;
 
-    	fprintf (stderr, "Theora RTP Server (draft-barbato-avt-rtp-theora-01)\n");
+    	fprintf (stderr, "Theora RTP Server (draft-barbato-avt-rtp-theora-00)\n");
 	memset (&xr,0,sizeof(xiph_rtp_t));
 
 /*  Command-line args processing  */
@@ -331,7 +331,7 @@
 #endif
                         //FIXME ugly as hell and probably wrong!!!!
 			creatertp ( &xr, xr.op.packet, xr.op.bytes, 
-				    timestamp, timestamp, 0, xr.op.e_o_s );
+				    timestamp*90000/((double)xr.ti.fps_numerator/xr.ti.fps_denominator), timestamp, 0, xr.op.e_o_s );
             	    }
                 }
 

Modified: trunk/xiph-rtp/vorbisrtp-client.c
===================================================================
--- trunk/xiph-rtp/vorbisrtp-client.c	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/vorbisrtp-client.c	2006-05-09 14:35:47 UTC (rev 11389)
@@ -642,7 +642,7 @@
   fprintf (stderr,
 	   "||---------------------------------------------------------------------------||\n");
 
-  fprintf (stderr, "||  Vorbis RTP Client (draft-kerr-avt-vorbis-rtp-05)\n");
+  fprintf (stderr, "||  Vorbis RTP Client (draft-ietf-avt-rtp-vorbis-00)\n");
 
   while ((opt = getopt (argc, argv, "i:p:f:v")) != -1)
     {

Modified: trunk/xiph-rtp/vorbisrtp.c
===================================================================
--- trunk/xiph-rtp/vorbisrtp.c	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/vorbisrtp.c	2006-05-09 14:35:47 UTC (rev 11389)
@@ -4,7 +4,7 @@
   Date: 05/01/2005
   Platform: Linux
 
-  Copyright (c) 2005, Fluendo / Xiph.Org
+  Copyright (c) 2006, Fluendo / Xiph.Org
 
   Redistribution and use in source and binary forms, with or without 
   modification, are permitted provided that the following conditions are met:
@@ -83,7 +83,7 @@
 	unsigned int ttl  = 1;
 	long timestamp = 0, prev = 0;
 
-    	fprintf (stderr, "Vorbis RTP Server (draft-kerr-avt-vorbis-rtp-05)\n");
+    	fprintf (stderr, "Vorbis RTP Server (draft-ietf-avt-rtp-vorbis-00)\n");
 	memset (&xr,0,sizeof(xiph_rtp_t));
 
 /*  Command-line args processing  */

Modified: trunk/xiph-rtp/xiph_rtp.c
===================================================================
--- trunk/xiph-rtp/xiph_rtp.c	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/xiph_rtp.c	2006-05-09 14:35:47 UTC (rev 11389)
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 2005, Fluendo / Xiph.Org
+  Copyright (c) 2006, Fluendo / Xiph.Org
 
   Redistribution and use in source and binary forms, with or without 
   modification, are permitted provided that the following conditions are met:
@@ -183,8 +183,8 @@
 	return (ret);
 }
 
-//FIXME timestamp and sleeptime could be just one parameter
-static void flush_stack (xiph_rtp_t *xr, long sleeptime, long timestamp)
+
+static void flush_stack (xiph_rtp_t *xr, long timestamp, long sleeptime)
 {
 	framestack_t *fs = &xr->fs;
 	unsigned char *packet;
@@ -257,7 +257,7 @@
 	if (type)
 	{
 		// flush any other packet in queue (chained ogg!)
-		flush_stack(xr, sleeptime, timestamp);
+		flush_stack(xr, timestamp, sleeptime);
 		sleeptime = 300; //  ((1 / (float) bitrate) * 1000000);
 	}
 
@@ -274,13 +274,13 @@
 		else if (length + fs->stacksize > max_payload
 				|| fs->stackcount >= 15)
 		{
-			flush_stack(xr, sleeptime, timestamp);
+			flush_stack(xr, timestamp, sleeptime);
 		
 			if (length <= max_payload)
 				stack_packet(xr,vorbdata,length);
 		}
 		if (last)
-			flush_stack(xr, sleeptime, timestamp);
+			flush_stack(xr, timestamp, sleeptime);
 
 	} 
 

Modified: trunk/xiph-rtp/xiph_rtp.h
===================================================================
--- trunk/xiph-rtp/xiph_rtp.h	2006-05-09 14:10:49 UTC (rev 11388)
+++ trunk/xiph-rtp/xiph_rtp.h	2006-05-09 14:35:47 UTC (rev 11389)
@@ -89,7 +89,7 @@
 	ogg_packet op;
 	ogg_packet header[3];
 	/* codec generic */
-	int codec; // 0 = vorbis, 1 = theora, 2 =speex
+	int codec; // 0 = vorbis, 1 = theora, 2 = speex
 #ifdef HAVE_VORBIS
 	/* codec specific (vorbis)*/
 	vorbis_info vi; 



More information about the commits mailing list