regarding CCamera

Login to reply to this topic.
Mon, 2007-07-16 12:37
Joined: 2007-05-29
Forum posts: 3

hi

can anybody tell how to record video using
CCamera::StartVideoCaptureL()
class (function)


Tue, 2007-07-17 13:31
Joined: 2004-12-07
Forum posts: 72
Re: regarding CCamera

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.

Thu, 2007-07-19 06:07
Joined: 2007-05-29
Forum posts: 3
Re: regarding CCamera

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

Tue, 2007-07-24 12:06
Joined: 2005-01-18
Forum posts: 26
Re: regarding CCamera
  • Login to reply to this topic.