[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-protocol-dev
Subject:    [Protocol-dev] CR: Bug 10106 fix: RTSP crashes rtspclnt.so when
From:       Charles Chen <cchen () real ! com>
Date:       2010-03-19 21:35:00
Message-ID: 766B5A29D28DA442AB229AAEE2AFC44507DFBBF78F () SEAMBX ! corp ! real ! com
[Download RAW message or body]

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

[Attachment #2 (multipart/alternative)]
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.


Synopsis: Helix DNA client crashes in RTSPClientProtocol::handlePlayRespons=
e() when RTSPResponseMessage contains no "RTP-Info" header.

Overview: This crash is reproducible with Helix DNA client based on 310Atla=
s and 361atlas branches when connecting to a live RTSP streaming site: rtsp=
://114.255.201.248/live101_video1_128k.sdp. This crash does not happen with=
 Helix DNA client built from HEAD or 420Brizo. This crash issue seems to be=
 fixed by a CR "PAMK-7W7NZW Extraneous RTSP chat with non-RN servers" submi=
tted by Nokia on 10/20/2009.

Solution: After merging 3 RTSP specific files from head to 361Atlas and reb=
uild the client, the crash no longer happens.

Merged files:

protocol/rtsp/rtspclnt.cpp
protocol/rtsp/pub/rtspclnt.h
protocol/rtsp/pub/rtspmsg.h

Diffs: attached

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial><SPAN 
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; \
FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: \
normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"  \
class=Apple-style-span><SPAN  style="TEXT-ALIGN: left; FONT-FAMILY: 'sans serif', \
sans-serif, 'Lucida Grande', verdana, arial, helvetica, sans-serif; COLOR: \
rgb(32,32,32); FONT-SIZE: 12px; -webkit-border-horizontal-spacing: 1px; \
-webkit-border-vertical-spacing: 1px"  class=Apple-style-span><PRE style="WORD-WRAP: \
break-word; WHITE-SPACE: pre-wrap" class=vc_log>Synopsis: <SPAN \
class=262364520-19032010>Helix DNA client crashes in \
RTSPClientProtocol::handlePlayResponse() when RTSPResponseMessage contains no \
"RTP-Info" header.</SPAN></PRE><PRE style="WORD-WRAP: break-word; WHITE-SPACE: \
pre-wrap" class=vc_log><SPAN class=262364520-19032010>Overview: This crash is \
reproducible with Helix DNA client based on 310Atlas and 361atlas branches when \
connecting to a live RTSP streaming site: \
rtsp://114.255.201.248/live101_video1_128k.sdp. This crash does not happen with Helix \
DNA client built from HEAD or 420Brizo. This crash issue seems to be fixed by a CR \
"<FONT face=Arial>PAMK-7W7NZW Extraneous RTSP chat with non-RN servers" \
</FONT>submitted by Nokia on 10/20/2009.</SPAN></PRE><PRE style="WORD-WRAP: \
break-word; WHITE-SPACE: pre-wrap" class=vc_log><SPAN \
class=262364520-19032010>Solution: After merging 3 RTSP specific files from head to \
361Atlas and rebuild the client, the crash no longer happens.</SPAN></PRE><PRE \
style="WORD-WRAP: break-word; WHITE-SPACE: pre-wrap" class=vc_log><SPAN \
class=262364520-19032010>Merged files:</SPAN></PRE><PRE style="WORD-WRAP: break-word; \
WHITE-SPACE: pre-wrap" class=vc_log><SPAN \
class=262364520-19032010>protocol/rtsp/rtspclnt.cpp<BR>protocol/rtsp/pub/rtspclnt.h<BR>protocol/rtsp/pub/rtspmsg.h</SPAN></PRE><PRE \
style="WORD-WRAP: break-word; WHITE-SPACE: pre-wrap" class=vc_log><SPAN \
class=262364520-19032010>Diffs: \
attached</SPAN></PRE></SPAN></SPAN></FONT></DIV></BODY></HTML>


["rtspclnt.cpp.diff" (application/octet-stream)]

--- rtspclnt.cpp	2010-03-19 13:34:36.000000000 -0700
+++ rtspclnt.cpp.head	2010-03-19 13:29:17.000000000 -0700
@@ -1,5 +1,5 @@
 /* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id: rtspclnt.cpp,v 1.221.2.15 2009/08/28 22:34:16 \
sblanding Exp $ + * Source last modified: $Id: rtspclnt.cpp,v 1.247 2010/01/11 \
                16:24:04 girish2080 Exp $
  *
  * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
  *
@@ -2418,6 +2418,7 @@
     m_ulRegistryID(0),
     m_ulLastBWSent(MAX_UINT32),
     m_bHaveSentRemainingSetupRequests(FALSE)
+    ,m_bSDBDisabled(FALSE)
 #if defined(_MACINTOSH)
     , m_pCallback(NULL)
 #endif /* _MACINTOSH */
@@ -2711,6 +2712,17 @@
         m_bSDPInitiated = TRUE;
         res = ParseSDP("application/sdp", pSdpData);
         HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::InitExtInitSDP(): got sdp data \
[%p]", this, pSdpData); +        
+        HXEscapeUtil::EnsureEscapedURL( m_headerControl ); //to make sure URL has \
been escaped +        
+        //Escape control URLs of each stream
+        CHXSimpleList::Iterator i;
+        for(i=m_streamInfoList.Begin();i!=m_streamInfoList.End();++i)
+        {
+            RTSPStreamInfo* pStreamInfo = (RTSPStreamInfo*)(*i);
+            HXEscapeUtil::EnsureEscapedURL(pStreamInfo->m_streamControl);
+        }
+
         if (HXR_OK == res)
         {
             if (m_bMulticast)
@@ -2732,27 +2744,41 @@
             }
             else
             {
-                CHXURL url(m_headerControl, m_pContext);
+                if(!m_headerControl.IsEmpty())
+                {
+                    CHXURL url(m_headerControl, m_pContext);
 
-                IHXValues* pProps = url.GetProperties();
-                if (pProps)
+                    IHXValues* pProps = url.GetProperties();
+                    if (pProps)
+                    {
+                        UINT32 port = 0;
+                        pProps->GetPropertyULONG32(PROPERTY_PORT, port);
+                        hostPortOut = UINT16(port);
+                        IHXBuffer* pHost = NULL;
+                        if (HXR_OK == pProps->GetPropertyBuffer(PROPERTY_HOST, \
pHost))              +                        {
+                            strHostOut = (const char*)pHost->GetBuffer();
+                            HX_RELEASE(pHost); 
+                        } 
+                        else
+                        {
+                            res = HXR_INVALID_URL_HOST;
+                        }
+                        HX_RELEASE(pProps);
+                        HXLOGL3(HXLOG_RTSP, \
"RTSPClientProtocol[%p]::InitExtInitSDP(): unicast:  [%s]:%u", this, (const \
char*)strHostOut, hostPortOut); +                    }
+                } 
+                else
                 {
-                    UINT32 port = 0;
-                    pProps->GetPropertyULONG32(PROPERTY_PORT, port);
-                    hostPortOut = UINT16(port);
-                    IHXBuffer* pHost = NULL;
-                    pProps->GetPropertyBuffer(PROPERTY_HOST, pHost);
-                    strHostOut = (const char*)pHost->GetBuffer();
-                    HX_RELEASE(pHost);
-                    HX_RELEASE(pProps);
-                    HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::InitExtInitSDP(): \
                unicast:  [%s]:%u", this, (const char*)strHostOut, hostPortOut);
-                }
+                    res = HXR_INVALID_PARAMETER;
+                }   
             }
 
             HX_RELEASE(pSdpData);
         }
     }
 
