|
List Info
Thread: CR-Client Bug 5017:Bandwidth header sent when server has agreed to do Helix Rate Adaptation
|
|
| CR-Client Bug 5017:Bandwidth header sent
when server has agreed to do Helix Rate
Adaptation |

|
2006-07-11 18:50:37 |
Modified by: ajaiswal real.com
Suggested reviewer: Henry Ping
Date: 07-11-2006
Project: client, protocol
Branch:HEAD, hxclient_1_5_0_cayenne, 210Cays
Synopsis: Bandwidth header sent when server has agreed to do
Helix Rate
Adaptation
Overview:
Client is sending SetDeliveryBandwidth SET_PARAMETER
messages to the server
thus
attempting to do client side rate adaptation even though
server side rate
adaptation has
been negotiated. That is, if client offered rate adaptation
by placing
Helix-Adaptation or
3GPP-Adaptation headers into SETUP request and server
accepted the rate
adaptation
in the SETUP response by placing same header into SETUP
response then
client side
rate adaptation should not be preformed.
PS:
The fix incorporates Henry's review comment where he
suggested to disable
the client-side
rate adaption (at a higher level) by NOT
calling HXSM::RegisterSource() to prevent client
sending SetDeliveryBandwidth in SET_PARAMETER messages when
server has agreed
to do Helix Rate Adaptation.
Fix:
To fix this problem a new flag m_bRateAdaptationUsed and
IsRateAdaptationUsed()
interface added in CHXRateAdaptationInfo which tells client
that server
side rate
adaptation has been negotiated.
Current fix prevents client to issue HXSM::RegisterSource()
if server side
rate adaptation
has already been negotiated.
Files Modified:
protocol/rtsp/rtspclnt.cpp
protocol/rtsp/pub/rtspclnt.h
protocol/rtsp/rateadaptinfo.cpp
protocol/rtsp/rateadaptinfo.h
client/core/rtspprotocol.cpp
client/core/rtspprotocol.h
client/core/srcinfo.cpp
client/core/hxntsrc.cpp
client/core/hxbsrc.h
client/core/hxntsrc.h
client/core/hxprotocol.h
Image Size and Heap Use impact:
Minor
Platforms and Profiles Affected:
all
Distribution Libraries Affected:
none
Distribution library impact and planned action:
n/a
Platforms and Profiles Build Verified:
win32-i386-vc7, helix-client-all-defines
Platforms and Profiles Functionality verified:
win32-i386-vc7, helix-client-all-defines
Branch:
HEAD, hxclient_1_5_0_cayenne
Diffs:
Index: rtspclnt.cpp
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.148.2.39
diff -u -w -r1.148.2.39 rtspclnt.cpp
--- rtspclnt.cpp 14 Jun 2006 12:27:34 -0000
1.148.2.39
+++ rtspclnt.cpp 11 Jul 2006 18:09:06 -0000
 -8884,6
+8884,17 
return hr;
}
+HXBOOL
+ RTSPClientProtocol::IsRateAdaptationUsed()
+{
+ HXBOOL bRateAdaptationUsed = FALSE;
+ if (m_pRateAdaptInfo)
+ {
+ bRateAdaptationUsed =
m_pRateAdaptInfo->IsRateAdaptationUsed();
+ }
+ return bRateAdaptationUsed;
+}
+
STDMETHODIMP
RTSPClientProtocol::SetDeliveryBandwidth(UINT32
ulBandwidth, UINT32
ulMsBackOff)
{
Index: pub/rtspclnt.h
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
retrieving revision 1.63.2.15
diff -u -w -r1.63.2.15 rtspclnt.h
--- pub/rtspclnt.h 14 Jun 2006 12:38:39 -0000
1.63.2.15
+++ pub/rtspclnt.h 11 Jul 2006 18:09:08 -0000
 -943,6
+943,7 
void EnterPrefetch (void) {
m_bPrefetch = TRUE; };
void LeavePrefetch (void);
void EnterFastStart (void);
+ HXBOOL IsRateAdaptationUsed (void);
void LeaveFastStart (void);
void InitCloak (UINT16*
pCloakPorts, UINT8
nCloakPorts, IHXValues* pValues);
UINT16 GetCloakPortSucceeded (void);
Index: rateadaptinfo.cpp
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v
retrieving revision 1.5.2.7
diff -u -w -r1.5.2.7 rateadaptinfo.cpp
--- rateadaptinfo.cpp 23 Mar 2006 19:41:20 -0000
1.5.2.7
+++ rateadaptinfo.cpp 11 Jul 2006 18:08:51 -0000
 -360,7
+360,8 
m_pRateAdaptCtl(NULL),
m_pCCF(NULL),
m_pNADU(NULL),
- m_bHlxAdaptEnabled(TRUE)
+ m_bHlxAdaptEnabled(TRUE),
+ m_bRateAdaptationUsed(FALSE)
{}
CHXRateAdaptationInfo::~CHXRateAdaptationInfo()
 -576,6
+577,7 
if (pReqField->GetSize() ==
pRespField->GetSize() &&
!memcmp(pReqField->GetBuffer(),
pRespField->GetBuffer(), pReqField->GetSize()) )
{
+ m_bRateAdaptationUsed = TRUE;
hr = HXR_OK;
}
}
Index: rateadaptinfo.h
============================================================
=======
RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.h,v
retrieving revision 1.5.2.1
diff -u -w -r1.5.2.1 rateadaptinfo.h
--- rateadaptinfo.h 19 Jan 2006 22:44:27 -0000
1.5.2.1
+++ rateadaptinfo.h 11 Jul 2006 18:08:51 -0000
 -88,6
