| ID | KIS001471 | Creation date | October 29, 2009 |
| Platform | S60 3rd Edition, FP2 | Devices | Nokia N96 |
| Category | Multimedia | Subcategory | Video |
| Keywords (APIs, classes, methods, functions): |
To record a video on the Nokia N96, additional settings are needed as the N96 hardware is different from other S60 devices.
The N96 uses hardware codecs which require additional settings compared to other S60 devices. When the DevVideo Record example is run on the Nokia N96, the application fails with the KErrNotReady (-18) error while calling CMMFDevVideoRecord::WritePictureL(), or with KErrNotSupported (-5) if the camera has been set as the video source with CMMFDevVideoRecord::SetSourceCameraL().
The DevVideo Record example can be used to reproduce the problem on the Nokia N96.
To ensure that MDF DevVideo encoders work on the Nokia N96, call the CMMFDevVideoRecord::SetRateControlOptions() function in MMMFDevVideoRecordObserver::MdvroInitializeComplete before calling CMMFDevVideoRecord::Start().
void CDevvideoExAppUi::MdvroInitializeComplete( TInt aError )
{
if ( aError != KErrNone )
{
// TODO: Handle errors
return;
}
// Set rate control options
TRateControlOptions rateCtrl;
rateCtrl.iControl = EBrControlNone;
rateCtrl.iPictureQuality = 0;
rateCtrl.iBitrate = iBitRate;
rateCtrl.iPictureRate = iFrameRate;
rateCtrl.iQualityTemporalTradeoff = 0;
rateCtrl.iLatencyQualityTradeoff = 0;
iDvr->SetRateControlOptions( 0, rateCtrl );
// Start encoding
iDvr->Start();
// Write first input picture
iPicNum = 0;
WritePic();
}
No related wiki articles found