[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] engine/session/pub clientsession.h,1.85,1.85.4.1
From: yijil () helixcommunity ! org
Date: 2013-06-27 2:42:34
[Download RAW message or body]
Update of /cvsroot/server/engine/session/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv25694/pub
Modified Files:
Tag: SERVER_15_1_0
clientsession.h
Log Message:
Committed to: HEAD, SERVER_15_1_0_RN
Reviewed by: Richard
Synopsis
========
HLXSRV-382 [Vhost][SSPL]Seek a playlist file has error
Branches: HEAD, SERVER_15_1_0_RN
Reviewer: Anyone
Description
===========
Repro:
1. Server vhost configuration
<List Name="Vhost">
<Var EnableVhost="1"/>
<Var EnableCnameOnly="1"/>
<Var UserName="real"/>
<Var Password="real"/>
<Var VhostDirectory="/var/hms/Vhost/"/>
<Var CalcDiskInterval="60000"/>
<List Name="briantest">
<Var IdentifyString="briantest"/>
<Var CNAME="www.briantest.rhel5.com"/>
</List>
<List Name="Account1">
<Var IdentifyString="account1"/>
<Var CNAME="www.account1.rhel5.com"/>
</List>
2. Enable the FCS and SSPL in rmvhost.cfg 3. Request a playlist file in server \
rtsp://www.briantest.rhel5.com/briantest/mix/playlist_mp4.hpl 4. Seek it once
Expected:
Could play the clip form the seek point to the end of playlist
Actual:
Play the clip form the seek point, but the playback will hanging when the current \
clip played over Other Comments:
ROOT CAUSE:
After seek to clip2 as example, clip2 will be player successfully, but after clip2, \
it needs to switch to clip3. But it failed.
CSessionSourceControl::StreamDone()
{
...
m_pClientSession->ClipStreamDoneCalled();
...
}
void ClientSession::ClipStreamDoneCalled()
{
DPRINTF(D_ENTRY, ("ClientSession::ClipStreamDoneCalled() url\n"));
//XXXJJ If we get StreamDone here, the pending switch will not get
//the right packet to switch. We need to switch here.
if(m_pPacketShim && m_pPacketShim->IsSwitchPending())
{
m_pPacketShim->SwitchSourceNow();
}
else if(m_pPlaylistControl)
{
m_pPlaylistControl->GetNextMediaClip();
}
else if (!m_bDone && m_pCurrentSwitch) // if it is a valid fcs switch
{
SwitchSource();
}
}
BasePacketShim::Switch(IUnknown* pSource, HX_SWITCH_TYPE switch_type,
IHXStreamMapper* pMapper) {
...
m_bSwitchPending = TRUE;
...
}
In my test, "CSessionSourceControl::StreamDone" will be called before \
"BasePacketShim::Switch()" is called. In "BasePacketShim::Switch", it will set \
"m_bSwitchPending" to TRUE. When it occurs, "m_pPlaylistControl->GetNextMediaClip();" \
will be called in "ClientSession::ClipStreamDoneCalled" but \
"m_pPacketShim->SwitchSourceNow();". "m_pPlaylistControl->GetNextMediaClip();" will \
switch to clip4, but the right one is clip3. Which cause the playing failed.
MY FIX:
When " ClientSession::ClipStreamDoneCalled " is called, it not call code " \
m_pPacketShim->SwitchSourceNow();" and " m_pPlaylistControl->GetNextMediaClip();" \
directly. It will schedule a call back function to make sure "BasePacketShim::Switch" \
be called first.
Files Affected
==============
server/engine/session/clientsession.cpp
server/engine/session/pub/clientsession.h
Testing Performed
=================
Integration Tests
Index: clientsession.h
===================================================================
RCS file: /cvsroot/server/engine/session/pub/clientsession.h,v
retrieving revision 1.85
retrieving revision 1.85.4.1
diff -u -d -r1.85 -r1.85.4.1
--- clientsession.h 24 Apr 2013 10:24:01 -0000 1.85
+++ clientsession.h 27 Jun 2013 02:42:21 -0000 1.85.4.1
@@ -344,6 +344,7 @@
HX_RESULT Switch(const char* pNewURL, IHXSwitchResponse* pResp,
HX_SWITCH_TYPE switchType, UINT32 ulClipBegin);
+ void Switch();
#endif // HELIX_FEATURE_SERVER_SSPL
/* Protocol responses */
@@ -499,6 +500,24 @@
ClientSession* m_pOwner;
};
+ class SwitchCallback : public IHXCallback
+ {
+ public:
+ SwitchCallback(ClientSession* pOwner);
+ ~SwitchCallback();
+
+ /* IUnknown Interfaces */
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj);
+ STDMETHOD_(ULONG32,AddRef) (THIS);
+ STDMETHOD_(ULONG32,Release) (THIS);
+
+ STDMETHOD(Func) (THIS);
+
+ private:
+ ULONG32 m_ulRefCount;
+ ClientSession* m_pOwner;
+ };
+
HX_RESULT SetupStream(UINT32 ulStreamNumber, ASMRuleBook** ppASMRuleBooks, \
REF (UINT32) ulTransportCount,
IHXPacketFlowControl* pMultiSessionControl, \
MulticastSession* pSession);
@@ -535,6 +554,7 @@
BOOL m_bDone;
BOOL m_bCleanedUp;
UINT32 m_ulFunctionsInUse;
+ INT32 m_nSwitchCallbackTimes;
/* QoS */
IHXQoSSignal* m_pSignal;
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic