aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-common.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-06-24 13:36:02 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-26 08:21:45 -0400
commit8cbde94be34f95c01515ba19ce32bcd51ab3949e (patch)
treef01514f3cf11dcada4d9e9e68708c0292ebb7fcf /drivers/media/video/v4l2-common.c
parent4f725cb3fa46fabe7fd7c7175fa77e12616bfdb8 (diff)
V4L/DVB (4223): Add V4L2_CID_MPEG_STREAM_VBI_FMT control
V4L2_CID_MPEG_STREAM_VBI_FMT controls if and how VBI data is embedded in an MPEG stream. Currently only one format is supported: the format designed for the ivtv driver. This should be extended with new standard formats (such as defined for DVB) in the future. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r--drivers/media/video/v4l2-common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index 14e523471354..f4b3d64ebf73 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -1101,6 +1101,11 @@ const char **v4l2_ctrl_get_menu(u32 id)
1101 "MPEG-2 SVCD-compatible Stream", 1101 "MPEG-2 SVCD-compatible Stream",
1102 NULL 1102 NULL
1103 }; 1103 };
1104 static const char *mpeg_stream_vbi_fmt[] = {
1105 "No VBI",
1106 "VBI in private packets, IVTV format",
1107 NULL
1108 };
1104 1109
1105 switch (id) { 1110 switch (id) {
1106 case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: 1111 case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
@@ -1129,6 +1134,8 @@ const char **v4l2_ctrl_get_menu(u32 id)
1129 return mpeg_video_bitrate_mode; 1134 return mpeg_video_bitrate_mode;
1130 case V4L2_CID_MPEG_STREAM_TYPE: 1135 case V4L2_CID_MPEG_STREAM_TYPE:
1131 return mpeg_stream_type; 1136 return mpeg_stream_type;
1137 case V4L2_CID_MPEG_STREAM_VBI_FMT:
1138 return mpeg_stream_vbi_fmt;
1132 default: 1139 default:
1133 return NULL; 1140 return NULL;
1134 } 1141 }
@@ -1182,6 +1189,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
1182 case V4L2_CID_MPEG_STREAM_PID_PCR: name = "Stream PCR Program ID"; break; 1189 case V4L2_CID_MPEG_STREAM_PID_PCR: name = "Stream PCR Program ID"; break;
1183 case V4L2_CID_MPEG_STREAM_PES_ID_AUDIO: name = "Stream PES Audio ID"; break; 1190 case V4L2_CID_MPEG_STREAM_PES_ID_AUDIO: name = "Stream PES Audio ID"; break;
1184 case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: name = "Stream PES Video ID"; break; 1191 case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: name = "Stream PES Video ID"; break;
1192 case V4L2_CID_MPEG_STREAM_VBI_FMT: name = "Stream VBI Format"; break;
1185 1193
1186 default: 1194 default:
1187 return -EINVAL; 1195 return -EINVAL;
@@ -1208,6 +1216,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
1208 case V4L2_CID_MPEG_VIDEO_ASPECT: 1216 case V4L2_CID_MPEG_VIDEO_ASPECT:
1209 case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: 1217 case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
1210 case V4L2_CID_MPEG_STREAM_TYPE: 1218 case V4L2_CID_MPEG_STREAM_TYPE:
1219 case V4L2_CID_MPEG_STREAM_VBI_FMT:
1211 qctrl->type = V4L2_CTRL_TYPE_MENU; 1220 qctrl->type = V4L2_CTRL_TYPE_MENU;
1212 step = 1; 1221 step = 1;
1213 break; 1222 break;
@@ -1367,6 +1376,11 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
1367 return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); 1376 return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0);
1368 case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: 1377 case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO:
1369 return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); 1378 return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0);
1379 case V4L2_CID_MPEG_STREAM_VBI_FMT:
1380 return v4l2_ctrl_query_fill(qctrl,
1381 V4L2_MPEG_STREAM_VBI_FMT_NONE,
1382 V4L2_MPEG_STREAM_VBI_FMT_IVTV, 1,
1383 V4L2_MPEG_STREAM_VBI_FMT_NONE);
1370 default: 1384 default:
1371 return -EINVAL; 1385 return -EINVAL;
1372 } 1386 }