+88,7 
IHXValues* pRespHdrs);
+ HXBOOL IsRateAdaptationUsed() {return
m_bRateAdaptationUsed;};
private:
HXRAIStreamInfo* GetStreamInfo(UINT16 uStreamNumber)
const;
void RemoveStreamInfo(UINT16 uStreamNumber);
 -102,5
+103,6 
CHXSimpleList m_streamInfo;
IHX3gppNADU* m_pNADU;
HXBOOL m_bHlxAdaptEnabled;
+ HXBOOL m_bRateAdaptationUsed;
};
#endif /* RATEADAPTINFO_H */
Index: rtspprotocol.cpp
============================================================
=======
RCS file: /cvsroot/client/core/rtspprotocol.cpp,v
retrieving revision 1.55.2.12
diff -u -w -r1.55.2.12 rtspprotocol.cpp
--- rtspprotocol.cpp 23 Mar 2006 23:07:06 -0000
1.55.2.12
+++ rtspprotocol.cpp 11 Jul 2006 18:07:27 -0000
 -145,6
+145,7 
, m_bUseRTP(FALSE)
, m_bReceivedData(FALSE)
, m_bMulticastOnly(FALSE)
+, m_bRateAdaptationUsed(FALSE)
, m_idleState(NULL_STATE)
, m_pIDInfo(NULL)
, m_pRequest(NULL)
 -1083,6
+1084,17 
return;
}
+HXBOOL
+RTSPProtocol::IsRateAdaptationUsed(void)
+{
+ HXBOOL bRateAdaptationUsed = FALSE;
+ if (m_pProtocolLib)
+ {
+ bRateAdaptationUsed =
((RTSPClientProtocol*)m_pProtocolLib)->IsRateAdaptationUs
ed();
+ }
+ return bRateAdaptationUsed ;
+}
+
/*
* If this is multicast, make sure to send subscribe msg
*/
Index: rtspprotocol.h
============================================================
=======
RCS file: /cvsroot/client/core/rtspprotocol.h,v
retrieving revision 1.17.2.1
diff -u -w -r1.17.2.1 rtspprotocol.h
--- rtspprotocol.h 22 Apr 2005 20:57:17 -0000
1.17.2.1
+++ rtspprotocol.h 11 Jul 2006 18:07:28 -0000
 -372,6
+372,7 
virtual void EnterFastStart (void);
virtual void LeaveFastStart (void);
+ virtual HXBOOL IsRateAdaptationUsed (void);
protected:
LONG32 m_lRefCount;
DECLARE_SMART_POINTER
 -429,6
+430,7 
private:
BOOL m_bSocketsInited;
CHXString m_strUserAgent;
+ HXBOOL m_bRateAdaptationUsed;
void hackCookie(IHXBuffer* pCookie);
HX_RESULT SwitchToUnicast(void);
Index: srcinfo.cpp
============================================================
=======
RCS file: /cvsroot/client/core/srcinfo.cpp,v
retrieving revision 1.42.4.10
diff -u -w -r1.42.4.10 srcinfo.cpp
--- srcinfo.cpp 17 Apr 2006 18:21:28 -0000 1.42.4.10
+++ srcinfo.cpp 11 Jul 2006 18:07:32 -0000
 -1647,15
+1647,15 
HX_RESULT theErr = HXR_OK;
if (!m_bIsRegisterSourceDone)
{
+ m_pSource->CanBeFastStarted();
+ if (!m_pSource->IsRateAdaptationUsed())
+ {
m_bIsRegisterSourceDone = TRUE;
if (m_pSource->m_bSureStreamClip)
{
m_pPlayer->SureStreamSourceRegistered(this);
}
-
- m_pSource->CanBeFastStarted();
-
#if defined(HELIX_FEATURE_ASM)
/* Register Source with ASM Bandwidth Manager
*/
IHXBandwidthManager* pMgr = 0;
HX_VERIFY(HXR_OK ==
m_pPlayer->QueryInterface(
IID_IHXBandwidthManager, (void
**)&pMgr));
theErr = pMgr->RegisterSource(m_pSource,
(IUnknown*)
(IHXPlayer*) m_pPlayer);
 -1667,6
+1667,7 
pMgr->Release();
#endif /* HELIX_FEATURE_ASM */
}
+ }
return theErr;
}
Index: hxbsrc.h
============================================================
=======
RCS file: /cvsroot/client/core/hxbsrc.h,v
retrieving revision 1.35.2.5
diff -u -w -r1.35.2.5 hxbsrc.h
--- hxbsrc.h 30 Sep 2005 17:36:27 -0000 1.35.2.5
+++ hxbsrc.h 11 Jul 2006 18:07:00 -0000
 -314,6
+314,7 
protected:
HX_BITFIELD m_bDefaultAltURL :
1;
+ HXBOOL m_bRateAdaptationUsed;
public:
HXSource(void);
 -794,6
+795,7 
void
SetMaxPossibleAccelRatio(double maxR)
{m_maxPossibleAccelRatio = maxR;};
virtual void EnterFastStart(void) {
m_bFastStart = TRUE; };
+ virtual HXBOOL
IsRateAdaptationUsed(void) { return
m_bRateAdaptationUsed; };
virtual void
LeaveFastStart(TurboPlayOffReason leftReason);
virtual BOOL CanBeFastStarted(void);
Index: hxntsrc.cpp
============================================================
=======
RCS file: /cvsroot/client/core/hxntsrc.cpp,v
retrieving revision 1.118.2.13
diff -u -w -r1.118.2.13 hxntsrc.cpp
--- hxntsrc.cpp 26 Dec 2005 14:51:20 -0000 1.118.2.13
+++ hxntsrc.cpp 11 Jul 2006 18:07:08 -0000
 -2168,6
