[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-protocol-cvs
Subject: [Protocol-cvs] rtsp rateadaptinfo.cpp, 1.5.2.5,
From: jgordon () helixcommunity ! org
Date: 2006-01-19 22:44:29
[Download RAW message or body]
Update of /cvsroot/protocol/rtsp
In directory cvs:/tmp/cvs-serv12007
Modified Files:
Tag: hxclient_1_5_0_cayenne
rateadaptinfo.cpp rateadaptinfo.h
Log Message:
ynopsis
========
Partially addresses PR 157741 by adding preferences to the
RTSP client code.
Branches: hxclient_1_5_0_cayenne, head
Reviewer: gwright
Description
===========
For testing with helixsim, QA needs to be able to turn off
helix-adaptation seperately from 3gpp-adaptation. This change
adds two preferences, HelixAdaptation and 3GPPAdaptation which
control enabling each adaptation type seperately. The
ServerSideRateControl preference functionality remains intact -
ServerSideRateControl=0 will turn off both adaptation types
regardless of individual settings.
Files Affected
==============
protocol/rtsp/rateadaptinfo.cpp
protocol/rtsp/rateadaptinfo.h
Testing Performed
=================
Unit Tests:
-Verified correct (or no) adaptation selection in network trace for
the following scenarios, using helixsim:
- Server: helix-adaptation-support and 3gpp-adaptation-support
- Client: default (both on): helix-adaptation
- Client: helix-adaptation off: 3gpp-adaptation
- Client: 3gpp-adaptation-off: helix-adaptation
- Client: both off: no adaptation
- Client: SSRC off: no adaptation
- Client: SSRC and both off: no adaptation
- Server: helix-adaptation-support only
- Client: default (both on): helix-adaptation
- Client: helix-adaptation off: no adaptation
- Client: 3gpp-adaptation-off: helix-adaptation
- Client: both off: no adaptation
- Client: SSRC off: no adaptation
- Client: SSRC and both off: no adaptation
- Server: 3gpp-adaptation-support only
- Client: default (both on): 3gpp-adaptation
- Client: helix-adaptation off: 3gpp-adaptation
- Client: 3gpp-adaptation-off: no adaptation
- Client: both off: no adaptation
- Client: SSRC off: no adaptation
- Client: SSRC and both off: no adaptation
- Server: no adaptation support advertised
- Client: default (both on): no adaptation
- Client: helix-adaptation off: no adaptation
- Client: 3gpp-adaptation-off: no adaptation
- Client: both off: no adaptation
- Client: SSRC off: no adaptation
- Client: SSRC and both off: no adaptation
Integration Tests:
Leak Tests:
Performance Tests:
Platforms Tested: linux-2.2-libc6-gcc32-i586
Build verified: linux-2.2-libc6-gcc32-i586
QA Hints
===============
n/a
Index: rateadaptinfo.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v
retrieving revision 1.5.2.5
retrieving revision 1.5.2.6
diff -u -d -r1.5.2.5 -r1.5.2.6
--- rateadaptinfo.cpp 6 Jun 2005 20:18:26 -0000 1.5.2.5
+++ rateadaptinfo.cpp 19 Jan 2006 22:44:27 -0000 1.5.2.6
@@ -331,7 +331,8 @@
m_pContext(NULL),
m_pRateAdaptCtl(NULL),
m_pCCF(NULL),
- m_pNADU(NULL)
+ m_pNADU(NULL),
+ m_bHlxAdaptEnabled(TRUE)
{}
CHXRateAdaptationInfo::~CHXRateAdaptationInfo()
@@ -352,15 +353,23 @@
//Check to see if we want to disable server side rate
//adaptation.
IHXPreferences* pPrefs = NULL;
- BOOL bSSRC = TRUE;
+ HXBOOL bSSRC = TRUE;
+ HXBOOL bNADU = TRUE;
m_pContext->QueryInterface(IID_IHXPreferences, (void**)&pPrefs);
if( pPrefs )
{
+ ReadPrefBOOL( pPrefs, "HelixAdaptation", m_bHlxAdaptEnabled );
+ ReadPrefBOOL( pPrefs, "3GPPAdaptation", bNADU );
ReadPrefBOOL( pPrefs, "ServerSideRateControl", bSSRC );
+
+ if (!bSSRC)
+ {
+ m_bHlxAdaptEnabled = FALSE;
+ bNADU = FALSE;
+ }
HX_RELEASE(pPrefs);
}
-
- if( bSSRC )
+ if( m_bHlxAdaptEnabled || bNADU )
{
res = pContext->QueryInterface(IID_IHXClientRateAdaptControl,
(void**)&m_pRateAdaptCtl);
@@ -371,7 +380,7 @@
(void**)&m_pCCF);
}
- if (HXR_OK == res)
+ if (HXR_OK == res && bNADU)
{
res = pContext->QueryInterface(IID_IHX3gppNADU,
(void**)&m_pNADU);
@@ -411,20 +420,22 @@
{
res = HXR_POINTER;
}
- else if (m_pRateAdaptCtl && m_pNADU)
+ else if (m_pRateAdaptCtl)
{
ULONG32 ulReportFreq = 0;
ULONG32 ulHelixAdaptation = 0;
AdaptationHeaderType hdrType = ahtUnknown;
- if (HXR_OK == pHdr->GetPropertyULONG32("Helix-Adaptation-Support",
+ if (m_bHlxAdaptEnabled &&
+ HXR_OK == pHdr->GetPropertyULONG32("Helix-Adaptation-Support",
ulHelixAdaptation) &&
(1 == ulHelixAdaptation))
{
ulReportFreq = 1;
hdrType = ahtHelix;
}
- else if (HXR_OK == pHdr->GetPropertyULONG32("3GPP-Adaptation-Support",
+ else if (m_pNADU &&
+ HXR_OK == pHdr->GetPropertyULONG32("3GPP-Adaptation-Support",
ulReportFreq))
{
hdrType = aht3GPP;
@@ -547,7 +558,7 @@
// Disable client rate adaptation for this stream
res = m_pRateAdaptCtl->Disable(uStreamNumber);
- if (HXR_OK == res)
+ if (HXR_OK == res && m_pNADU)
{
// Notify the IHX3gppNADU object of the negotiated
// parameters
Index: rateadaptinfo.h
===================================================================
RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- rateadaptinfo.h 16 Feb 2005 20:26:02 -0000 1.5
+++ rateadaptinfo.h 19 Jan 2006 22:44:27 -0000 1.5.2.1
@@ -101,5 +101,6 @@
IHXCommonClassFactory* m_pCCF;
CHXSimpleList m_streamInfo;
IHX3gppNADU* m_pNADU;
+ HXBOOL m_bHlxAdaptEnabled;
};
#endif /* RATEADAPTINFO_H */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic