From 54aa9a21ca03cf41d911ada969e86f27ce58bab9 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 19 Jun 2006 18:00:06 -0300 Subject: [PATCH] V4L/DVB (4200): Disable bitrate_mode when encoding mpeg-1. MPEG-1 always uses CBR, so make the BITRATE_MODE control inactive. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx2341x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c index 4c457dc6a4..7cd1c4cf5a 100644 --- a/drivers/media/video/cx2341x.c +++ b/drivers/media/video/cx2341x.c @@ -406,6 +406,12 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; return err; + case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: + err = v4l2_ctrl_query_fill_std(qctrl); + if (err == 0 && params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) + qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; + return err; + case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: err = v4l2_ctrl_query_fill_std(qctrl); if (err == 0 && params->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) -- 2.39.5