[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.34,1.35
From:       rasher () helixcommunity ! org
Date:       2007-10-30 10:19:38
Message-ID: 200710301019.l9UAJlkM004496 () mailer ! progressive-comp ! com
[Download RAW message or body]

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

Modified Files:
	clientsession.h 
Log Message:
Synopsis
 ==========

This CR is a fix for FCS for handling stats for each clip separately.

Branches           :  HEAD
Suggested Reviewer :  Jamie

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

1)    StatDone for each clip returns the file size but it was obtained
only for the first clip.We want the file size for every clip

2)  If format style less than 7( FORMAT_STYLE7_SERVER) then the session
stats  methods get called for e.g.GetURL and GetDuration.m_pStats is only
1 per clientSession and was not updated for every clip.

  Fix
 ===========

    StatDone for each clip is now obtained as when Stat is called on the
file object the response object is the CSwitchElement which is 1 per
clip.So each clips StatDone is received in the per clip CSwitchElement.

    CSwitchElement is made to derive from IHXFileStatResponse and becomes
the response object.Now CSwitchElement is not deleted but AddRef'd and
Released. InitClipStats and ClipDone now have an argument which is the
ClipStats object.
    In CTBaseLog::LookupOutputArg if format style less than 7(
FORMAT_STYLE7_SERVER) then SessionStats methods are called.in this
method we check whether pClipStats is non NULL and call ClipStats
method for common methods for e.g.GetURL,GetDuration.Now we get the
correct URL,duration etc. for


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

  server\engine\session\clientsession.cpp
  server\engine\session\pub\clientsession.h
  server\log\tmplgpln\legacy_access_log.h

  Testing Performed
 =================
Integration Tests:
Tested with switching clips for a session.File size is correctly logged
for each switching clip.Also if format < 7 urls for each
clip,filesize,duration are correctly logged for each clip.

Leak Tests:
No leaks related to these changes.All the SwitchElements for each clip are
freed.

Performance Tests: n/a

Build verified: win32-i386-vc7, linux-rhel4, Sunos-5.10

Platforms tested: win32-i386-vc7



 QA Hints
===========





Thanks
Raj  Asher



Index: clientsession.h
===================================================================
RCS file: /cvsroot/server/engine/session/pub/clientsession.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- clientsession.h	29 Oct 2007 14:52:32 -0000	1.34
+++ clientsession.h	30 Oct 2007 10:19:36 -0000	1.35
@@ -175,6 +175,8 @@
 public:
        void RemoveAt(int index, int repeat=1);
        void RemoveAllBelow(int index);
+       void   Push(void * Pushee);
+       void* GetAt(int index) const;
        ~CHXFCStack();
 };
 
@@ -542,8 +544,8 @@
     BOOL                            m_is_ready;
     BOOL                            m_bUseRTP;
     CHXString                       m_BroadcastType;
-    void ClipDone();
-    void InitClipStats();
+    void ClipDone(IHXClipStats* pClipStats);
+    void InitClipStats(IHXClipStats* pClipStats);
     IHXBuffer* GetStartTime();
 
     BOOL                            m_bNoLatency;
@@ -598,7 +600,7 @@
 };
 
 #ifdef HELIX_FEATURE_SERVER_FCS
-class CSwitchElement
+class CSwitchElement : public IHXFileStatResponse
 {
 public:
     CSwitchElement( const char* pNewURL,
@@ -609,6 +611,19 @@
 
     HX_RESULT SwitchDone(HX_RESULT hres);
     void Cleanup();
+    void GetStat(IUnknown* pFileObject);
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface)       (THIS_ REFIID riid, void** ppvObj);
+    STDMETHOD_(ULONG32,AddRef)      (THIS);
+    STDMETHOD_(ULONG32,Release)     (THIS);
+    /* IHXFileStatResponse methods  */
+    STDMETHOD   (StatDone)(THIS_
+                           HX_RESULT status,
+                           UINT32 ulSize,
+                           UINT32 ulCreationTime,
+                           UINT32 ulAccessTime,
+                           UINT32 ulModificationTime,
+                           UINT32 ulMode);
 
     IHXSwitchResponse*              m_pSwitchResponse;
     HX_SWITCH_TYPE                  m_switchType;
@@ -616,11 +631,15 @@
     URL*                            m_pSwitchURL;
     IHXBuffer*                      m_pURL;
 
+    IHXClipStats*                   m_pClipStats;
+    BOOL                            m_bCleanedUp;
+    UINT32                          m_ulLastModifiedTime;
     //we have to pretend that CwitchabilityTest is the source. For the real
     //source, once you set the sinkcontrol in Init(), there is no way to change 
     //ownership, CSwitchabilityTest has to play the delegation here.
     CSwitchabilityTest*             m_pSwitchSource; 
     BOOL                            m_bReady;
+    UINT32                          m_ulRefCount;
 };
 #endif //HELIX_FEATURE_SERVER_FCS
 


_______________________________________________
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