[media] go7007: add back 'repeat sequence header' control
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 17 Mar 2013 13:47:02 +0000 (10:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 24 Mar 2013 15:59:42 +0000 (12:59 -0300)
But now as a proper standard MPEG control.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/go7007/go7007-priv.h
drivers/staging/media/go7007/go7007-v4l2.c

index 5f9b38955f4038c150a80adcc284711f188279e5..cfa4c8474744b5848bbb1d58942bd637af835edb 100644 (file)
@@ -167,6 +167,7 @@ struct go7007 {
        struct v4l2_ctrl *mpeg_video_bitrate;
        struct v4l2_ctrl *mpeg_video_aspect_ratio;
        struct v4l2_ctrl *mpeg_video_b_frames;
+       struct v4l2_ctrl *mpeg_video_rep_seqheader;
        enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status;
        spinlock_t spinlock;
        struct mutex hw_lock;
index 0dc316063b5d6c1282d65586934a0f65af30bb69..45be5189e9446d07b73a7063b98dd9022e831da9 100644 (file)
@@ -163,6 +163,7 @@ static void set_formatting(struct go7007 *go)
        go->closed_gop = v4l2_ctrl_g_ctrl(go->mpeg_video_gop_closure);
        go->ipb = v4l2_ctrl_g_ctrl(go->mpeg_video_b_frames) != 0;
        go->bitrate = v4l2_ctrl_g_ctrl(go->mpeg_video_bitrate);
+       go->repeat_seqhead = v4l2_ctrl_g_ctrl(go->mpeg_video_rep_seqheader);
        go->gop_header_enable = 1;
        go->dvd_mode = 0;
        if (go->format == V4L2_PIX_FMT_MPEG2)
@@ -170,8 +171,8 @@ static void set_formatting(struct go7007 *go)
                        go->bitrate == 9800000 &&
                        go->gop_size == 15 &&
                        go->ipb == 0 &&
+                       go->repeat_seqhead == 1 &&
                        go->closed_gop;
-       go->repeat_seqhead = go->dvd_mode;
 
        switch (v4l2_ctrl_g_ctrl(go->mpeg_video_aspect_ratio)) {
        default:
@@ -946,6 +947,8 @@ int go7007_v4l2_ctrl_init(struct go7007 *go)
                        64000, 10000000, 1, 9800000);
        go->mpeg_video_b_frames = v4l2_ctrl_new_std(hdl, NULL,
                        V4L2_CID_MPEG_VIDEO_B_FRAMES, 0, 2, 2, 0);
+       go->mpeg_video_rep_seqheader = v4l2_ctrl_new_std(hdl, NULL,
+                       V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER, 0, 1, 1, 1);
 
        go->mpeg_video_aspect_ratio = v4l2_ctrl_new_std_menu(hdl, NULL,
                        V4L2_CID_MPEG_VIDEO_ASPECT,