+    HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::InitExtInitSDP(): res=%x", this, \
res);  return res;
 }
 
@@ -3317,9 +3343,9 @@
     if (oCHXPath.GetLength() && originalURL.GetType() == HXURLRep::TYPE_OPAQUE)
     {
         //This code is needed to handle a special case when pURL="test:31285";
-    	 //This its self is a unique case when parser hits the "TYPE_OPAQUE" case
-    	 // and scheme is also tokenized from the URL;
-    	 // This makes originalURL.Scheme() and originalURL.Path() to return "test"  \
and "31285" repectively; +        //This its self is a unique case when parser hits \
the "TYPE_OPAQUE" case +        // and scheme is also tokenized from the URL;
+        // This makes originalURL.Scheme() and originalURL.Path() to return "test"  \
and "31285" repectively;  oCHXPath += ":";
     }
     else 
@@ -4451,7 +4477,6 @@
         }
     }
 
-
     /*
      * Man, iptv, teracast, and darwin server don't like this even though
      * this is perfetly legal...
@@ -5617,7 +5642,7 @@
         for(i=m_streamInfoList.Begin();i!=m_streamInfoList.End() && HXR_OK == \
hr;++i)  {
             pStreamInfo = (RTSPStreamInfo*)(*i);
-            hr = CreateUDPSockets(pStreamInfo->m_streamNumber, \
pStreamInfo->m_sPort); +            hr = \
CreateUDPSockets(pStreamInfo->m_streamNumber, pStreamInfo->m_ulAvgBitRate, \
pStreamInfo->m_sPort);  }
     }
     else
@@ -5693,7 +5718,7 @@
                     }
 
                     HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::InitSockets(): \
                trying %lu...", this, datagramPort);
-                    if (HXR_OK == CreateUDPSockets(pStreamInfo->m_streamNumber, \
datagramPort)) +                    if (HXR_OK == \
CreateUDPSockets(pStreamInfo->m_streamNumber, pStreamInfo->m_ulAvgBitRate, \
datagramPort))  {
                         bGotSocket = TRUE;
                         break;
@@ -6179,8 +6204,10 @@
         }
         HX_RELEASE(pAgent);
     }
+    
+    HX_RELEASE(pIter);
+    
     return bRealServer;
-	
 }
 
 HXBOOL
@@ -6741,7 +6768,8 @@
 
                   case RTSPMessage::T_SET_PARAM:
                   {
-                      rc = handleSetParamResponse((RTSPResponseMessage*)pMsg);
+                      rc = handleSetParamResponse((RTSPResponseMessage*)pMsg,
+                                                   (RTSPSetParamMessage*)pReqMsg);
                   }
                   break;
 
@@ -7393,6 +7421,31 @@
                         m_pSDPStreamHeaders,
                         pResponseHeaders
                         );
+
+	              //disable rate adaptation for SDP file initiated streaming.
+	              if (m_pRateAdaptInfo)
+	              {
+	                  UINT32 ulStreamNumber = 0;
+	                  UINT32 ulVersionTarget = HX_ENCODE_PROD_VERSION(11L, 1L, 9L, 0L);
+	                  CHXSimpleList::Iterator i;
+	                  for(i=m_pSDPStreamHeaders->Begin();i!=m_pSDPStreamHeaders->End();++i)
 +	                  {
+	                      IHXValues* pStreamHeader = (IHXValues*)(*i);
+	                      pStreamHeader->GetPropertyULONG32("StreamNumber", \
ulStreamNumber); +	                      if (IsRealServer()&& (m_ulServerVersion < \
ulVersionTarget)) +	                      {
+	                          // switch off both rate adaptation 
+	                          \
pStreamHeader->SetPropertyULONG32("Helix-Adaptation-Support", 0);  +	                 \
pStreamHeader->SetPropertyULONG32("3GPP-Adaptation-Support", 0);  +	                  \
} +                          HXBOOL bUseRTP = FALSE;
+                          HXBOOL bPrefer3GP = FALSE;
+                          DetermineIfPreferenceUseRTP(bPrefer3GP);
+
+	                      m_pRateAdaptInfo->OnStreamHeader((UINT16)ulStreamNumber,
+	                                                              pStreamHeader, \
bPrefer3GP); +	                  }
+	              }
             }
             HX_RELEASE(pResponseHeaders);
         }
@@ -7609,7 +7662,7 @@
 #endif //HELIX_FEATURE_TRANSPORT_MULTICAST
 
 HX_RESULT
-RTSPClientProtocol::handleSetParamResponse(RTSPResponseMessage* pMsg)
+RTSPClientProtocol::handleSetParamResponse(RTSPResponseMessage* pMsg, \
RTSPSetParamMessage* pReqMsg)  {
     HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::handleSetParamResponse(): %lu", \
this, pMsg->errorCodeAsUINT32());  IHXValues* pValues = NULL;
@@ -7621,6 +7674,16 @@
 
         if (uErrorCode != 200)
         {
+            
+            // Check whether we are getting 451 (Parameter not understood)
+            // error code for SDB
+            if( (uErrorCode == 451) &&
+                (pReqMsg->GetMsgMode() == RTSPSetParamMessage::T_SDB) )
+            {
+                HXLOGL2(HXLOG_RTSP, \
"RTSPClientProtocol[%p]::handleSetParamResponse() DISABLE SDB", this); +              \
m_bSDBDisabled = TRUE; +            }
+
             if (m_bNonRSRTP)
             {
                 return m_pResp->HandleSetParameterResponse(HXR_OK);
@@ -7805,41 +7868,23 @@
 
             if (pParam)
             {
-                 CHXString strRange = pParam->m_attribute;
-                 strRange.TrimLeft();
-                 strRange.TrimRight();
-                 if (!strRange.IsEmpty())
-                 {
-                 	double dTemp;
-                 	INT32 nDashPos = strRange.Find('-');
-
-                 	if (nDashPos > -1)
-                 	{
-                 		CHXString strFrom = strRange.Left(nDashPos);
-                 		strFrom.TrimRight();
-						
-                 		if (!strFrom.IsEmpty())
-                 		{
-                 			dTemp = strtod((const char*)strFrom, NULL);
-                    			nFrom = (INT32)(dTemp * 1000);
-                 		}
- 
-                 		UINT32 uLen = strRange.GetLength();
-                 		CHXString strTo = strRange.Right(uLen - nDashPos - 1);
-                 		strTo.TrimLeft();
-
-                 		if (!strTo.IsEmpty())
-                 		{
-                 			dTemp = strtod(strTo, NULL);
-                 			nTo = (INT32)(dTemp * 1000);
-                 		}
-
-                 	}
-                 	else
-                 	{
-                 		dTemp = strtod((const char*)strRange, NULL);
-                 		nFrom = (INT32)(dTemp * 1000);
-                 	}
+                const char* pRange = (const char*) pParam->m_attribute;
+                const char* pDash = NULL;
+                char* pStopString;
+                double dTemp;
+
+                if (pRange)
+                {
+                    dTemp = strtod(pRange, &pStopString);
+                    nFrom = (INT32)(dTemp * 1000);
+
+                    pDash  = strrchr(pRange, '-');
+                }
+
+                if (pDash)
+                {
+                    dTemp = strtod(pDash + 1, &pStopString);
+                    nTo = (INT32)(dTemp * 1000);
                 }
             }
         }
@@ -7860,6 +7905,10 @@
         }
     }
 
+
+    // pSeqValue is reused below for getting the first header value so it needs to \
be reset +    pSeqValue = 0;
+
     // If server is operating correcty, we should never see \
ulNumPlayResponsesTrimmed > 1  // or ulNumPlayResponsesTrimmed != 0 when \
                bIsResumeResponse == TRUE.
     // The logic here is implemented to make client as robust as possible in cases
@@ -7908,7 +7957,7 @@
                     RTPErr = RTPINFO_EMPTY;
                 }
 
-                // if m_pControlToStreamNoMap, don't trust the parseRTPInfoHeader
+		// if m_pControlToStreamNoMap, don't trust the parseRTPInfoHeader
 		// because RTP-Info url could be not what we expect and still be ok with
 		// spec
 		HX_ASSERT(pControl);
@@ -8533,6 +8582,7 @@
                 {
                     m_bForceUCaseTransportMimeType = TRUE;
                 }
+
             }
             HX_RELEASE(pAgent);
         }
@@ -9346,11 +9396,16 @@
 RTSPClientProtocol::SetDeliveryBandwidth(UINT32 ulBandwidth, UINT32 ulMsBackOff)
 {
     HX_RESULT hr = HXR_OK;
-    HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::SetDeliveryBandwidth(): bw = %lu", \
this, ulBandwidth); +    HXLOGL3(HXLOG_RTSP, \
"RTSPClientProtocol[%p]::SetDeliveryBandwidth(): bw = %lu IsSDBDisabled=%d", this, \
ulBandwidth, m_bSDBDisabled);  if (!m_pIsMethodSupported[SET_PARAM] || !m_pSession)
     {
         return HXR_OK;
     }
+    if(m_bSDBDisabled == TRUE)
+    {
+        HXLOGL2(HXLOG_RTSP, "RTSPClientProtocol[%p]::SetDeliveryBandwidth(): SDB \
DISABLED %d", this, m_bSDBDisabled); +        return HXR_NOT_SUPPORTED;
+    }
     m_pMutex->Lock();
 
    if(m_ulLastBWSent != ulBandwidth)
@@ -9366,6 +9421,7 @@
         	pMsg->addHeader("Session", m_sessionID);
         }
         UINT32 seqNo = m_pSession->getNextSeqNo(this);
+        pMsg->SetMsgMode(RTSPSetParamMessage::T_SDB);
         hr = sendRequest(pMsg, seqNo);
         m_ulLastBWSent = ulBandwidth;
    }
@@ -10207,6 +10263,11 @@
             res = m_pRateAdaptInfo->OnRateAdaptResponse(streamNumber,
                                                         pReqHdrs,
                                                         pRespHdrs);
+            if(SUCCEEDED(res))
+            {
+                HXLOGL2(HXLOG_RTSP, \
"RTSPClientProtocol[%p]::handleRateAdaptResponse() Disabling SDB as RateAdaptation is \
turned on", this); +                m_bSDBDisabled = TRUE;
+            }
         }
         HX_RELEASE(pReqHdrs);
         HX_RELEASE(pRespHdrs);
@@ -10429,6 +10490,14 @@
     {
         // error
         HX_ASSERT(!"bad sdp file 0");
+
+        // If the error code that is bubbled to the top-level client
+        // is too generic, it may be unable to display 
+        // a suitable message to the end user.
+        if( HXR_FAIL == rc )
+        {
+            rc = HXR_INVALID_FILE;
+        }
     }
     else if (nValues <= 1)
     {
@@ -10732,30 +10801,42 @@
 
             if (m_pRateAdaptInfo)
             {
-		UINT32 ulHelixAdaptation = 0;   
-		UINT32 ulVersionTarget = HX_ENCODE_PROD_VERSION(11L, 1L, 0L, 0L);
+                UINT32 ulHelixAdaptation = 0;
+                UINT32 ul3GPPRateAdaptation = 0;
+                UINT32 ulVersionTarget = HX_ENCODE_PROD_VERSION(11L, 1L, 9L, 0L);
+                
+                //
+                // due to a bug in released Helix Server, the client needs to \
disable Server Side Rate Adaption" +                // if the server version < \
11.1.9.0 +                //
+                // Problems:
+                // * see https://bugs.helixcommunity.org/show_bug.cgi?id=4989 for \
details +                // * Transport buffer overflow problem. Server oversends \
data resulting in  +                //   client buffer overflow.
+                //  
+                //
+                
+                if (!m_bSDPInitiated)
+                {
+                if(IsRealServer() && (m_ulServerVersion < ulVersionTarget) )
+                {
+                    HXLOGL2(HXLOG_RTSP, "RTSPClientProtocol[%p]::ParseSDP() \
Disabling RateAdaptation", this); +                    
+                    // switch off both rate adaptation
+                    ppRealHeaders[i]->SetPropertyULONG32("Helix-Adaptation-Support", \
0); +                    \
ppRealHeaders[i]->SetPropertyULONG32("3GPP-Adaptation-Support", 0); +                 \
 +                } // End of if(IsRealServer() && (m_ulServerVersion < \
ulVersionTarget) )  
-		//
-		// due to a bug in released Helix Server, the client needs to disable \
                "Helix-Adaption"
-		// if the server version < 11.1.0.0
-		//
-		// see https://bugs.helixcommunity.org/show_bug.cgi?id=4989 for details
-		//
-		if ((m_ulServerVersion < ulVersionTarget) &&
-		    HXR_OK == ppRealHeaders[i]->GetPropertyULONG32("Helix-Adaptation-Support",
-								   ulHelixAdaptation) &&
-		    (1 == ulHelixAdaptation))
-		{
-		    ppRealHeaders[i]->SetPropertyULONG32("Helix-Adaptation-Support", 0);
-		}
-                HXBOOL bUseRTP = FALSE;
+				HXBOOL bUseRTP = FALSE;
                 HXBOOL bPrefer3GP = FALSE;
                 DetermineIfPreferenceUseRTP(bPrefer3GP);
 
                 m_pRateAdaptInfo->OnStreamHeader((UINT16)streamNumber,
-                                                 ppRealHeaders[i], bPrefer3GP);
+                                                 ppRealHeaders[i],bPrefer3GP);
+                }
             }
-
+            
 #if defined(HELIX_FEATURE_TRANSPORT_MULTICAST)
             // get multicast address from the media description
             if (HXR_OK == ppRealHeaders[i]->GetPropertyCString("MulticastAddress", \
pIPAddress)) @@ -10778,6 +10859,14 @@
             m_pSDPFileHeader->SetPropertyULONG32("LiveStream", 1);
             m_bIsLive = TRUE;
         }
+
+        //
+        // Check if pause is supported and set 
+        // StreamingPauseSupport property value accordingly
+        //       
+        m_pSDPFileHeader->SetPropertyULONG32 ("StreamingPauseSupport", 
+             (m_pIsMethodSupported [PAUSE] ? 1 : 0) );
+
     }
 
   cleanup:
@@ -11371,7 +11460,7 @@
 }
 
 HX_RESULT
-RTSPClientProtocol::CreateUDPSockets(UINT32 ulStream, UINT16 uPort)
+RTSPClientProtocol::CreateUDPSockets(UINT32 ulStream, UINT32 ulBitRate, UINT16 \
uPort)  {
     HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::CreateUDPSockets() str = %lu; port \
= %u",this, ulStream, uPort);  HX_RESULT           rc = HXR_OK;
@@ -11465,6 +11554,26 @@
             pUDPSocket1->SelectEvents(HX_SOCK_EVENT_READ|HX_SOCK_EVENT_CLOSE);
             pUDPSocket2->SelectEvents(HX_SOCK_EVENT_READ|HX_SOCK_EVENT_CLOSE);
         }
+
+
+#if defined(HELIX_CONFIG_SYMBIAN_UDP_BUFFER_SIZE)
+
+        const UINT32 MAX_UDPOPT_RECVBUF_SIZE = 256000 - 32000;// 256000 is the \
tcp/udp stack buffer limit. 32000 is reserved for other sockets. +        const \
UINT32 MIN_UDPOPT_RECVBUF_SIZE = 32000; +        const UINT32 \
MAX_SOCKET_READ_INTERVAL = 1000;  // millseconds, decided by the longest task inside \
helix for the single thread configuration. +        const UINT32 BURST_PROTECTION = \
2; // protection factor for the traffic burst +
+        UINT32 unUDPRecvBufSize = ulBitRate * MAX_SOCKET_READ_INTERVAL * \
BURST_PROTECTION / 8000; +
+        unUDPRecvBufSize = HX_MIN(MAX_UDPOPT_RECVBUF_SIZE, unUDPRecvBufSize);
+        unUDPRecvBufSize = HX_MAX(MIN_UDPOPT_RECVBUF_SIZE, unUDPRecvBufSize);
+
+        HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::CreateUDPSockets(): recv buffer \
limit %lu", this, unUDPRecvBufSize); +
+        pUDPSocket1->SetOption(HX_SOCKOPT_UDP_RCVBUF, unUDPRecvBufSize);
+#endif
+
+
     }
     else
     {


["rtspclnt.h.diff" (application/octet-stream)]

--- rtspclnt.h	2010-03-19 13:40:31.000000000 -0700
+++ rtspclnt.h.head	2010-03-19 13:28:16.000000000 -0700
@@ -1,5 +1,5 @@
 /* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id: rtspclnt.h,v 1.96.2.5 2009/07/14 19:53:03 jrathore Exp $
+ * Source last modified: $Id: rtspclnt.h,v 1.103 2009/07/14 19:37:59 jrathore Exp $
  *
  * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
  *
@@ -881,7 +881,7 @@
 
     STDMETHOD(InitPacketFilter)         (THIS_
                                         RawPacketFilter* pFilter);
-
+    
     /*
      *  IHXResendBufferControl methods
      */
