From 0f9c47f021dff0b36a1d13014e814fd5de03dc84 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 19 Jun 2006 23:00:06 +0200 Subject: Disable bitrate_mode when encoding mpeg-1. From: Hans Verkuil MPEG-1 always uses CBR, so make the BITRATE_MODE control inactive. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx2341x.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux/drivers/media/video/cx2341x.c') diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c index 1381fdc63..33e955f7c 100644 --- a/linux/drivers/media/video/cx2341x.c +++ b/linux/drivers/media/video/cx2341x.c @@ -410,6 +410,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) -- cgit v1.2.3