camcordermmfplugin/mediarecorder/Src/CCMRMediaRecorderImp.cpp
changeset 2 c7e61a0077eb
parent 0 9b3e960ffc8a
child 10 6bc4220d7f67
equal deleted inserted replaced
1:2d3e1993fb02 2:c7e61a0077eb
   397         User::Leave( KErrNotReady );
   397         User::Leave( KErrNotReady );
   398         }
   398         }
   399     // this can't be changed while recording; video recorder is supposed to notice if in wrong state
   399     // this can't be changed while recording; video recorder is supposed to notice if in wrong state
   400     // state is changed based on mvroStateChange()
   400     // state is changed based on mvroStateChange()
   401     iVideoRecorder->SetFrameSizeL(aSize);
   401     iVideoRecorder->SetFrameSizeL(aSize);
   402     iConfig->SetVideoFrameSize(aSize);
   402     if ( iConfig != NULL )
       
   403         {
       
   404         iConfig->SetVideoFrameSize(aSize);
       
   405         }
   403 
   406 
   404     // Change audio samplerate based on framesize
   407     // Change audio samplerate based on framesize
   405     TSize framesize;
   408     TSize framesize;
   406     TInt samplerate = 0;
   409     TInt samplerate = 0;
   407     TInt channelmode = 0;
   410     TInt channelmode = 0;
   492 
   495 
   493     if ( ( iMaxTargetBitRate != KMMFVariableVideoBitRate ) && ( aBitRate != KMMFVariableVideoBitRate ) )
   496     if ( ( iMaxTargetBitRate != KMMFVariableVideoBitRate ) && ( aBitRate != KMMFVariableVideoBitRate ) )
   494         {
   497         {
   495         TInt abr;
   498         TInt abr;
   496         // check that the total bit-rate (audio+video) does not exceed a given limit
   499         // check that the total bit-rate (audio+video) does not exceed a given limit
   497         iAudioRecorder->TargetBitRateL(abr);
   500         if ( iAudioRecorder != NULL )
   498         if ( iAudioRecorder && iAudioEnabled && ( abr > 0 ) &&
   501             {
   499              ( abr + aBitRate > iMaxTargetBitRate ) )
   502             iAudioRecorder->TargetBitRateL(abr);
   500             {
   503             if ( iAudioEnabled && ( abr > 0 ) &&
   501             PRINT((_L("CCMRMediaRecorderImp::SetVideoBitRateL() too high combined bitrate")));
   504                  ( abr + aBitRate > iMaxTargetBitRate ) )
   502             User::Leave(KErrArgument);
   505                 {
       
   506                 PRINT((_L("CCMRMediaRecorderImp::SetVideoBitRateL() too high combined bitrate")));
       
   507                 User::Leave(KErrArgument);
       
   508                 }
   503             }
   509             }
   504         }
   510         }
   505 
   511 
   506     // this can be changed also while recording
   512     // this can be changed also while recording
   507     iVideoRecorder->SetTargetBitRateL(aBitRate);
   513     iVideoRecorder->SetTargetBitRateL(aBitRate);