@@ -992,7 +992,8 @@
     HX_RESULT handleOptionsResponse     (RTSPResponseMessage* pMsg,
                                          RTSPOptionsMessage*  pOptionsMsg);
     HX_RESULT handleGetParamResponse    (RTSPResponseMessage* pMsg);
-    HX_RESULT handleSetParamResponse    (RTSPResponseMessage* pMsg);
+    HX_RESULT handleSetParamResponse    (RTSPResponseMessage* pMsg, 
+                                         RTSPSetParamMessage* pReqMsg);
     HX_RESULT handleTeardownResponse    (RTSPResponseMessage* pMsg);
     HX_RESULT handlePlayResponse        (RTSPResponseMessage* pMsg,
                                         RTSPPlayMessage* pPlayMsg);
@@ -1127,7 +1128,7 @@
                                       UINT16        unNumHeader,
                                       REF(UINT32)   ulNumStream);
 
-    HX_RESULT   CreateUDPSockets(UINT32 ulStream, UINT16 ulPort);
+    HX_RESULT   CreateUDPSockets(UINT32 ulStream, UINT32 ulBitRate, UINT16 ulPort);
     RTSPTransport* GetTransport(UINT16 idxStream);
 
     HXBOOL                IsRealDataType(void);
@@ -1319,6 +1320,7 @@
     UINT32                              m_ulRegistryID;
     UINT32			        m_ulLastBWSent;	
     HXBOOL                              m_bHaveSentRemainingSetupRequests;
