mm-video: vdec: Set format with adaptive playback framesize
Client passes frame size along with adaptive playback set
parameter call, this frame size is needed to be sent to the
video core.
CRs-fixed: 609447
Change-Id: I68c7dbcc12af1f5aaac77f4b0910c5509879fa47
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
index 982bf6d..afe4dc2 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
@@ -3614,26 +3614,24 @@
m_smoothstreaming_width = pParams->nMaxFrameWidth;
m_smoothstreaming_height = pParams->nMaxFrameHeight;
}
- if(is_q6_platform) {
- struct v4l2_format fmt;
- update_resolution(m_smoothstreaming_width, m_smoothstreaming_height,
- m_smoothstreaming_width, m_smoothstreaming_height);
- eRet = is_video_session_supported();
- if (eRet)
- break;
- fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- fmt.fmt.pix_mp.height = drv_ctx.video_resolution.frame_height;
- fmt.fmt.pix_mp.width = drv_ctx.video_resolution.frame_width;
- fmt.fmt.pix_mp.pixelformat = output_capability;
- DEBUG_PRINT_LOW("fmt.fmt.pix_mp.height = %d , fmt.fmt.pix_mp.width = %d",
- fmt.fmt.pix_mp.height,fmt.fmt.pix_mp.width);
- ret = ioctl(drv_ctx.video_driver_fd, VIDIOC_S_FMT, &fmt);
- if (ret) {
- DEBUG_PRINT_ERROR("Set Resolution failed");
- eRet = OMX_ErrorUnsupportedSetting;
- } else
- eRet = get_buffer_req(&drv_ctx.op_buf);
- }
+ struct v4l2_format fmt;
+ update_resolution(m_smoothstreaming_width, m_smoothstreaming_height,
+ m_smoothstreaming_width, m_smoothstreaming_height);
+ eRet = is_video_session_supported();
+ if (eRet)
+ break;
+ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
+ fmt.fmt.pix_mp.height = drv_ctx.video_resolution.frame_height;
+ fmt.fmt.pix_mp.width = drv_ctx.video_resolution.frame_width;
+ fmt.fmt.pix_mp.pixelformat = output_capability;
+ DEBUG_PRINT_LOW("fmt.fmt.pix_mp.height = %d , fmt.fmt.pix_mp.width = %d",
+ fmt.fmt.pix_mp.height,fmt.fmt.pix_mp.width);
+ ret = ioctl(drv_ctx.video_driver_fd, VIDIOC_S_FMT, &fmt);
+ if (ret) {
+ DEBUG_PRINT_ERROR("Set Resolution failed");
+ eRet = OMX_ErrorUnsupportedSetting;
+ } else
+ eRet = get_buffer_req(&drv_ctx.op_buf);
}
} else {
DEBUG_PRINT_ERROR(