Revision: 201035
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 22:02:55 +0300
changeset 51 613e4e943120
parent 38 4269ca484c7b
child 54 b68f3e90dca1
Revision: 201035 Kit: 201035
mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h
mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp
mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/test3gp.dcf
mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/testmp3.dcf
--- a/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h	Wed Aug 18 11:16:18 2010 +0300
+++ b/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h	Thu Sep 02 22:02:55 2010 +0300
@@ -48,6 +48,12 @@
 */
 const TInt KSurfaceProtection = 0x3;
 
+/** Hint about the surface’s characteristics or properties,
+   For example if a surface can be persisted by the effects engine.
+   @see TSurfaceCharacteristics for possible values.
+*/
+const TInt KSurfaceCharacteristics = 0x4;
+
 
 /** Values used for the KSurfaceContent key */
 enum TSurfaceContent
@@ -121,6 +127,17 @@
     };
 
 
+/** Values used for the KSurfaceCharacteristics key. The values are bitmasks and can be combined.
+*/
+enum TSurfaceCharacteristics
+    {
+    /**
+    * Surface cannot be persisted once it has been closed by the creator
+    */
+    ENotPersistable = 1,
+    };
+
+
 class TSurfaceUpdate
     {
     /** Constructor.
@@ -186,7 +203,7 @@
     return ( iValue & 0x80000000 ) ? ETrue : EFalse;
     }
 
-}; //namespace surfaceHints
+} //namespace surfaceHints
 
 #endif //__SURFACE_HINTS_LOCAL_H__
 
--- a/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp	Wed Aug 18 11:16:18 2010 +0300
+++ b/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp	Thu Sep 02 22:02:55 2010 +0300
@@ -2332,7 +2332,6 @@
    err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
    if(err == KErrAlreadyExists)
    {
-		err = KErrNone;
 		err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
    }
    PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
@@ -2342,10 +2341,21 @@
    err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
    if(err == KErrAlreadyExists)
    {
-		err = KErrNone;
 		err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
    }
    PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
+   if(iUsingExternalSurface)
+   {
+   		iHint.iKey.iUid = surfaceHints::KSurfaceCharacteristics;
+   		iHint.iValue = surfaceHints::ENotPersistable;
+   		iHint.iMutable = ETrue;
+	    err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
+	    if(err == KErrAlreadyExists)
+	    {
+			err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
+	    }
+	    PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
+	}
    return err;
 }