[FFmpeg-cvslog] r24749 - in trunk/libavformat: rtp.h rtpenc_xiph.c sdp.c

mstorsjo subversion
Mon Aug 9 12:32:00 CEST 2010


Author: mstorsjo
Date: Mon Aug  9 12:31:59 2010
New Revision: 24749

Log:
rtpenc_xiph: Set the ident value via a define

Modified:
   trunk/libavformat/rtp.h
   trunk/libavformat/rtpenc_xiph.c
   trunk/libavformat/sdp.c

Modified: trunk/libavformat/rtp.h
==============================================================================
--- trunk/libavformat/rtp.h	Mon Aug  9 12:23:26 2010	(r24748)
+++ trunk/libavformat/rtp.h	Mon Aug  9 12:31:59 2010	(r24749)
@@ -76,4 +76,10 @@ enum CodecID ff_rtp_codec_id(const char 
 #define RTCP_TX_RATIO_NUM 5
 #define RTCP_TX_RATIO_DEN 1000
 
+/* An arbitrary id value for RTP Xiph streams - only relevant to indicate
+ * the the configuration has changed within a stream (by changing the
+ * ident value sent).
+ */
+#define RTP_XIPH_IDENT 0xfecdba
+
 #endif /* AVFORMAT_RTP_H */

Modified: trunk/libavformat/rtpenc_xiph.c
==============================================================================
--- trunk/libavformat/rtpenc_xiph.c	Mon Aug  9 12:23:26 2010	(r24748)
+++ trunk/libavformat/rtpenc_xiph.c	Mon Aug  9 12:31:59 2010	(r24749)
@@ -52,13 +52,13 @@ void ff_rtp_send_xiph(AVFormatContext *s
         break;
     }
 
-    // Set ident. Must match the one in sdp.c
+    // Set ident.
     // Probably need a non-fixed way of generating
     // this, but it has to be done in SDP and passed in from there.
     q = s->buf;
-    *q++ = 0xfe;
-    *q++ = 0xcd;
-    *q++ = 0xba;
+    *q++ = (RTP_XIPH_IDENT >> 16) & 0xff;
+    *q++ = (RTP_XIPH_IDENT >>  8) & 0xff;
+    *q++ = (RTP_XIPH_IDENT      ) & 0xff;
 
     // set fragment
     // 0 - whole frame (possibly multiple frames)

Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c	Mon Aug  9 12:23:26 2010	(r24748)
+++ trunk/libavformat/sdp.c	Mon Aug  9 12:31:59 2010	(r24749)
@@ -267,9 +267,9 @@ static char *xiph_extradata2config(AVCod
 
     config[0] = config[1] = config[2] = 0;
     config[3] = 1;
-    config[4] = 0xfe; // ident must match the one in rtpenc_xiph.c
-    config[5] = 0xcd;
-    config[6] = 0xba;
+    config[4] = (RTP_XIPH_IDENT >> 16) & 0xff;
+    config[5] = (RTP_XIPH_IDENT >>  8) & 0xff;
+    config[6] = (RTP_XIPH_IDENT      ) & 0xff;
     config[7] = (headers_len >> 8) & 0xff;
     config[8] = headers_len & 0xff;
     config[9] = 2;



More information about the ffmpeg-cvslog mailing list