Before video can be captured, a client calls the CCamera::PrepareVideoCaptureL() function to initialise the required resources. This function enables the client application to set the number of buffers to use and the number of frames per buffer. Buffers are then filled as frames become available. Once a buffer has been filled it is passed to the client via MCameraObserver::FrameBufferReady(). Once the data has been used the buffer should be released by calling the MFrameBuffer::Release() function.
// Start the view finding, and transfer the view finder data.
// Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
iCamera->StartViewFinderBitmapsL( iLandscapeSize );
}
else if (iInfo.iOptionsSupported & TCameraInfo::EViewFinderDirectSupported)
{
User::Leave(KErrNotSupported);
}
else
{
//Images could be taken even without viewfinder, if following is true:
//( iInfo.iOptionsSupported & TCameraInfo::EImageCaptureSupported )
User::Leave(KErrNotSupported);
}
}
and i am not able to save data from MFrameBuffer in the FrameBufferReady function
Forum posts: 72
Maybe you should do like this:
Before video can be captured, a client calls the CCamera::PrepareVideoCaptureL() function to initialise the required resources. This function enables the client application to set the number of buffers to use and the number of frames per buffer. Buffers are then filled as frames become available. Once a buffer has been filled it is passed to the client via MCameraObserver::FrameBufferReady(). Once the data has been used the buffer should be released by calling the MFrameBuffer::Release() function.
Forum posts: 3
yes i did the same in the ccamera application the code is below
void CCameraCaptureEngine::DoViewFinderL()
{
//Default, always supported by API
iCamera->SetExposureL();
TRAPD(ignore, iCamera->SetDigitalZoomFactorL( iZoomFactor ));
if ( iInfo.iOptionsSupported & TCameraInfo::EViewFinderBitmapsSupported )
{
if ( iInfo.iOptionsSupported & TCameraInfo::EImageCaptureSupported
&& !iCapturePrepared ) // first try capturing in EXIF JPEG format
{
// iFormat = CCamera::EFormatExif;
iFormat = CCamera::EFormatFbsBitmapColor16M;
CEikonEnv::Static()->AlertWin(_L("before-prep-video"));
TInt aRateIndex = iInfo.iNumVideoFrameRatesSupported - 1;
TInt aBuffersToUse = 1;
TInt aFramesPerBuffer = iInfo.iMaxFramesPerBufferSupported-2;
CEikonEnv::Static()->AlertWin(_L("2-before-prep-video"));
TRAPD(exifErr, iCamera->PrepareVideoCaptureL(iFormat,KImageSizeIndex,aRateIndex,aBuffersToUse,aFramesPerBuffer));
CEikonEnv::Static()->AlertWin(_L("after preparing video"));
// TRAPD(exifErr, iCamera->PrepareImageCaptureL(iFormat, KImageSizeIndex));
if(exifErr) // capturing in EXIF format not supported,
// fall back to bitmap format
{
/* iFormat = iColorDepthHW;
iCamera->PrepareImageCaptureL(iFormat, 1);*/
}
else // notify controller that we're using EXIF capture mode
{
iCamera->EnumerateCaptureSizes( iCaptureSize, KImageSizeIndex,
iFormat );
iController.SetCaptureModeL( iCaptureSize,
(TInt)iFormat,
(TBool)iAutoFocus );
}
iCapturePrepared = ETrue;
}
// Start the view finding, and transfer the view finder data.
// Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
iCamera->StartViewFinderBitmapsL( iLandscapeSize );
}
else if (iInfo.iOptionsSupported & TCameraInfo::EViewFinderDirectSupported)
{
User::Leave(KErrNotSupported);
}
else
{
//Images could be taken even without viewfinder, if following is true:
//( iInfo.iOptionsSupported & TCameraInfo::EImageCaptureSupported )
User::Leave(KErrNotSupported);
}
}
and i am not able to save data from MFrameBuffer in the FrameBufferReady function
i called capturevideo in the SnapL function
please tell me how to do
Forum posts: 26
Have you tried these examples
http://www.forum.nokia.com/info/sw.n..._1_en.zip.html
http://www.forum.nokia.com/info/sw.n..._0_en.zip.html
Regards,
Parag Purkar