[hxprotocol] CR: b=RR, b=RS support in SDP generation
Damon Lanphear damonlan at real.comAll,
Please review the attached modifications that represent changes to the SDP
generation code for the inclusion of the b=RR and b=RS fields with
information stored in the stream headers.
thanks,
damon
-------------- next part --------------
? protocol/sdp/Makefile
? protocol/sdp/Umakefil.upp
? protocol/sdp/dbg32
? protocol/sdp/protocol_sdp.dsp
? protocol/sdp/protocol_sdp.dsw
? protocol/sdp/protocol_sdp_sdplib.dsp
? protocol/sdp/protocol_sdp_sdplib.dsw
? protocol/sdp/protocol_sdp_sdpplin.dsp
? protocol/sdp/protocol_sdp_sdpplin.dsw
? protocol/sdp/pylinktmp-sdpplin
? protocol/sdp/sdplib.mak
? protocol/sdp/sdplib.upp
? protocol/sdp/sdpplin.def
? protocol/sdp/sdpplin.mak
? protocol/sdp/sdpplin.upp
Index: protocol/sdp/sdpmdgen.cpp
===================================================================
RCS file: /cvs/protocol/sdp/sdpmdgen.cpp,v
retrieving revision 1.8
diff -u -r1.8 sdpmdgen.cpp
--- protocol/sdp/sdpmdgen.cpp 25 Jun 2003 21:06:03 -0000 1.8
+++ protocol/sdp/sdpmdgen.cpp 3 Jul 2003 20:25:33 -0000
@@ -725,6 +725,10 @@
BOOL bChannelsFound=FALSE;
UINT32 port = 0;
UINT32 ulPayloadType = 0;
+ BOOL bFoundRTCPRR = FALSE;
+ UINT32 ulRTCPRR = 0;
+ BOOL bFoundRTCPSR = FALSE;
+ UINT32 ulRTCPSR = 0;
char* pszMimeType=NULL;
char* pszMimeFirst=NULL;
@@ -800,20 +804,31 @@
ptime = propValue;
bPtimeFound = TRUE;
}
- else if(strcasecmp(pPropName, "AvgBitRate") == 0)
- {
+ else if(strcasecmp(pPropName, "AvgBitRate") == 0)
+ {
avgBitRate = propValue;
-
+
// we need this in kbps
avgBitRate = (UINT32)((double)avgBitRate / 1000.0 + 0.5);
bFoundAvgBitRate = TRUE;
// add it to attribute as well.
bAddToHeader = TRUE;
- }
- else
- {
- bAddToHeader = TRUE;
- }
+ }
+ else if(strcasecmp(pPropName, "RTCPRRRate") == 0)
+ {
+ bFoundRTCPRR = TRUE;
+ ulRTCPRR = propValue;
+ }
+ else if(strcasecmp(pPropName, "RTCPSRRate") == 0)
+ {
+ bFoundRTCPSR = TRUE;
+ ulRTCPSR = propValue;
+ }
+ else
+ {
+ bAddToHeader = TRUE;
+ }
+
if (bAddToHeader)
{
@@ -1017,6 +1032,20 @@
bFoundAvgBitRate = FALSE;
}
+ if (bFoundRTCPRR)
+ {
+ SafeSprintf(psz256, 256,"b=RR:%u%s", ulRTCPRR, pszEOL);
+ mDesc += psz256;
+ bFoundRTCPRR = FALSE;
+ }
+
+ if (bFoundRTCPSR)
+ {
+ SafeSprintf(psz256, 256,"b=SR:%u%s", ulRTCPSR, pszEOL);
+ mDesc += psz256;
+ bFoundRTCPSR = FALSE;
+ }
+
// a=control
if (pControlStringBuff)
{
-------------- next part --------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at protocol.helixcommunity.org
For additional commands, e-mail: dev-help at protocol.helixcommunity.org