Skip to content

Commit

Permalink
V4L/DVB (4200): Disable bitrate_mode when encoding mpeg-1.
Browse files Browse the repository at this point in the history
MPEG-1 always uses CBR, so make the BITRATE_MODE control inactive.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent cc7bc64 commit 54aa9a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/video/cx2341x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 54aa9a2

Please sign in to comment.