camcordermmfplugin/mediarecorder/Src/CCMRMDFVideoRecorder.cpp
changeset 17 880d946921e4
parent 15 50d5061ee01e
child 42 605672cc2a86
equal deleted inserted replaced
15:50d5061ee01e 17:880d946921e4
   901     if( iPreProcessorHWDeviceId)
   901     if( iPreProcessorHWDeviceId)
   902     {
   902     {
   903         iDevVideoRec->SetOutputFormatL(iPreProcessorHWDeviceId, preproOutputFormat);
   903         iDevVideoRec->SetOutputFormatL(iPreProcessorHWDeviceId, preproOutputFormat);
   904     }
   904     }
   905 
   905 
   906     PRINT((_L("CCMRVideoRecorder::SetupEncoderL() MinRandomAccess= %d"), iMinRandomAccessPeriodInSeconds ));
   906     PRINT((_L("CCMRVideoRecorder::SetupEncoderL() MinRandomAccess= %f"), iMinRandomAccessPeriodInSeconds ));
   907     if ( iConfig && iConfig->IsICMConfigDataAvailable() )
   907     if ( iConfig && iConfig->IsICMConfigDataAvailable() )
   908         {
   908         {
   909         iMinRandomAccessPeriodInSeconds = iConfig->VideoQualitySettings().iRandomAccessRate;
   909         iMinRandomAccessPeriodInSeconds = TReal(1)/ iConfig->VideoQualitySettings().iRandomAccessRate;
       
   910         PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to iConfig iMinRandomAccessPeriodInSeconds= %f"), iMinRandomAccessPeriodInSeconds ));        
       
   911         iDevVideoRec->SetMinRandomAccessRate( iConfig->VideoQualitySettings().iRandomAccessRate );
   910         }
   912         }
   911     else
   913     else
   912         {
   914         {
   913         if ( (iFrameSize.iWidth >= KCMRCIFWidth) && (iFrameSize.iHeight >= KCMRCIFHeight) )
   915         if ( (iFrameSize.iWidth >= KCMRCIFWidth) && (iFrameSize.iHeight >= KCMRCIFHeight) )
   914 	        {
   916 	        {
   915 	        iMinRandomAccessPeriodInSeconds = KCMRMinRandomAccessPeriodHighRes;
   917 	        iMinRandomAccessPeriodInSeconds = KCMRMinRandomAccessPeriodHighRes;
   916 	        }
   918 	        }
   917         }
   919         else 
   918     PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to MinRandomAccess= %d"), iMinRandomAccessPeriodInSeconds ));
   920             {
   919 
   921             iMinRandomAccessPeriodInSeconds = KCMRMinRandomAccessPeriod;
   920     // Set random access in fps
   922             }
   921     if ( iMinRandomAccessPeriodInSeconds > 0 )
   923         PRINT((_L("CCMRVideoRecorder::SetupEncoderL() Set to MinRandomAccess= %f"), iMinRandomAccessPeriodInSeconds ));        
   922         {
       
   923         iDevVideoRec->SetMinRandomAccessRate( TReal(1) / TReal(iMinRandomAccessPeriodInSeconds) );
   924         iDevVideoRec->SetMinRandomAccessRate( TReal(1) / TReal(iMinRandomAccessPeriodInSeconds) );
   924         }
       
   925     else
       
   926         {
       
   927         // there is no concept of disabling random access in MSL, hence use the default
       
   928         iDevVideoRec->SetMinRandomAccessRate( TReal(1) / TReal(KCMRMinRandomAccessPeriod) );
       
   929         }
   925         }
   930 
   926 
   931     CleanupStack::PopAndDestroy( comprFormat );
   927     CleanupStack::PopAndDestroy( comprFormat );
   932 
   928 
   933     // set codec specific settings
   929     // set codec specific settings
  4097 // Default constructor for CCMRReturnAO
  4093 // Default constructor for CCMRReturnAO
  4098 // (other items were commented in a header).
  4094 // (other items were commented in a header).
  4099 // -----------------------------------------------------------------------------
  4095 // -----------------------------------------------------------------------------
  4100 //
  4096 //
  4101 CCMRVideoRecorder::CCMRReturnAO::CCMRReturnAO(CCMRVideoRecorder* aHost) :
  4097 CCMRVideoRecorder::CCMRReturnAO::CCMRReturnAO(CCMRVideoRecorder* aHost) :
  4102         CActive(EPriorityNormal),
  4098         CActive(CActive::EPriorityStandard),
  4103         iVideoOutputBufferReturnQue(_FOFF(TVideoOutputBuffer,iLink)),
  4099         iVideoOutputBufferReturnQue(_FOFF(TVideoOutputBuffer,iLink)),
  4104         iVideoOutputBufferReturnQueIter(iVideoOutputBufferReturnQue),
  4100         iVideoOutputBufferReturnQueIter(iVideoOutputBufferReturnQue),
  4105         iHost(aHost)
  4101         iHost(aHost)
  4106     {
  4102     {
  4107     CActiveScheduler::Add(this);
  4103     CActiveScheduler::Add(this);