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
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
old mode 100755
new mode 100644
index 7dcfcb4..ef7de6f
--- 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 @@
 {
     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 @@
         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;
 }