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

List:       helix-server-cvs
Subject:    [Server-cvs]
From:       jzeng () helixcommunity ! org
Date:       2008-08-21 0:11:57
Message-ID: 200808210015.m7L0FicP023648 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/protocol/rtsp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv24295/server/protocol/rtsp

Modified Files:
	Umakefil crtspbase.cpp 
Log Message:
Synopsis
========
SSPL -- initial playback
Branches:  head, server_12_1
Suggested Reviewer: Srinivas, Jamie

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

This is the changes needed for initial playback.  Including:

1. add a member variable to BaseShim to identify sspl.

2. Change the header "IsFCSSession" to "OpenDuration" to fit both fcs and sspl.

3. In crtspbase.cpp, add checking for sspl.

4. In clientsession, add code for sspl processing.

Because of of time restriction that I need to wrap this up last week, I didn't do a lot of testing.
I will come back to this in a week and do more testing.

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

server/engine/inputsource/base_shim.cpp,v
server/engine/inputsource/mdpshim.cpp,v
server/engine/inputsource/ppmstaticshim.cpp,v
server/engine/inputsource/pub/base_shim.h,v
server/engine/inputsource/pub/mdpshim.h,v
server/engine/inputsource/pub/ppmstaticshim.h,v
server/engine/session/clientsession.cpp,v
server/engine/session/pub/clientsession.h,v
server/fs/sdpgenfsys/sdpgenfobj.cpp,v
server/protocol/rtsp/Umakefil,v
server/protocol/rtsp/crtspbase.cpp,v
server-restricted/datatype/playlist/playlist_control.cpp,v
server-restricted/datatype/playlist/pub/playlist_control.h,v
server-restricted/protocol/http-ctrl/ssplutil.cpp,v
server-restricted/protocol/http-ctrl/pub/ssplutil.h,v
protocol/sdp/sdpmdgen.cpp,v

Testing Performed
=================

Unit Tests:
None.

Integration Tests:
Test rm and 3gp static clips. 

Leak Tests:
None.

Performance Tests:
- None

Platforms Tested: win32
Build verified: win32



Index: crtspbase.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/crtspbase.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- crtspbase.cpp	21 Mar 2008 02:22:18 -0000	1.41
+++ crtspbase.cpp	21 Aug 2008 00:11:54 -0000	1.42
@@ -83,6 +83,8 @@
 #ifdef HELIX_FEATURE_SERVER_FCS
 #include "fcsutil.h"
 #include "tsmap.h"
+#include "hxplaylist.h"
+#include "ssplutil.h"
 #endif // HELIX_FEATURE_SERVER_FCS
 #include "bandcalc.h"
 #include "bcngtran.h"
@@ -7508,7 +7510,6 @@
         UINT32 ulRRRate = (UINT32)-1;
         UINT32 ulRSRate = (UINT32)-1;
         UINT32 ulAvgBitRate = 0;
-        BOOL bIsFCS = FALSE;
 
         IHXValues** ppValues = new IHXValues*[nStreams+2];
         ppValues[0] = pFileHeader;
@@ -7516,6 +7517,9 @@
         IHXSockAddr* pHostAddr = NULL;
         IHXBuffer* pHostAddrBuf = NULL;
 
+        BOOL bIsFCS = FALSE;
+        BOOL bIsSSPL = FALSE;
+
         if (!pOptionalValues)
         {
             pOptionalValues = new CHXHeader();
@@ -7594,15 +7598,43 @@
         }
 
 #ifdef HELIX_FEATURE_SERVER_FCS
-
         FCSUtil fcsConfig(m_proc->pc->server_context);
-
+        SSPLUtil ssplUtil(m_proc->pc->server_context);
         const char* pUrl = NULL;
+        BOOL bLiveBehavior = FALSE;
+
         m_pUrl->GetEncFullPath(pUrl);
-        if (fcsConfig.IsFCSRequest(pUrl, HTTPMessage::T_GET) && fcsConfig.VerifyFCSLicense())
+        bIsFCS = fcsConfig.IsFCSRequest(pUrl, HTTPMessage::T_GET) && fcsConfig.VerifyFCSLicense();
+
+        bIsSSPL = ssplUtil.IsSSPLURL(pUrl) && ssplUtil.VerifySSPLLicense();
+
+        if(bIsSSPL)
         {
-            pOptionalValues->SetPropertyULONG32("IsFCSSession", 1);
-            bIsFCS = TRUE;
+            ClientSession* pClientSession = m_pClient->FindSession(pcSessionID);
+            //for playlist, if it doesn't have duration, then we will need a open-ended duration.
+            if(pClientSession)
+            {
+                bLiveBehavior = (pClientSession->GetDuration() == 0);
+            }
+
+            //In addition, if it is out-of-band switchable, we will need an open-ended duration,
+            //too.  
+            //Because we couldn't predict how long the session will last.
+
+            if(!bLiveBehavior)
+            {
+                bLiveBehavior = ssplUtil.CheckRequestParams(pUrl, HTTPMessage::T_GET);
+            }
+        }
+
+        bLiveBehavior = bLiveBehavior || bIsFCS;
+
+        if (bIsFCS || bIsSSPL)
+        {
+            if(bLiveBehavior)
+            {
+                pOptionalValues->SetPropertyULONG32("OpenDuration", 1);
+            }
             IHXMIMEHeader* pHeader = new (m_pFastAlloc) CMIMEHeader(m_pFastAlloc);
             pHeader->SetFromString("Cache-Control","no-cache");
             m_pRespMsg->AddHeader(pHeader);
@@ -7861,7 +7893,7 @@
             pInfo->m_bExtensionSupport = ulExtension;
             pInfo->m_bHasRTCPRule = bHasRTCPRule;
             pInfo->m_RTCPRule = RTCPRule;
-            pInfo->m_ulPayloadWirePacket = ulPayloadWirePacket && !bIsFCS;
+            pInfo->m_ulPayloadWirePacket = ulPayloadWirePacket && !(bIsFCS || bIsSSPL);
 
             pInfo->m_ulAvgBitRate = ulAvgBitRate;
             pInfo->m_ulRtpRRBitRate = ulRRRate;

Index: Umakefil
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/Umakefil,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Umakefil	5 Jan 2008 00:32:56 -0000	1.24
+++ Umakefil	21 Aug 2008 00:11:54 -0000	1.25
@@ -93,5 +93,6 @@
 
 if project.IsDefined("HELIX_FEATURE_SERVER_FCS"):
     project.AddModuleIncludes('server-restricted/protocol/http-ctrl/pub')
+    project.AddModuleIncludes('server-restricted/datatype/playlist/pub')
     
 LibraryTarget('servrtsplib')


_______________________________________________
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