diff options
author | Santhosh Behara <santhoshbehara@codeaurora.org> | 2017-06-23 11:50:40 +0530 |
---|---|---|
committer | Zhuoyao Zhang <zhuoyao@google.com> | 2017-08-04 00:48:59 +0000 |
commit | 79d5f68936b36fd9537912850c7694a4aa331f57 (patch) | |
tree | 0688a6798f3516987549da7ce4cc91a92eee34ff /msm8998 | |
parent | 6d288d5fac25c31d99d15c9368443e5e9b0454c4 (diff) | |
download | media-79d5f68936b36fd9537912850c7694a4aa331f57.tar.gz |
mm-video-v4l2: venc: Change QBUF and STREAM_ON call sequence
By calling STREAM_ON after QBUF, and meanwhile if there is
any buffer requirements query, there is a chance that queued
buffer will be ignored by driver. Hence changing the QBUF and
STREAM_ON sequence.
CRs-Fixed: 2065953
Author : Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Bug: 62602083
Test: make vts
vts-tradefed run vts -m VtsHalMediaOmxV1_0Host
Merged-In: I0ec277a5b245d7b4aa343030ca74a2d86d7d91c1
Change-Id: I0ec277a5b245d7b4aa343030ca74a2d86d7d91c1
Diffstat (limited to 'msm8998')
-rw-r--r-- | msm8998/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/msm8998/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/msm8998/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp index 4e026c0..49797ca 100644 --- a/msm8998/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp +++ b/msm8998/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp @@ -4166,6 +4166,24 @@ bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, } #endif // _PQ_ + if (!streaming[OUTPUT_PORT]) { + enum v4l2_buf_type buf_type; + buf_type=V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; + int ret; + + ret = ioctl(m_nDriver_fd, VIDIOC_STREAMON, &buf_type); + + if (ret) { + DEBUG_PRINT_ERROR("Failed to call streamon"); + if (errno == EBUSY) { + hw_overload = true; + } + return false; + } else { + streaming[OUTPUT_PORT] = true; + } + } + buf.index = index; buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; buf.memory = V4L2_MEMORY_USERPTR; @@ -4201,24 +4219,6 @@ bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, etb++; - if (!streaming[OUTPUT_PORT]) { - enum v4l2_buf_type buf_type; - buf_type=V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; - int ret; - - ret = ioctl(m_nDriver_fd, VIDIOC_STREAMON, &buf_type); - - if (ret) { - DEBUG_PRINT_ERROR("Failed to call streamon"); - if (errno == EBUSY) { - hw_overload = true; - } - return false; - } else { - streaming[OUTPUT_PORT] = true; - } - } - return true; } |