camcordermmfplugin/mediarecorder/Src/CCMRMDFVideoRecorder.cpp
branchRCL_3
changeset 13 eb8cd2e3974b
parent 10 6bc4220d7f67
child 42 605672cc2a86
--- 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)