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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] mdf/video/renderer mdfvideoadapter.cpp,1.86,1.87
From:       amsaleem () helixcommunity ! org
Date:       2008-03-21 16:37:13
Message-ID: 200803211637.m2LGbQBU031555 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/mdf/video/renderer
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv15698

Modified Files:
	mdfvideoadapter.cpp 
Log Message:
"Nokia submits this code under the terms of a commercial contribution agreement
with RealNetworks, and I am authorized to contribute this code under said agreement."

Modified by: saleem.adookkattil@nokia.com
 
Reviewed by:  

Date: 05-March-2008
 
Project: SymbianMmf_Rel 

TSW: EHPE-78SM9T

Synopsis: Fix to resolve \
DevVideo->StartDirectScreenAccess/DevVideo->AbortDirectScreenAccess API call failure.

Overview: Playing different video clips by launching multiple instance of media \
player causes this failure due to improper handling of DevVideo APIs \
DirectScreenAccess and AbortDirectScreenAccess. In this case posting surface is \
shared among multiple instance of the player. StartDirectScreenAccess API supposed to \
create the instance of posting surface and AbortDirectScreenAccess supposed to \
release the created instance of posting surface. Existing postprocessor code failed \
to release posting surface instance in AbortDirectScreenAccess API. Made changes to \
mdf video adapter to adapt to postprocessor changes.   
Files Modified:
 
/cvsroot/datatype/mdf/video/renderer/mdfvideoadapter.cpp
/cvsroot/datatype/mdf/video/renderer/mdfvideoadapter.h

Image Size and Heap Use impact: None
 
Module Release testing (STIF) : Pass
 
Test case(s) Added  :  No

Memory leak check performed : No new leaks introduced.  

Platforms and Profiles Build Verified: 
Profile -> helix-client-s60-32-mmf-mdf-arm
BIF branch  -> helix_restricted
SYSTEM_ID -> symbian-91-armv5
Target -> symbianMmf_rel
 
Platforms and Profiles Functionality verified: armv5, winscw
 
Branch: 210CayS,  221CayS& head




































Index: mdfvideoadapter.cpp
===================================================================
RCS file: /cvsroot/datatype/mdf/video/renderer/mdfvideoadapter.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- mdfvideoadapter.cpp	21 Mar 2008 16:28:55 -0000	1.86
+++ mdfvideoadapter.cpp	21 Mar 2008 16:37:11 -0000	1.87
@@ -131,7 +131,6 @@
   m_PostProcessorHwDeviceId( 0 ),
   m_DevVidInitialized( EInitializedReady ),
   m_pContext( NULL ),
-  m_bIsDSAStarted( FALSE ),
   m_pPayloadFormatPluginDevice( NULL ),
   m_bIsFirstFrameSent( FALSE ),
   m_pPictureHeader( NULL ),
@@ -156,7 +155,6 @@
   m_bWindowRectChanged( FALSE),
   m_fHeightPerc( 100.0 ),
   m_fWidthPerc( 100.0 ),
-  m_bIsScalingCalcNeeded( FALSE ),
   m_ulContrast( -1 ),
   m_bIsBltOnGoing( FALSE ),
   m_pPluginPackage( NULL ),
@@ -167,6 +165,7 @@
   ,m_pMDFEncodedFrameQ(NULL)
   ,m_bDisablePostProcessor(FALSE)
   ,m_bReturnPictures(FALSE)
+  ,m_bIsSetupDone(FALSE)
 #ifdef HELIX_FEATURE_DTDR_THUMBNAIL
   ,m_uCurrentPictureTime(0)
   ,m_pNewPicture(NULL)
@@ -687,8 +686,11 @@
         pRegisterControl->RegisterAdapter((IHXSurfaceControl*) this);
         HX_RELEASE(pRegisterControl);
     }
-
-    SetupWindow();
+	if (!m_bIsSetupDone)
+	{
+    	SetupWindow();
+    	m_bIsSetupDone = TRUE;
+	}
     MDFVIDEOLOG_LEAVEFN( "AttachSite" );
 }
 
