multimediacommscontroller/mmccsubcontroller/src/mcccodecconfigurator.cpp
branchRCL_3
changeset 33 f40c1a748eb9
parent 0 1bce908db942
equal deleted inserted replaced
25:fb1bbf85a302 33:f40c1a748eb9
   665             else
   665             else
   666                 {
   666                 {
   667                 __SUBCONTROLLER( "AVC" )
   667                 __SUBCONTROLLER( "AVC" )
   668                 setting.iVideoFourCC = TFourCC( KMccFourCCIdAVC );
   668                 setting.iVideoFourCC = TFourCC( KMccFourCCIdAVC );
   669                 }
   669                 }
   670             // Round to have zero decimals for clearness sake
   670 
   671             User::LeaveIfError( Math::Round( setting.iVideoFrameRate, frameRate, 0 ) );
   671             MccConversionUtility::FrameRateSanitizeL( 
       
   672                 setting.iVideoFrameRate, frameRate, videoType );
       
   673             
   672             setting.iVideoFrameSize.iWidth = videoWidth;
   674             setting.iVideoFrameSize.iWidth = videoWidth;
   673             setting.iVideoFrameSize.iHeight = videoHeight;
   675             setting.iVideoFrameSize.iHeight = videoHeight;
   674             
   676             
   675             // Average bitrate is for the whole stream, 
   677             // Average bitrate is for the whole stream, 
   676             // subtract audio average to get video average
   678             // subtract audio average to get video average
   677             setting.iVideoBitRate = videoAverageBitRate - audioAverageBitRate;
   679             setting.iVideoBitRate = videoAverageBitRate - audioAverageBitRate;
       
   680             
       
   681             MccConversionUtility::BitRateSanitize( 
       
   682                             setting.iVideoBitRate, setting.iVideoBitRate, videoType );
   678             }
   683             }
   679         else
   684         else
   680             {
   685             {
   681             __SUBCONTROLLER( 
   686             __SUBCONTROLLER( 
   682             "MccCodecConfigurator::DoGetClipConfigurationL, file contains unsupported video" )
   687             "MccCodecConfigurator::DoGetClipConfigurationL, file contains unsupported video" )