+    HXBOOL                              m_bSDBDisabled;
 
 #if defined(_MACINTOSH)
     RTSPClientProtocolCallback*         m_pCallback;

["rtspmsg.h.diff" (application/octet-stream)]

--- rtspmsg.h	2010-03-19 13:40:31.000000000 -0700
+++ rtspmsg.h.head	2010-03-19 13:28:16.000000000 -0700
@@ -1,5 +1,5 @@
 /* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id: rtspmsg.h,v 1.8 2007/07/06 20:51:36 jfinnecy Exp $
+ * Source last modified: $Id: rtspmsg.h,v 1.10 2009/11/04 08:57:06 atin Exp $
  * 
  * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
  * 
@@ -70,7 +70,7 @@
 class RTSPRange: public MIMEHeaderValue
 {
 public:
-    enum RangeType { TR_SMPTE, TR_CLOCK, TR_NPT } m_rangeType;
+    enum RangeType { TR_SMPTE, TR_CLOCK, TR_NPT, TR_BYTES } m_rangeType;
 
     RTSPRange(UINT32 begin, UINT32 end, RangeType rType);
 
@@ -279,9 +279,15 @@
 class RTSPSetParamMessage: public RTSPRequestMessage
 {
 public:
+    RTSPSetParamMessage() {m_MsgMode = T_UNKNOWN;}
+    enum SetParamMsgMode { T_UNKNOWN, T_SDB, T_KEEPALIVE};
     RTSPMessage::Tag tag() const { return RTSPMessage::T_SET_PARAM; }
     RTSPMethod GetMethod() const { return RTSP_SET_PARAM; }
     const char* tagStr() const { return "SET_PARAMETER"; }
+    SetParamMsgMode GetMsgMode() {return m_MsgMode;}
+    void SetMsgMode(SetParamMsgMode MsgMode) {m_MsgMode = MsgMode;}
+public:
+    SetParamMsgMode m_MsgMode;
 };
 
 class RTSPGetParamMessage: public RTSPRequestMessage


_______________________________________________
Protocol-dev mailing list
Protocol-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/protocol-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic