multimediacommscontroller/mmccsubcontroller/src/mcccodecconfigurator.cpp
changeset 34 fc48eff9c76c
parent 0 1bce908db942
child 30 4c9e1ec7a69e
equal deleted inserted replaced
28:434647e7f45b 34:fc48eff9c76c
   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::FrameRateSanitize( 
       
   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" )