QCamera2: Max Fps updated as per typeof(MetaData_t::refreshrate)
Issue: Type of refreshrate is different in different android versions and if same camera code is used across the versions then dereferencing the hardcoded int pointer to float resulting a zero. Fix: Update Max fps as per the type of(MetaData_t->refreshrate) Change-Id: Ifced28cdc56252151be4f41e3e652be41af510a0 CRs-Fixed: 1018231
This commit is contained in:
parent
bacb43c44d
commit
6fb4d87d52
3 changed files with 4 additions and 3 deletions
|
@ -1812,7 +1812,7 @@ void QCameraGrallocMemory::setMaxFPS(int maxFPS)
|
|||
|
||||
/* the new fps will be updated in metadata of the next frame enqueued to display*/
|
||||
mMaxFPS = maxFPS;
|
||||
LOGH("Setting max fps %d to display", mMaxFPS);
|
||||
LOGH("Setting max fps %d to display", maxFPS);
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
|
|
@ -279,7 +279,8 @@ private:
|
|||
int mLocalFlag[MM_CAMERA_MAX_NUM_FRAMES];
|
||||
struct private_handle_t *mPrivateHandle[MM_CAMERA_MAX_NUM_FRAMES];
|
||||
preview_stream_ops_t *mWindow;
|
||||
int mWidth, mHeight, mFormat, mStride, mScanline, mUsage, mMaxFPS;
|
||||
int mWidth, mHeight, mFormat, mStride, mScanline, mUsage;
|
||||
typeof (MetaData_t::refreshrate) mMaxFPS;
|
||||
camera_request_memory mGetMemory;
|
||||
camera_memory_t *mCameraMemory[MM_CAMERA_MAX_NUM_FRAMES];
|
||||
int mMinUndequeuedBuffers;
|
||||
|
|
|
@ -1192,7 +1192,7 @@ void QCamera3HardwareInterface::updateFpsInPreviewBuffer(metadata_buffer_t *meta
|
|||
(1U << CAM_STREAM_TYPE_PREVIEW))) {
|
||||
IF_META_AVAILABLE(cam_fps_range_t, float_range,
|
||||
CAM_INTF_PARM_FPS_RANGE, metadata) {
|
||||
int32_t cameraFps = float_range->max_fps;
|
||||
typeof (MetaData_t::refreshrate) cameraFps = float_range->max_fps;
|
||||
struct private_handle_t *priv_handle =
|
||||
(struct private_handle_t *)(*(j->buffer));
|
||||
setMetaData(priv_handle, UPDATE_REFRESH_RATE, &cameraFps);
|
||||
|
|
Loading…
Reference in a new issue