@@ -813,7 +815,11 @@
 
 void CMdfVideoAdapter::HandleInitComplete()
 {
-    SetupWindow();
+	if (!m_bIsSetupDone)
+	{
+    	SetupWindow();
+    	m_bIsSetupDone = TRUE;
+	}
     StartDevVideo();
 #ifdef HELIX_FEATURE_DTDR_THUMBNAIL
     if (m_bReturnPictures)
@@ -963,16 +969,18 @@
         return HXR_OK;
     }
     
-    HX_RESULT retVal( HXR_FAIL );
-    if (m_DevVidInitialized == EInitializedSuccess || m_DevVidInitialized == \
                EInitializedResourceLost)
-    {
-        if (m_bIsDSAStarted )
-        {
-            m_pDevVideoClient->AbortDirectScreenAccess();
-            m_bIsDSAStarted = FALSE;
-        }
-        retVal = HXR_OK;
-    }
+	HX_RESULT retVal( HXR_OK );
+
+	if (m_DevVidInitialized == EInitializedSuccess ||
+		m_DevVidInitialized == EInitializedResourceLost)
+	{
+		m_pDevVideoClient->AbortDirectScreenAccess();
+	}
+	else
+	{
+		MDFVIDEOLOG_LEAVEFN( "Failed to execute DevVideo AbortDSA due to unexpected state" \
); +		retVal = HXR_FAIL;
+	}
     MDFVIDEOLOG_RETURNFN2( "AbortDSA", retVal );
     return retVal;
 }
@@ -1009,41 +1017,27 @@
         }
     }
 
-    if (m_DevVidInitialized == EInitializedSuccess  || m_DevVidInitialized == \
                EInitializedResourceLost)
-    {
-        if (m_bIsDSAStarted)
-        {
-            m_pDevVideoClient->AbortDirectScreenAccess();
-            m_bIsDSAStarted = FALSE;
-        }
-
-        m_pDevVideoClient->SetLogicalVideoWindow(m_windowRect);
-        
-        TInt lRetval = m_pDevVideoClient->StartDirectScreenAccess(m_clipRect, \
                m_ClipRegion);
-        if (lRetval == KErrNone)
-        {
-            retVal = HXR_OK;
-            m_bIsDSAStarted = TRUE;
-            if( m_bIsScalingCalcNeeded == TRUE )
-            {
-                retVal = CalculateScaleFactor();
-                if( SUCCEEDED( retVal ) && m_bFrameRectValid)
-                {
-                    retVal = HXR_FAIL;
-                    lRetval = \
                m_pDevVideoClient->SetScaleOptionsAndCommit(m_scaledSize, \
                m_bAntiAlias);
-                    
-                    if( lRetval == KErrNone )
-                    {
-                        m_bIsScalingCalcNeeded = FALSE;
-                        retVal = HXR_OK;
-                    }
-                }
-            }
+	if (m_DevVidInitialized == EInitializedSuccess  ||
+		m_DevVidInitialized == EInitializedResourceLost)
+	{
+		TInt lRetval = m_pDevVideoClient->StartDirectScreenAccess(m_clipRect, \
m_ClipRegion); +		if (lRetval == KErrNone)
+		{
+			//update last frame to window
+			m_pDevVideoClient->Redraw();
+		}
+		else
+		{
+			MDFVIDEOLOG_RETURNFN2( "Failed to execute StartDirectScreenAccess. Error %d", \
lRetval); +			retVal = HXR_FAIL;
+		}
+	}
+	else
+	{
+		MDFVIDEOLOG_LEAVEFN( "Failed to execute DevVideo StartDirectScreenAccess due to \
unexpected state" ); +		retVal = HXR_FAIL;
+	}
 
-            //update last frame to window
-            m_pDevVideoClient->Redraw();
-        }
-    }
     MDFVIDEOLOG_RETURNFN2( "StartDSA", retVal );
     return retVal;
 }


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


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

Configure | About | News | Add a list | Sponsored by KoreLogic