Revision: 201013 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 16:09:12 +0300
branchRCL_3
changeset 13 eb8cd2e3974b
parent 12 efa42b0c6af0
child 16 130a995b5096
Revision: 201013 Kit: 201015
camcordermmfplugin/mediarecorder/Inc/CCMRVideoRecorder.h
camcordermmfplugin/mediarecorder/Src/CCMRMDFVideoRecorder.cpp
--- a/camcordermmfplugin/mediarecorder/Inc/CCMRVideoRecorder.h	Wed Mar 31 21:51:31 2010 +0300
+++ b/camcordermmfplugin/mediarecorder/Inc/CCMRVideoRecorder.h	Wed Apr 14 16:09:12 2010 +0300
@@ -601,7 +601,7 @@
         CCMRReturnAO* iBufferReturnAO;
         
         // time between random access points
-        TInt iMinRandomAccessPeriodInSeconds;
+        TReal iMinRandomAccessPeriodInSeconds;
 
         // ETrue if we are using HW accelerated video encoder => affects e.g. on default settings such as framerate
         TBool iVideoCodecHWAccelerated;
--- a/camcordermmfplugin/mediarecorder/Src/CCMRMDFVideoRecorder.cpp	Wed Mar 31 21:51:31 2010 +0300
+++ b/camcordermmfplugin/mediarecorder/Src/CCMRMDFVideoRecorder.cpp	Wed Apr 14 16:09:12 2010 +0300
@@ -903,10 +903,12 @@
         iDevVideoRec->SetOutputFormatL(iPreProcessorHWDeviceId, preproOutputFormat);
     }
 
-    PRINT((_L("CCMRVideoRecorder::SetupEncoderL() MinRandomAccess= %d"), iMinRandomAccessPeriodInSeconds ));
+    PRINT((_L("CCMRVideoRecorder::SetupEncoderL() MinRandomAccess= %f"), iMinRandomAccessPeriodInSeconds ));
     if ( iConfig && iConfig->IsICMConfigDataAvailable() )
         {
-        iMinRandomAccessPeriodInSeconds = iConfig->VideoQualitySettings().iRandomAccessRate;
+        iMinRandomAccessPeriodInSeconds = TReal(1)/ iConfig->VideoQualitySettings().iRandomAccessRate;
+        PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to iConfig iMinRandomAccessPeriodInSeconds= %f"), iMinRandomAccessPeriodInSeconds ));        
+        iDevVideoRec->SetMinRandomAccessRate( iConfig->VideoQualitySettings().iRandomAccessRate );
         }
     else
         {
@@ -914,19 +916,13 @@
 	        {
 	        iMinRandomAccessPeriodInSeconds = KCMRMinRandomAccessPeriodHighRes;
 	        }
-        }
-    PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to MinRandomAccess= %d"), iMinRandomAccessPeriodInSeconds ));
-
-    // Set random access in fps
-    if ( iMinRandomAccessPeriodInSeconds > 0 )
-        {
+        else 
+            {
+            iMinRandomAccessPeriodInSeconds = KCMRMinRandomAccessPeriod;
+            }
+        PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to MinRandomAccess= %f"), iMinRandomAccessPeriodInSeconds ));        
         iDevVideoRec->SetMinRandomAccessRate( TReal(1) / TReal(iMinRandomAccessPeriodInSeconds) );
         }
-    else
-        {
-        // there is no concept of disabling random access in MSL, hence use the default
-        iDevVideoRec->SetMinRandomAccessRate( TReal(1) / TReal(KCMRMinRandomAccessPeriod) );
-        }
 
     CleanupStack::PopAndDestroy( comprFormat );
 
@@ -4099,7 +4095,7 @@
 // -----------------------------------------------------------------------------
 //
 CCMRVideoRecorder::CCMRReturnAO::CCMRReturnAO(CCMRVideoRecorder* aHost) :
-        CActive(EPriorityNormal),
+        CActive(CActive::EPriorityStandard),
         iVideoOutputBufferReturnQue(_FOFF(TVideoOutputBuffer,iLink)),
         iVideoOutputBufferReturnQueIter(iVideoOutputBufferReturnQue),
         iHost(aHost)