[Datatype-cvs] xps/PacketSink CXPSSession.cpp,1.7.4.2,1.7.4.3

[Datatype-cvs] xps/PacketSink CXPSSession.cpp,1.7.4.2,1.7.4.3

yuryrp at helixcommunity.org yuryrp at helixcommunity.org
Tue Sep 14 12:23:33 PST 2010


Update of /cvsroot/datatype/xps/PacketSink
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv14421

Modified Files:
      Tag: hxclient_4_2_0_brizo
	CXPSSession.cpp 
Log Message:
Modified by:  yury.ramanovich at nokia.com

Reviewed by: rajesh.rathinasamy at nokia.com

Date: 09/14/2010

Project: symbianMmf_wm

ErrorId: ou1cimx1#555949

Synopsis: MTV 2.0: ISMA channel can't stream well after launching MTV sometimes.

Overview: due to the fact that audioadaptation currently doesn’t support setting of restrictedaudiooutput on-the-fly ( in Playing state),  MobileTV now sets restrictedaudiooutput only at initialization phase. This however triggers yet another CHXAudioOutputConfigUtil::ConfigureOutputRestrictions() call with the same value of CXPSSession::m_ulSecureOutBitMask by CXPSSession::Enqueue() due to fact that CXPSSession::m_bSecureOutputSet flag set to Etrue in CXPSSession::SetSecureoutputMode() during the init phase above. Sometimes this generates the error, because m_uSecureOutputChangeTime > ulCurrentTime in CHXAudioDevice::GetCurrentAudioTime() and by the time this additional CHXAudioOutputConfigUtil::ConfigureOutputRestrictions() is called, the devsound already in in Playing state.

Solution: since the value of CXPSSession::m_ulSecureOutBitMask didn’t change in the init phase and CHXAudioOutputConfigUtil::ConfigureOutputRestrictions() was already done, there is no need to do it again until the next CXPSSession::SetSecureoutputMode() call. Therefore, we can set CXPSSession::m_bSecureOutputSet to Efalse in CXPSSession::HandleGetSecureOutputMode() since HandleGetSecureOutputMode() only called during CXPSFileFormat::InitFileFormat().  CXPSSession::m_ulSecureOutBitMask will be set to Etrue next time CXPSSession::SetSecureoutputMode() will be called by MobileTV.
Note, MobileTV has to relink with updated XPSPacketSink.lib for this change to take effect.
Also added a few logs.

Files Added: 
None.

Files Modified:
datatype/xps/PacketSink/CXPSSession.cpp
datatype/xps/fileformat/CXPSFileformat.cpp
datatype/xps/fileformat/CXPSClient.cpp

 
Image Size and Heap Use impact: minor

Module Release testing : XPSTestApp.

Test case(s) Added  :  No.

Memory leak check performed : Yes. No new leaks introduced 

Platforms and Profiles Build Verified: 
helix-client-s60-52-mmf-mdf-dsp

Platforms and Profiles Functionality verified: armv5, winscw

Branch: 210Cays, 420Brizo, HEAD.


Index: CXPSSession.cpp
===================================================================
RCS file: /cvsroot/datatype/xps/PacketSink/CXPSSession.cpp,v
retrieving revision 1.7.4.2
retrieving revision 1.7.4.3
diff -u -d -r1.7.4.2 -r1.7.4.3
--- CXPSSession.cpp	20 Jul 2010 17:57:50 -0000	1.7.4.2
+++ CXPSSession.cpp	14 Sep 2010 20:23:30 -0000	1.7.4.3
@@ -201,11 +201,13 @@
 TInt CXPSSession::SetSecureOutputMode(TUint32 ulSecureOutBitMask)
 {
     TInt lRetval = KErrNotSupported;
-    XPS_LOG(_L("CXPSSession[%x]::SetSecureOutputMode m_bIsClientSupportSecureOutputChange::%d <-"), 
-            this, m_bIsClientSupportSecureOutputChange); 
+    XPS_LOG(_L("CXPSSession[%x]::SetSecureOutputMode -> m_bIsClientSupportSecureOutputChange(%d) ulSecureOutBitMask(0x%08x)"), 
+            this, m_bIsClientSupportSecureOutputChange, ulSecureOutBitMask); 
     if (m_bIsClientSupportSecureOutputChange)
     {
         m_AccessMutex.Wait();
+        XPS_LOG(_L("CXPSSession[%x]::SetSecureOutputMode old m_ulSecureOutBitMask(0x%08x)"), 
+            this, m_ulSecureOutBitMask); 
         if(m_ulSecureOutBitMask != ulSecureOutBitMask) 
         {
             m_ulSecureOutBitMask = ulSecureOutBitMask;
@@ -214,6 +216,8 @@
         m_AccessMutex.Signal();
         lRetval = KErrNone;
     }
+    XPS_LOG(_L("CXPSSession[%x]::SetSecureOutputMode <- new m_ulSecureOutBitMask(0x%08x) m_bSecureOutputSet(%d) lRetval(%d)"), 
+            this, m_ulSecureOutBitMask, m_bSecureOutputSet, lRetval); 
     return lRetval;
 }
 
@@ -611,7 +615,7 @@
 //
 void CXPSSession::DoHandleGetSecureOutputMode(const RMessage2& mesg)
 {
-    XPS_LOG(_L("CXPSSession::DoHandleGetSecureOutputMode >>"));
+    XPS_LOG(_L("CXPSSession::DoHandleGetSecureOutputMode ->"));
     TInt lRetval = KErrGeneral;
     
      
@@ -620,7 +624,7 @@
     TPckgBuf<SecureOutputInfo> pckg1(m_SecureOutputInfo);
     mesg.Write(1, pckg1);
     
-    XPS_LOG(_L("CXPSSession[%x]::DoHandleGetSecureOutputMode rv:%d"), this, lRetval); 
+    XPS_LOG(_L("CXPSSession[%x]::DoHandleGetSecureOutputMode <- rv(%d) m_ulSecureOutBitMask(0x%08x)"), this, lRetval, m_ulSecureOutBitMask); 
     mesg.Complete(lRetval);
 }
 
@@ -646,8 +650,13 @@
     securemodestr.NumFixedWidthUC( m_ulSecureOutBitMask, EHex, 8 );
         
     lRetval = mesg.Write(0, (TDesC8&) securemodestr);
+    if (lRetval == KErrNone)
+    {
+        m_bSecureOutputSet = EFalse;
+        XPS_LOG(_L("CXPSSession[%x]::HandleGetSecureOutputMode reset m_bSecureOutputSet flag(%d)"), this, m_bSecureOutputSet); 
+    }
     
-    XPS_LOG(_L("CXPSSession[%x]::HandleGetSecureOutputMode rv:%d"), this, lRetval); 
+    XPS_LOG(_L("CXPSSession[%x]::HandleGetSecureOutputMode rv(%d) m_ulSecureOutBitMask(0x%08x)"), this, lRetval, m_ulSecureOutBitMask); 
     mesg.Complete(lRetval);
 }
 




More information about the Datatype-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.