# HG changeset patch # User mstorsjo # Date 1281349919 0 # Node ID 3aa7765383b5ca6f68a12a5d00a1b9808adc2cbf # Parent c0bd24801ac1fd15bda4edc65a88736655d3f03a rtpenc_xiph: Set the ident value via a define diff -r c0bd24801ac1 -r 3aa7765383b5 rtp.h --- a/rtp.h Mon Aug 09 10:23:26 2010 +0000 +++ b/rtp.h Mon Aug 09 10:31:59 2010 +0000 @@ -76,4 +76,10 @@ #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 */ diff -r c0bd24801ac1 -r 3aa7765383b5 rtpenc_xiph.c --- a/rtpenc_xiph.c Mon Aug 09 10:23:26 2010 +0000 +++ b/rtpenc_xiph.c Mon Aug 09 10:31:59 2010 +0000 @@ -52,13 +52,13 @@ 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) diff -r c0bd24801ac1 -r 3aa7765383b5 sdp.c --- a/sdp.c Mon Aug 09 10:23:26 2010 +0000 +++ b/sdp.c Mon Aug 09 10:31:59 2010 +0000 @@ -267,9 +267,9 @@ 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;