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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/session clientsession.cpp,1.161,1.162
From:       svaidhya () helixcommunity ! org
Date:       2009-05-30 21:09:34
Message-ID: 20090530221412.2D72230ADC3 () pukcab ! korelogic ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/session
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv31961

Modified Files:
	clientsession.cpp 
Log Message:
Synopsis
========
Fix for Switching (to a compatible content) does not happen after an invalid switch \
request was made accidentally


Branches:  SERVER_CURRENT, SERVER_13_0
Reviewer(s):  Jamie

Description
===========

There are 2 problems here

1]
When switching to an inactive RM live feed,
the player went into communicating mode.
This was happening because the after the issuing the s/w request, brcvplin returns a \
HXR_NOT_FOUND (since stream inactive) which flows down to clientSession::FindDone.

FindDone, on seeing a failure, goes ahead and terminates the session (Wrongly), not \
considering that it is a s/w request rather than a normal playback request.

Fix: In case of a failure with s/w request, just populate the log entry and remove \
the req from stack (which is done by the HandleSourceSwitch method, so just call that \
method).

2]
When switching to an inactive RTP live feed,
ideally the player should behave the same way as with RM live streams.
But it worked fine , though the logs were incorrect, because, qtbcplin returns a \
DoesExistDone(HXR_FAIL) for inactive stream instead of DoesExistDone(FALSE). HXR_FAIL \
is considered as TRUE and finally a HXR_OK is returned to FindDone.

FindDone then calls HandleSourceSwitch() which is responsible for doing the \
Switchability check. Now when the clientsession tries to get the Stream for doing the \
Switchability test, it fails. The clientsession gives out a 274 assuming a if the \
stream is inactive it would have already being handled in FindDone(which is correct).

Fix: Change to DoesExistDone(FALSE)


Files Affected
==============

./server/broadcast/transport/rtp/recv/qtbcobj.cpp
./server/engine/session/clientsesion.cpp


Testing Performed
=================
Unit Tests:
None.

Integration Tests:
- Verified the following

FCS Switching
~~~~~~~~~~~~~
1. Switching from OnDemand clip to Inactive live rm stream gives a 404 not found and \
the rest of the  s/w works fine as expected.
2. Switching from OnDemand clip to Inactive live RTP stream gives a 404 not found and \
the rest of  the s/w works fine as expected.
2. Switching from an OnDemand Clip to an Non Existing On Deamnd clip works fine

SSPL
~~~~
1. Empty playlist
2. Playlist where the First clip Doesn't Exist
3. Playlist where no clips exist
4. Playlist with Inactive Live clips works fine and give correct logs

Leak Tests:
- None.

Performance Tests:
None.

Platforms Tested:  win32-i386-vc7
Build verified:    win32-i386-vc7



Index: clientsession.cpp
===================================================================
RCS file: /cvsroot/server/engine/session/clientsession.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- clientsession.cpp	21 May 2009 19:07:50 -0000	1.161
+++ clientsession.cpp	30 May 2009 21:09:31 -0000	1.162
@@ -2025,17 +2025,12 @@
         return HXR_OK;
     }
 
-    /**
-     * The Following Code is Moved from ::got_url for incorporating MDP for Live \
                Streams
-     * In the got_url method we cannot find out if the stream is live/onDemand
-     * Hence moved the code here
-     **/
-
-    if (SUCCEEDED(status))
-    {
 #ifdef HELIX_FEATURE_SERVER_FCS
+        /* HXR_NO_MORE_FILES is only returned in case of empty playlist or other \
undesirable cases +         * when we should not proceed with playlist
+         */
         CSwitchElement* pSwitchElement = NULL;
-        if(m_pStack->GetSize())
+        if(m_pStack->GetSize() && (status != HXR_NO_MORE_FILES))
         {
             pSwitchElement = (CSwitchElement*)m_pStack->GetAt(m_uTestIndex);
             pSwitchElement->GetStat(pFileObject);
@@ -2044,6 +2039,14 @@
         }
 #endif //HELIX_FEATURE_SERVER_FCS
 
+    /**
+     * The Following Code is Moved from ::got_url for incorporating MDP for Live \
Streams +     * In the got_url method we cannot find out if the stream is \
live/onDemand +     * Hence moved the code here
+     **/
+
+    if (SUCCEEDED(status))
+    {
         /*
          * We don't use MDP for MEI (block transfer) requests.  If it is ever
          * desired to do so, the code in FindDone() and the MDP call semantics
@@ -2165,14 +2168,6 @@
 #ifdef HELIX_FEATURE_SERVER_SSPL
         if(m_bIsPlaylist && m_pPlaylistControl && status != HXR_NO_MORE_FILES)
         {
-            //If this is not the first clip in the playlist
-            if (m_pStack->GetSize())
-            {
-                HandleSourceSwitch(HXR_FILE_NOT_FOUND, 0, 0);
-            }
-            else
-            {
-
               //Set URL for the first clip in the Paylist (Not Found)
               const char* pClipPath = NULL;
               IHXBuffer* pClipURL = new ServerBuffer(TRUE);
@@ -2190,11 +2185,12 @@
                                                             m_pClipStats,
                                                             m_pProc);
 
+            // We call GetFirstMediaClip instead of GetNextMediaClip here because we \
haven't +            // played the first clip of the session yet.
             m_bGettingFirstClip = TRUE;
             m_pPlaylistControl->GetFirstMediaClip();
             //continue on SSPLMediaClipReady();
         }
-        }
         else
 #endif //HELIX_FEATURE_SERVER_SSPL
         {


_______________________________________________
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