summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-08 12:21:00 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-08-08 12:21:00 +0200
commita938ca9971031bb3895c624e6bc26d92da85a960 (patch)
treee375dd48ff1954d1dbcc688f349407871d338fd9 /linux/drivers/media/video
parent387f6919b61c886b36fea9568a6ad6e0842c2e6f (diff)
downloadmediapointer-dvb-s2-a938ca9971031bb3895c624e6bc26d92da85a960.tar.gz
mediapointer-dvb-s2-a938ca9971031bb3895c624e6bc26d92da85a960.tar.bz2
v4l2: extend MPEG Encoding API with AVC and AAC
From: Janne Grunau <j@jannau.net> Adds Advanced Audio Coding (AAC) and MPEG-4 Advanced Video Coding (AVC/H.264) as audio/video codecs to the extended controls API. Updates cx2341x driver to the new values. Priority: normal Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx2341x.c5
-rw-r--r--linux/drivers/media/video/v4l2-common.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c
index 835062f5b..f31f11e3f 100644
--- a/linux/drivers/media/video/cx2341x.c
+++ b/linux/drivers/media/video/cx2341x.c
@@ -509,7 +509,10 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params,
/* this setting is read-only for the cx2341x since the
V4L2_CID_MPEG_STREAM_TYPE really determines the
MPEG-1/2 setting */
- err = v4l2_ctrl_query_fill_std(qctrl);
+ err = v4l2_ctrl_query_fill(qctrl,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_1,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_2, 1,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_2);
if (err == 0)
qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
return err;
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index a027d9baa..486897b29 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -188,9 +188,10 @@ const char **v4l2_ctrl_get_menu(u32 id)
NULL
};
static const char *mpeg_audio_encoding[] = {
- "Layer I",
- "Layer II",
- "Layer III",
+ "MPEG-1 Layer I",
+ "MPEG-1 Layer II",
+ "MPEG-1 Layer III",
+ "MPEG-4 AAC",
NULL
};
static const char *mpeg_audio_l1_bitrate[] = {
@@ -272,6 +273,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
static const char *mpeg_video_encoding[] = {
"MPEG-1",
"MPEG-2",
+ "MPEG-4 AVC",
NULL
};
static const char *mpeg_video_aspect[] = {
@@ -359,7 +361,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
/* MPEG controls */
case V4L2_CID_MPEG_CLASS: name = "MPEG Encoder Controls"; break;
case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: name = "Audio Sampling Frequency"; break;
- case V4L2_CID_MPEG_AUDIO_ENCODING: name = "Audio Encoding Layer"; break;
+ case V4L2_CID_MPEG_AUDIO_ENCODING: name = "Audio Encoding"; break;
case V4L2_CID_MPEG_AUDIO_L1_BITRATE: name = "Audio Layer I Bitrate"; break;
case V4L2_CID_MPEG_AUDIO_L2_BITRATE: name = "Audio Layer II Bitrate"; break;
case V4L2_CID_MPEG_AUDIO_L3_BITRATE: name = "Audio Layer III Bitrate"; break;
@@ -494,7 +496,7 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
case V4L2_CID_MPEG_AUDIO_ENCODING:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_AUDIO_ENCODING_LAYER_1,
- V4L2_MPEG_AUDIO_ENCODING_LAYER_3, 1,
+ V4L2_MPEG_AUDIO_ENCODING_AAC, 1,
V4L2_MPEG_AUDIO_ENCODING_LAYER_2);
case V4L2_CID_MPEG_AUDIO_L1_BITRATE:
return v4l2_ctrl_query_fill(qctrl,
@@ -536,7 +538,7 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
case V4L2_CID_MPEG_VIDEO_ENCODING:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_VIDEO_ENCODING_MPEG_1,
- V4L2_MPEG_VIDEO_ENCODING_MPEG_2, 1,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 1,
V4L2_MPEG_VIDEO_ENCODING_MPEG_2);
case V4L2_CID_MPEG_VIDEO_ASPECT:
return v4l2_ctrl_query_fill(qctrl,