diff options
| author | Arun Menon <avmenon@codeaurora.org> | 2013-10-30 17:07:23 -0700 |
|---|---|---|
| committer | Vineeta Srivastava <vsrivastava@google.com> | 2013-11-12 12:56:08 -0800 |
| commit | cf8408186605323a6797e5f431192ab434e79fff (patch) | |
| tree | 8528cc03d9e38f25d0389350da9ddaa81717389a | |
| parent | 2e277fbebd51de1d4f029f7950ed2a98731177dc (diff) | |
| download | android_hardware_qcom_media-cf8408186605323a6797e5f431192ab434e79fff.tar.gz android_hardware_qcom_media-cf8408186605323a6797e5f431192ab434e79fff.tar.bz2 android_hardware_qcom_media-cf8408186605323a6797e5f431192ab434e79fff.zip | |
mm-video: vidc: venc: add set ctrl to request sequence header
The omx component can explicitly request for sequence header
using the set ctrl id - V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER.
The omx component should not rely on the driver to
send sequence header on it's own.
b/11051201
Change-Id: Ie5c2adc11c15b84a7f659d75357a09b7758ea199
| -rw-r--r--[-rwxr-xr-x] | mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp index 7dcfcb44..ef7de6f5 100755..100644 --- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp +++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp @@ -1549,7 +1549,9 @@ unsigned venc_dev::venc_start(void) { enum v4l2_buf_type buf_type; int ret,r; - DEBUG_PRINT_HIGH("\n %s(): Check Profile/Level set in driver before start", + struct v4l2_control control = {0}; + + DEBUG_PRINT_HIGH("%s(): Check Profile/Level set in driver before start", __func__); if (!venc_set_profile_level(0, 0)) { @@ -1585,6 +1587,15 @@ unsigned venc_dev::venc_start(void) return 1; streaming[CAPTURE_PORT] = true; + + control.id = V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER; + control.value = 1; + ret = ioctl(m_nDriver_fd, VIDIOC_S_CTRL, &control); + if (ret) { + DEBUG_PRINT_ERROR("failed to request seq header"); + return 1; + } + stopped = 0; return 0; } |
