Hey,
I've been trying to get the back camera in a N85 device to start video capturing in 30 fps and although there is clearly a frame rate index for 30 fps it won't open, and instead it opens up in 15 fps.
Here is a little method that iterates through to possible frame rates available and stores the indexes of 15,30 fps for later use.
The LoggerOutNum calls are just a simple log tool that writes to a text file.
This is what I get from the logger when a query is done on the front and back cameras.Code:void GetFrameRateIndex(CCamera *a_pCamera, TCameraInfo &a_tCameraInfo, TInt &a_nSize, TInt* p_pCamVideoFrameRateIndexes ){ TReal32 rFrameRate; //iterate through all frame rates for (TInt i=0;i<a_tCameraInfo.iNumVideoFrameRatesSupported;i++) { //get frame rate for current index a_pCamera->EnumerateVideoFrameRates(rFrameRate, i, CCamera::EFormatYUV420Planar, a_nSize); if ( (TInt)rFrameRate > 13 && (TInt)rFrameRate < 17) { LoggerOutNum(_L("rFrameRate in 15 fps found it is "),(TInt)rFrameRate); LoggerOutNum(_L("rFrameRate in 15 fps found index is "),i); p_pCamVideoFrameRateIndexes[CamEnums::Fps15] = i; } if ( (TInt)rFrameRate > 28 && (TInt)rFrameRate < 32) { LoggerOutNum(_L("rFrameRate in 30 fps found it is "),(TInt)rFrameRate); LoggerOutNum(_L("rFrameRate in 30 fps found index is "),i); p_pCamVideoFrameRateIndexes[CamEnums::Fps30] = i; } }
Back camera
rFrameRate in 30 fps found it is 30
rFrameRate in 30 fps found index is 0
rFrameRate in 15 fps found it is 15
rFrameRate in 15 fps found index is 1
Front camera
rFrameRate in 15 fps found it is 15
rFrameRate in 15 fps found index is 0
As you can see it is clear that the 30 fps option is available.
When I use
Where m_pCamInfo->pBackVideoFrameRateIndexes[m_nFpsInUse] = 0 which is the index that got stored in an earlier stage.Code:TRAP(aError,m_pCamera->PrepareVideoCaptureL(m_pCamInfo->nBackVideoOutFormat, m_pCamInfo->nBackVideoFrameSizeIndex, m_pCamInfo->pBackVideoFrameRateIndexes[m_nFpsInUse], 2, 1));
After setting up the camera it is opened and I get 15 fps instead of 30.
I've double checked the entire process and the indexes being used + the fps calculation, are correct.
does anyone has any idea of why this is happening ? is this some kind of a known issue with the camera api ?
Thank you for your time,
Ita