+2168,16 
return;
}
+HXBOOL HXNetSource::IsRateAdaptationUsed(void)
+{
+ HXBOOL bRateAdaptationUsed = FALSE;
+ if (m_pProto)
+ {
+ bRateAdaptationUsed =
m_pProto->IsRateAdaptationUsed();
+ }
+ return bRateAdaptationUsed ;
+}
+
void
HXNetSource::EnterFastStart(void)
{
Index: hxntsrc.h
============================================================
=======
RCS file: /cvsroot/client/core/hxntsrc.h,v
retrieving revision 1.38.2.3
diff -u -w -r1.38.2.3 hxntsrc.h
--- hxntsrc.h 23 May 2005 20:22:57 -0000 1.38.2.3
+++ hxntsrc.h 11 Jul 2006 18:07:08 -0000
 -287,6
+287,7 
virtual BOOL IsPrefetchDone(void) {
return !m_bPrefetch; };
virtual void EnterFastStart(void);
+ virtual HXBOOL
IsRateAdaptationUsed(void);
virtual void
LeaveFastStart(TurboPlayOffReason leftReason);
virtual HX_RESULT FillRecordControl();
Index: hxprotocol.h
============================================================
=======
RCS file: /cvsroot/client/core/hxprotocol.h,v
retrieving revision 1.8
diff -u -w -r1.8 hxprotocol.h
--- hxprotocol.h 28 Oct 2004 20:16:50 -0000 1.8
+++ hxprotocol.h 11 Jul 2006 18:07:24 -0000
 -275,6
+275,7 
virtual HX_RESULT AutoBWCalibrationDone (HX_RESULT
status,
UINT32
ulBW) {
return HXR_OK; };
+ virtual HXBOOL IsRateAdaptationUsed (void) {
return
m_bRateAdaptationUsed; };
protected:
UINT8 mProxyVersion : 8; //
protocol
version for proxy
 -326,6
+327,7 
UINT16* m_pCloakPorts;
UINT8 m_nCloakPorts;
+ HXBOOL m_bRateAdaptationUsed ;
// ID info
CHXString m_clientID; // string
to hold clientID
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| CR-Client Bug 5017:Bandwidth header sent
when server has agreed to do Helix Rate
Adaptation |

|
2006-07-11 19:04:38 |
Currently HXPlayer::RegisterSourcesDone calls
m_pBandwidthMgr->NotEnoughBandwidth()? This allows not to
stream clips
beyond the MaximumBandwidth.
Does this chagne still allow HXPlayer::RegisterSourcesDone()
to be
called so that maximum bandwidth checking works.
Thanks
Ashish
>-----Original Message-----
>From: protocol-dev-bounces helixcommunity.org
>[mailto:protocol-dev-bounces helixcommunity.org] On
Behalf Of
>ext Anil Jaiswal
>Sent: Tuesday, July 11, 2006 1:51 PM
>To: protocol-dev helixcommunity.org; client-dev helixcommunity.org
>Subject: [Protocol-dev] CR-Client Bug 5017:Bandwidth
header
>sent when server has agreed to do Helix Rate Adaptation
>
>
>Modified by: ajaiswal real.com
>Suggested reviewer: Henry Ping
>Date: 07-11-2006
>Project: client, protocol
>Branch:HEAD, hxclient_1_5_0_cayenne, 210Cays
>
>Synopsis: Bandwidth header sent when server has agreed
to do
>Helix Rate Adaptation
>
>Overview:
>Client is sending SetDeliveryBandwidth SET_PARAMETER
messages
>to the server thus attempting to do client side rate
>adaptation even though server side rate adaptation has
been
>negotiated. That is, if client offered rate adaptation
by
>placing Helix-Adaptation or 3GPP-Adaptation headers into
SETUP
>request and server accepted the rate adaptation in the
SETUP
>response by placing same header into SETUP response then
>client side rate adaptation should not be preformed.
>
>PS:
>The fix incorporates Henry's review comment where he
suggested
>to disable the client-side rate adaption (at a higher
level)
>by NOT calling HXSM::RegisterSource() to prevent
client
>sending SetDeliveryBandwidth in SET_PARAMETER messages
when
>server has agreed to do Helix Rate Adaptation.
>
>Fix:
>To fix this problem a new flag m_bRateAdaptationUsed and
>IsRateAdaptationUsed() interface added in
>CHXRateAdaptationInfo which tells client that server
side rate
>adaptation has been negotiated.
>Current fix prevents client to issue
HXSM::RegisterSource()
>if server side rate adaptation has already been
negotiated.
>
>Files Modified:
>protocol/rtsp/rtspclnt.cpp
>protocol/rtsp/pub/rtspclnt.h
>protocol/rtsp/rateadaptinfo.cpp
>protocol/rtsp/rateadaptinfo.h
>client/core/rtspprotocol.cpp
>client/core/rtspprotocol.h
>client/core/srcinfo.cpp
>client/core/hxntsrc.cpp
>client/core/hxbsrc.h
>client/core/hxntsrc.h
>client/core/hxprotocol.h
>
>Image Size and Heap Use impact:
>Minor
>
>Platforms and Profiles Affected:
>all
>
>Distribution Libraries Affected:
>none
>
>Distribution library impact and planned action:
>n/a
>
>Platforms and Profiles Build Verified:
>win32-i386-vc7, helix-client-all-defines
>
>Platforms and Profiles Functionality verified:
>win32-i386-vc7, helix-client-all-defines
>
>Branch:
>HEAD, hxclient_1_5_0_cayenne
>
>Diffs:
>
>Index: rtspclnt.cpp
>========================================================
===========
>RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
>retrieving revision 1.148.2.39
>diff -u -w -r1.148.2.39 rtspclnt.cpp
>--- rtspclnt.cpp 14 Jun 2006 12:27:34 -0000
1.148.2.39
>+++ rtspclnt.cpp 11 Jul 2006 18:09:06 -0000
> -8884,6 +8884,17 
> return hr;
> }
>
>+HXBOOL
>+ RTSPClientProtocol::IsRateAdaptationUsed()
>+{
>+ HXBOOL bRateAdaptationUsed = FALSE;
>+ if (m_pRateAdaptInfo)
>+ {
>+ bRateAdaptationUsed =
>m_pRateAdaptInfo->IsRateAdaptationUsed();
>+ }
>+ return bRateAdaptationUsed;
>+}
>+
> STDMETHODIMP
> RTSPClientProtocol::SetDeliveryBandwidth(UINT32
ulBandwidth, UINT32
>ulMsBackOff)
> {
>Index: pub/rtspclnt.h
>========================================================
===========
>RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
>retrieving revision 1.63.2.15
>diff -u -w -r1.63.2.15 rtspclnt.h
>--- pub/rtspclnt.h 14 Jun 2006 12:38:39 -0000
1.63.2.15
>+++ pub/rtspclnt.h 11 Jul 2006 18:09:08 -0000
> -943,6 +943,7 
> void EnterPrefetch (void) {
m_bPrefetch
>= TRUE; };
> void LeavePrefetch (void);
> void EnterFastStart (void);
>+ HXBOOL IsRateAdaptationUsed (void);
> void LeaveFastStart (void);
> void InitCloak (UINT16*
pCloakPorts, UINT8
>nCloakPorts, IHXValues* pValues);
> UINT16 GetCloakPortSucceeded (void);
>Index: rateadaptinfo.cpp
>========================================================
===========
>RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v
>retrieving revision 1.5.2.7
>diff -u -w -r1.5.2.7 rateadaptinfo.cpp
>--- rateadaptinfo.cpp 23 Mar 2006 19:41:20 -0000
1.5.2.7
>+++ rateadaptinfo.cpp 11 Jul 2006 18:08:51 -0000
> -360,7 +360,8 
> m_pRateAdaptCtl(NULL),
> m_pCCF(NULL),
> m_pNADU(NULL),
>- m_bHlxAdaptEnabled(TRUE)
>+ m_bHlxAdaptEnabled(TRUE),
>+ m_bRateAdaptationUsed(FALSE)
> {}
>
> CHXRateAdaptationInfo::~CHXRateAdaptationInfo()
> -576,6 +577,7 
> if (pReqField->GetSize() ==
pRespField->GetSize() &&
> !memcmp(pReqField->GetBuffer(),
>pRespField->GetBuffer(), pReqField->GetSize()) )
> {
>+ m_bRateAdaptationUsed = TRUE;
> hr = HXR_OK;
> }
> }
>Index: rateadaptinfo.h
>========================================================
===========
>RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.h,v
>retrieving revision 1.5.2.1
>diff -u -w -r1.5.2.1 rateadaptinfo.h
>--- rateadaptinfo.h 19 Jan 2006 22:44:27 -0000
1.5.2.1
>+++ rateadaptinfo.h 11 Jul 2006 18:08:51 -0000
> -88,6 +88,7 
> IHXValues*
pRespHdrs);
>
>
>+ HXBOOL IsRateAdaptationUsed() {return
m_bRateAdaptationUsed;};
> private:
> HXRAIStreamInfo* GetStreamInfo(UINT16
uStreamNumber) const;
> void RemoveStreamInfo(UINT16 uStreamNumber);  -102,5
+103,6 
> CHXSimpleList m_streamInfo;
> IHX3gppNADU* m_pNADU;
> HXBOOL m_bHlxAdaptEnabled;
>+ HXBOOL m_bRateAdaptationUsed;
> };
> #endif /* RATEADAPTINFO_H */
>
>
>Index: rtspprotocol.cpp
>========================================================
===========
>RCS file: /cvsroot/client/core/rtspprotocol.cpp,v
>retrieving revision 1.55.2.12
>diff -u -w -r1.55.2.12 rtspprotocol.cpp
>--- rtspprotocol.cpp 23 Mar 2006 23:07:06 -0000
1.55.2.12
>+++ rtspprotocol.cpp 11 Jul 2006 18:07:27 -0000
> -145,6 +145,7 
> , m_bUseRTP(FALSE)
> , m_bReceivedData(FALSE)
> , m_bMulticastOnly(FALSE)
>+, m_bRateAdaptationUsed(FALSE)
> , m_idleState(NULL_STATE)
> , m_pIDInfo(NULL)
> , m_pRequest(NULL)
> -1083,6 +1084,17 
> return;
> }
>
>+HXBOOL
>+RTSPProtocol::IsRateAdaptationUsed(void)
>+{
>+ HXBOOL bRateAdaptationUsed = FALSE;
>+ if (m_pProtocolLib)
>+ {
>+ bRateAdaptationUsed =
>((RTSPClientProtocol*)m_pProtocolLib)->IsRateAdaptati
onUsed();
>+ }
>+ return bRateAdaptationUsed ;
>+}
>+
> /*
> * If this is multicast, make sure to send subscribe
msg
> */
>Index: rtspprotocol.h
>========================================================
===========
>RCS file: /cvsroot/client/core/rtspprotocol.h,v
>retrieving revision 1.17.2.1
>diff -u -w -r1.17.2.1 rtspprotocol.h
>--- rtspprotocol.h 22 Apr 2005 20:57:17 -0000
1.17.2.1
>+++ rtspprotocol.h 11 Jul 2006 18:07:28 -0000
> -372,6 +372,7 
> virtual void EnterFastStart (void);
> virtual void LeaveFastStart (void);
>
>+ virtual HXBOOL IsRateAdaptationUsed
(void);
> protected:
> LONG32 m_lRefCount;
> DECLARE_SMART_POINTER
> -429,6 +430,7 
> private:
> BOOL m_bSocketsInited;
> CHXString m_strUserAgent;
>+ HXBOOL
m_bRateAdaptationUsed;
>
> void hackCookie(IHXBuffer* pCookie);
> HX_RESULT SwitchToUnicast(void);
>
>Index: srcinfo.cpp
>========================================================
===========
>RCS file: /cvsroot/client/core/srcinfo.cpp,v
>retrieving revision 1.42.4.10
>diff -u -w -r1.42.4.10 srcinfo.cpp
>--- srcinfo.cpp 17 Apr 2006 18:21:28 -0000
1.42.4.10
>+++ srcinfo.cpp 11 Jul 2006 18:07:32 -0000
> -1647,15 +1647,15 
> HX_RESULT theErr = HXR_OK;
> if (!m_bIsRegisterSourceDone)
> {
>+ m_pSource->CanBeFastStarted();
>+ if (!m_pSource->IsRateAdaptationUsed())
>+ {
> m_bIsRegisterSourceDone = TRUE;
> if (m_pSource->m_bSureStreamClip)
> {
>
m_pPlayer->SureStreamSourceRegistered(this);
> }
>-
>- m_pSource->CanBeFastStarted();
>-
> #if defined(HELIX_FEATURE_ASM)
> /* Register Source with ASM Bandwidth
Manager */
> IHXBandwidthManager* pMgr = 0;
>
> HX_VERIFY(HXR_OK ==
m_pPlayer->QueryInterface(
> IID_IHXBandwidthManager, (void
**)&pMgr));
>
> theErr = pMgr->RegisterSource(m_pSource,
(IUnknown*)
>(IHXPlayer*) m_pPlayer);
> -1667,6 +1667,7 
> pMgr->Release();
>#endif /* HELIX_FEATURE_ASM */
> }
>+ }
>
> return theErr;
> }
>
>Index: hxbsrc.h
>========================================================
===========
>RCS file: /cvsroot/client/core/hxbsrc.h,v
>retrieving revision 1.35.2.5
>diff -u -w -r1.35.2.5 hxbsrc.h
>--- hxbsrc.h 30 Sep 2005 17:36:27 -0000 1.35.2.5
>+++ hxbsrc.h 11 Jul 2006 18:07:00 -0000
> -314,6 +314,7 
>
> protected:
> HX_BITFIELD
m_bDefaultAltURL : 1;
>+ HXBOOL
m_bRateAdaptationUsed;
>
> public:
> HXSource(void);
> -794,6 +795,7 
> void
>SetMaxPossibleAccelRatio(double maxR)
>{m_maxPossibleAccelRatio = maxR;};
>
> virtual void EnterFastStart(void) {
>m_bFastStart = TRUE; };
>+ virtual HXBOOL
IsRateAdaptationUsed(void) { return
>m_bRateAdaptationUsed; };
> virtual void
>LeaveFastStart(TurboPlayOffReason leftReason);
>
> virtual BOOL CanBeFastStarted(void);
>Index: hxntsrc.cpp
>========================================================
===========
>RCS file: /cvsroot/client/core/hxntsrc.cpp,v
>retrieving revision 1.118.2.13
>diff -u -w -r1.118.2.13 hxntsrc.cpp
>--- hxntsrc.cpp 26 Dec 2005 14:51:20 -0000
1.118.2.13
>+++ hxntsrc.cpp 11 Jul 2006 18:07:08 -0000
> -2168,6 +2168,16 
> return;
> }
>
>+HXBOOL HXNetSource::IsRateAdaptationUsed(void)
>+{
>+ HXBOOL bRateAdaptationUsed = FALSE;
>+ if (m_pProto)
>+ {
>+ bRateAdaptationUsed =
m_pProto->IsRateAdaptationUsed();
>+ }
>+ return bRateAdaptationUsed ;
>+}
>+
> void
> HXNetSource::EnterFastStart(void)
> {
>Index: hxntsrc.h
>========================================================
===========
>RCS file: /cvsroot/client/core/hxntsrc.h,v
>retrieving revision 1.38.2.3
>diff -u -w -r1.38.2.3 hxntsrc.h
>--- hxntsrc.h 23 May 2005 20:22:57 -0000 1.38.2.3
>+++ hxntsrc.h 11 Jul 2006 18:07:08 -0000
> -287,6 +287,7 
> virtual BOOL IsPrefetchDone(void) {
return
>!m_bPrefetch; };
>
> virtual void EnterFastStart(void);
>+ virtual HXBOOL
IsRateAdaptationUsed(void);
> virtual void
>LeaveFastStart(TurboPlayOffReason leftReason);
>
> virtual HX_RESULT FillRecordControl();
>Index: hxprotocol.h
>========================================================
===========
>RCS file: /cvsroot/client/core/hxprotocol.h,v
>retrieving revision 1.8
>diff -u -w -r1.8 hxprotocol.h
>--- hxprotocol.h 28 Oct 2004 20:16:50 -0000
1.8
>+++ hxprotocol.h 11 Jul 2006 18:07:24 -0000
> -275,6 +275,7 
>
> virtual HX_RESULT AutoBWCalibrationDone
(HX_RESULT status,
>
UINT32 ulBW) {
>return HXR_OK; };
>+ virtual HXBOOL IsRateAdaptationUsed (void)
{ return
>m_bRateAdaptationUsed; };
> protected:
>
> UINT8 mProxyVersion : 8;
// protocol
>version for proxy
> -326,6 +327,7 
>
> UINT16* m_pCloakPorts;
> UINT8 m_nCloakPorts;
>+ HXBOOL m_bRateAdaptationUsed ;
>
> // ID info
> CHXString m_clientID; //
string to
>hold clientID
>
>
>
>_______________________________________________
>Protocol-dev mailing list
>Protocol-dev helixcommunity.org
>http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
>
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
| CR-Client Bug 5017:Bandwidth header sent
when server has agreed to do Helix Rate
Adaptation |

|
2006-07-12 00:13:11 |
> --- srcinfo.cpp 17 Apr 2006 18:21:28 -0000
1.42.4.10
> +++ srcinfo.cpp 11 Jul 2006 18:07:32 -0000
>  -1647,15 +1647,15 
> HX_RESULT theErr = HXR_OK;
> if (!m_bIsRegisterSourceDone)
> {
> + m_pSource->CanBeFastStarted();
> + if (!m_pSource->IsRateAdaptationUsed())
> + {
> m_bIsRegisterSourceDone = TRUE;
> if (m_pSource->m_bSureStreamClip)
> {
>
m_pPlayer->SureStreamSourceRegistered(this);
> }
> -
> - m_pSource->CanBeFastStarted();
> -
> #if defined(HELIX_FEATURE_ASM)
> /* Register Source with ASM Bandwidth
Manager */
> IHXBandwidthManager* pMgr = 0;
We need to also move SureStreamSourceRegistered() prior
CanBeFastStarted()
because it's used by the latter to determine whether
TurboPlay can be
enforced.
> +HXBOOL
> +RTSPProtocol::IsRateAdaptationUsed(void)
> +{
> + HXBOOL bRateAdaptationUsed = FALSE;
> + if (m_pProtocolLib)
> + {
> + bRateAdaptationUsed =
>
((RTSPClientProtocol*)m_pProtocolLib)->IsRateAdaptationUs
ed();
> + }
> + return bRateAdaptationUsed ;
> +}
> +
The typecast is OK for Cay150, but it's not safe on HEAD
since
RTSPClientProtocol is changed to be dynamically loaded from
a plugin instead
of statically linked in from a lib.
I suggest to add IsRateAdaptationUsed() to
IHXRTSPClientProtocol2 defined in
protocol/transport/common/system/pub/rtspif.h, then calling
it via that
interface.
The rest looks good.
-->Henry
> -----Original Message-----
> From: protocol-dev-bounces helixcommunity.org
> [mailto:protocol-dev-bounces helixcommunity.org] On
Behalf Of
> Anil Jaiswal
> Sent: Tuesday, July 11, 2006 11:51 AM Ping
> To: protocol-dev helixcommunity.org; client-dev helixcommunity.org
> Subject: [Protocol-dev] CR-Client Bug 5017:Bandwidth
header
> sent when server has agreed to do Helix Rate Adaptation
>
>
> Modified by: ajaiswal real.com
> Suggested reviewer: Henry Ping
> Date: 07-11-2006
> Project: client, protocol
> Branch:HEAD, hxclient_1_5_0_cayenne, 210Cays
>
> Synopsis: Bandwidth header sent when server has agreed
to do
> Helix Rate Adaptation
>
> Overview:
> Client is sending SetDeliveryBandwidth SET_PARAMETER
messages
> to the server thus attempting to do client side rate
> adaptation even though server side rate adaptation has
been
> negotiated. That is, if client offered rate adaptation
by
> placing Helix-Adaptation or 3GPP-Adaptation headers
into
> SETUP request and server accepted the rate adaptation
in the
> SETUP response by placing same header into SETUP
response
> then client side rate adaptation should not be
preformed.
>
> PS:
> The fix incorporates Henry's review comment where he
> suggested to disable the client-side rate adaption (at
a
> higher level) by NOT calling HXSM::RegisterSource()
to
> prevent client sending SetDeliveryBandwidth in
SET_PARAMETER
> messages when server has agreed to do Helix Rate
Adaptation.
>
> Fix:
> To fix this problem a new flag m_bRateAdaptationUsed
and
> IsRateAdaptationUsed() interface added in
> CHXRateAdaptationInfo which tells client that server
side
> rate adaptation has been negotiated.
> Current fix prevents client to issue
HXSM::RegisterSource()
> if server side rate adaptation has already been
negotiated.
>
> Files Modified:
> protocol/rtsp/rtspclnt.cpp
> protocol/rtsp/pub/rtspclnt.h
> protocol/rtsp/rateadaptinfo.cpp
> protocol/rtsp/rateadaptinfo.h
> client/core/rtspprotocol.cpp
> client/core/rtspprotocol.h
> client/core/srcinfo.cpp
> client/core/hxntsrc.cpp
> client/core/hxbsrc.h
> client/core/hxntsrc.h
> client/core/hxprotocol.h
>
> Image Size and Heap Use impact:
> Minor
>
> Platforms and Profiles Affected:
> all
>
> Distribution Libraries Affected:
> none
>
> Distribution library impact and planned action:
> n/a
>
> Platforms and Profiles Build Verified:
> win32-i386-vc7, helix-client-all-defines
>
> Platforms and Profiles Functionality verified:
> win32-i386-vc7, helix-client-all-defines
>
> Branch:
> HEAD, hxclient_1_5_0_cayenne
>
> Diffs:
>
> Index: rtspclnt.cpp
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
> retrieving revision 1.148.2.39
> diff -u -w -r1.148.2.39 rtspclnt.cpp
> --- rtspclnt.cpp 14 Jun 2006 12:27:34 -0000
1.148.2.39
> +++ rtspclnt.cpp 11 Jul 2006 18:09:06 -0000
>  -8884,6 +8884,17 
> return hr;
> }
>
> +HXBOOL
> + RTSPClientProtocol::IsRateAdaptationUsed()
> +{
> + HXBOOL bRateAdaptationUsed = FALSE;
> + if (m_pRateAdaptInfo)
> + {
> + bRateAdaptationUsed =
> m_pRateAdaptInfo->IsRateAdaptationUsed();
> + }
> + return bRateAdaptationUsed;
> +}
> +
> STDMETHODIMP
> RTSPClientProtocol::SetDeliveryBandwidth(UINT32
ulBandwidth, UINT32
> ulMsBackOff)
> {
> Index: pub/rtspclnt.h
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/pub/rtspclnt.h,v
> retrieving revision 1.63.2.15
> diff -u -w -r1.63.2.15 rtspclnt.h
> --- pub/rtspclnt.h 14 Jun 2006 12:38:39 -0000
1.63.2.15
> +++ pub/rtspclnt.h 11 Jul 2006 18:09:08 -0000
>  -943,6 +943,7 
> void EnterPrefetch (void) {
> m_bPrefetch = TRUE; };
> void LeavePrefetch (void);
> void EnterFastStart (void);
> + HXBOOL IsRateAdaptationUsed (void);
> void LeaveFastStart (void);
> void InitCloak (UINT16*
pCloakPorts, UINT8
> nCloakPorts, IHXValues* pValues);
> UINT16 GetCloakPortSucceeded (void);
> Index: rateadaptinfo.cpp
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v
> retrieving revision 1.5.2.7
> diff -u -w -r1.5.2.7 rateadaptinfo.cpp
> --- rateadaptinfo.cpp 23 Mar 2006 19:41:20 -0000
1.5.2.7
> +++ rateadaptinfo.cpp 11 Jul 2006 18:08:51 -0000
>  -360,7 +360,8 
> m_pRateAdaptCtl(NULL),
> m_pCCF(NULL),
> m_pNADU(NULL),
> - m_bHlxAdaptEnabled(TRUE)
> + m_bHlxAdaptEnabled(TRUE),
> + m_bRateAdaptationUsed(FALSE)
> {}
>
> CHXRateAdaptationInfo::~CHXRateAdaptationInfo()
>  -576,6 +577,7 
> if (pReqField->GetSize() ==
pRespField->GetSize() &&
>
!memcmp(pReqField->GetBuffer(),
> pRespField->GetBuffer(), pReqField->GetSize()) )
> {
> + m_bRateAdaptationUsed = TRUE;
> hr = HXR_OK;
> }
> }
> Index: rateadaptinfo.h
>
============================================================
=======
> RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.h,v
> retrieving revision 1.5.2.1
> diff -u -w -r1.5.2.1 rateadaptinfo.h
> --- rateadaptinfo.h 19 Jan 2006 22:44:27 -0000
1.5.2.1
> +++ rateadaptinfo.h 11 Jul 2006 18:08:51 -0000
>  -88,6 +88,7 
> IHXValues*
pRespHdrs);
>
>
> + HXBOOL IsRateAdaptationUsed() {return
m_bRateAdaptationUsed;};
> private:
> HXRAIStreamInfo* GetStreamInfo(UINT16
uStreamNumber) const;
> void RemoveStreamInfo(UINT16 uStreamNumber);  -102,5
+103,6 
> CHXSimpleList m_streamInfo;
> IHX3gppNADU* m_pNADU;
> HXBOOL m_bHlxAdaptEnabled;
> + HXBOOL m_bRateAdaptationUsed;
> };
> #endif /* RATEADAPTINFO_H */
>
>
> Index: rtspprotocol.cpp
>
============================================================
=======
> RCS file: /cvsroot/client/core/rtspprotocol.cpp,v
> retrieving revision 1.55.2.12
> diff -u -w -r1.55.2.12 rtspprotocol.cpp
> --- rtspprotocol.cpp 23 Mar 2006 23:07:06 -0000
1.55.2.12
> +++ rtspprotocol.cpp 11 Jul 2006 18:07:27 -0000
>  -145,6 +145,7 
> , m_bUseRTP(FALSE)
> , m_bReceivedData(FALSE)
> , m_bMulticastOnly(FALSE)
> +, m_bRateAdaptationUsed(FALSE)
> , m_idleState(NULL_STATE)
> , m_pIDInfo(NULL)
> , m_pRequest(NULL)
>  -1083,6 +1084,17 
> return;
> }
>
> +HXBOOL
> +RTSPProtocol::IsRateAdaptationUsed(void)
> +{
> + HXBOOL bRateAdaptationUsed = FALSE;
> + if (m_pProtocolLib)
> + {
> + bRateAdaptationUsed =
>
((RTSPClientProtocol*)m_pProtocolLib)->IsRateAdaptationUs
ed();
> + }
> + return bRateAdaptationUsed ;
> +}
> +
> /*
> * If this is multicast, make sure to send subscribe
msg
> */
> Index: rtspprotocol.h
>
============================================================
=======
> RCS file: /cvsroot/client/core/rtspprotocol.h,v
> retrieving revision 1.17.2.1
> diff -u -w -r1.17.2.1 rtspprotocol.h
> --- rtspprotocol.h 22 Apr 2005 20:57:17 -0000
1.17.2.1
> +++ rtspprotocol.h 11 Jul 2006 18:07:28 -0000
>  -372,6 +372,7 
> virtual void EnterFastStart
(void);
> virtual void LeaveFastStart
(void);
>
> + virtual HXBOOL IsRateAdaptationUsed
(void);
> protected:
> LONG32 m_lRefCount;
> DECLARE_SMART_POINTER
>  -429,6 +430,7 
> private:
> BOOL m_bSocketsInited;
> CHXString m_strUserAgent;
> + HXBOOL
m_bRateAdaptationUsed;
>
> void hackCookie(IHXBuffer* pCookie);
> HX_RESULT SwitchToUnicast(void);
>
> Index: srcinfo.cpp
>
============================================================
=======
> RCS file: /cvsroot/client/core/srcinfo.cpp,v
> retrieving revision 1.42.4.10
> diff -u -w -r1.42.4.10 srcinfo.cpp
> --- srcinfo.cpp 17 Apr 2006 18:21:28 -0000
1.42.4.10
> +++ srcinfo.cpp 11 Jul 2006 18:07:32 -0000
>  -1647,15 +1647,15 
> HX_RESULT theErr = HXR_OK;
> if (!m_bIsRegisterSourceDone)
> {
> + m_pSource->CanBeFastStarted();
> + if (!m_pSource->IsRateAdaptationUsed())
> + {
> m_bIsRegisterSourceDone = TRUE;
> if (m_pSource->m_bSureStreamClip)
> {
>
m_pPlayer->SureStreamSourceRegistered(this);
> }
> -
> - m_pSource->CanBeFastStarted();
> -
> #if defined(HELIX_FEATURE_ASM)
> /* Register Source with ASM Bandwidth
Manager */
> IHXBandwidthManager* pMgr = 0;
>
> HX_VERIFY(HXR_OK ==
m_pPlayer->QueryInterface(
> IID_IHXBandwidthManager, (void
**)&pMgr));
>
> theErr =
pMgr->RegisterSource(m_pSource, (IUnknown*)
> (IHXPlayer*) m_pPlayer);
>  -1667,6 +1667,7 
> pMgr->Release();
> #endif /* HELIX_FEATURE_ASM */
> }
> + }
>
> return theErr;
> }
>
> Index: hxbsrc.h
>
============================================================
=======
> RCS file: /cvsroot/client/core/hxbsrc.h,v
> retrieving revision 1.35.2.5
> diff -u -w -r1.35.2.5 hxbsrc.h
> --- hxbsrc.h 30 Sep 2005 17:36:27 -0000
1.35.2.5
> +++ hxbsrc.h 11 Jul 2006 18:07:00 -0000
>  -314,6 +314,7 
>
> protected:
> HX_BITFIELD
m_bDefaultAltURL : 1;
> + HXBOOL
m_bRateAdaptationUsed;
>
> public:
> HXSource(void);
>  -794,6 +795,7 
> void
> SetMaxPossibleAccelRatio(double maxR)
> {m_maxPossibleAccelRatio = maxR;};
>
> virtual void EnterFastStart(void) {
> m_bFastStart = TRUE; };
> + virtual HXBOOL
IsRateAdaptationUsed(void)
> { return
> m_bRateAdaptationUsed; };
> virtual void
> LeaveFastStart(TurboPlayOffReason leftReason);
>
> virtual BOOL
CanBeFastStarted(void);
> Index: hxntsrc.cpp
>
============================================================
=======
> RCS file: /cvsroot/client/core/hxntsrc.cpp,v
> retrieving revision 1.118.2.13
> diff -u -w -r1.118.2.13 hxntsrc.cpp
> --- hxntsrc.cpp 26 Dec 2005 14:51:20 -0000
1.118.2.13
> +++ hxntsrc.cpp 11 Jul 2006 18:07:08 -0000
>  -2168,6 +2168,16 
> return;
> }
>
> +HXBOOL HXNetSource::IsRateAdaptationUsed(void)
> +{
> + HXBOOL bRateAdaptationUsed = FALSE;
> + if (m_pProto)
> + {
> + bRateAdaptationUsed =
m_pProto->IsRateAdaptationUsed();
> + }
> + return bRateAdaptationUsed ;
> +}
> +
> void
> HXNetSource::EnterFastStart(void)
> {
> Index: hxntsrc.h
>
============================================================
=======
> RCS file: /cvsroot/client/core/hxntsrc.h,v
> retrieving revision 1.38.2.3
> diff -u -w -r1.38.2.3 hxntsrc.h
> --- hxntsrc.h 23 May 2005 20:22:57 -0000
1.38.2.3
> +++ hxntsrc.h 11 Jul 2006 18:07:08 -0000
>  -287,6 +287,7 
> virtual BOOL IsPrefetchDone(void) {
> return !m_bPrefetch; };
>
> virtual void EnterFastStart(void);
> + virtual HXBOOL
IsRateAdaptationUsed(void);
> virtual void
> LeaveFastStart(TurboPlayOffReason leftReason);
>
> virtual HX_RESULT FillRecordControl();
> Index: hxprotocol.h
>
============================================================
=======
> RCS file: /cvsroot/client/core/hxprotocol.h,v
> retrieving revision 1.8
> diff -u -w -r1.8 hxprotocol.h
> --- hxprotocol.h 28 Oct 2004 20:16:50 -0000
1.8
> +++ hxprotocol.h 11 Jul 2006 18:07:24 -0000
>  -275,6 +275,7 
>
> virtual HX_RESULT AutoBWCalibrationDone
(HX_RESULT status,
>
UINT32 ulBW) {
> return HXR_OK; };
> + virtual HXBOOL IsRateAdaptationUsed
(void) { return
> m_bRateAdaptationUsed; };
> protected:
>
> UINT8 mProxyVersion : 8;
// protocol
> version for proxy
>  -326,6 +327,7 
>
> UINT16* m_pCloakPorts;
> UINT8 m_nCloakPorts;
> + HXBOOL m_bRateAdaptationUsed ;
>
> // ID info
> CHXString m_clientID; //
string to
> hold clientID
>
>
>
> _______________________________________________
> Protocol-dev mailing list
> Protocol-dev helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
_______________________________________________
Protocol-dev mailing list
Protocol-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/pr
otocol-dev
|
|
[1-3]
|
|