diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-10-11 05:38:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-22 10:01:30 -0400 |
commit | 3bcc95760c9ee7adb8509173b78914339baa7f4f (patch) | |
tree | 46eb04c847a1eb5bf5c03d90f48487c7cc02c13a | |
parent | 22c4a4e98ece0eaff13b3d0ac73c5283013eb6b1 (diff) |
V4L/DVB (6321): Remove obsolete VIDIOC_S/G_MPEGCOMP ioctls
Remove the obsolete VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls from
the V4L2 API as per the removal schedule (October 2007).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 57 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa6752hs.c | 111 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 11 | ||||
-rw-r--r-- | drivers/media/video/v4l2-common.c | 2 | ||||
-rw-r--r-- | drivers/media/video/videodev.c | 42 | ||||
-rw-r--r-- | include/linux/videodev2.h | 92 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 4 |
7 files changed, 0 insertions, 319 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index 6d6f5048d762..f33f0b47142c 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -527,44 +527,6 @@ static void blackbird_codec_settings(struct cx8802_dev *dev) | |||
527 | cx2341x_update(dev, blackbird_mbox_func, NULL, &dev->params); | 527 | cx2341x_update(dev, blackbird_mbox_func, NULL, &dev->params); |
528 | } | 528 | } |
529 | 529 | ||
530 | static struct v4l2_mpeg_compression default_mpeg_params = { | ||
531 | .st_type = V4L2_MPEG_PS_2, | ||
532 | .st_bitrate = { | ||
533 | .mode = V4L2_BITRATE_CBR, | ||
534 | .min = 0, | ||
535 | .target = 0, | ||
536 | .max = 0 | ||
537 | }, | ||
538 | .ts_pid_pmt = 16, | ||
539 | .ts_pid_audio = 260, | ||
540 | .ts_pid_video = 256, | ||
541 | .ts_pid_pcr = 259, | ||
542 | .ps_size = 0, | ||
543 | .au_type = V4L2_MPEG_AU_2_II, | ||
544 | .au_bitrate = { | ||
545 | .mode = V4L2_BITRATE_CBR, | ||
546 | .min = 224, | ||
547 | .target = 224, | ||
548 | .max = 224 | ||
549 | }, | ||
550 | .au_sample_rate = 48000, | ||
551 | .au_pesid = 0, | ||
552 | .vi_type = V4L2_MPEG_VI_2, | ||
553 | .vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3, | ||
554 | .vi_bitrate = { | ||
555 | .mode = V4L2_BITRATE_CBR, | ||
556 | .min = 4000, | ||
557 | .target = 4500, | ||
558 | .max = 6000 | ||
559 | }, | ||
560 | .vi_frame_rate = 25, | ||
561 | .vi_frames_per_gop = 12, | ||
562 | .vi_bframes_count = 2, | ||
563 | .vi_pesid = 0, | ||
564 | .closed_gops = 1, | ||
565 | .pulldown = 0 | ||
566 | }; | ||
567 | |||
568 | static int blackbird_initialize_codec(struct cx8802_dev *dev) | 530 | static int blackbird_initialize_codec(struct cx8802_dev *dev) |
569 | { | 531 | { |
570 | struct cx88_core *core = dev->core; | 532 | struct cx88_core *core = dev->core; |
@@ -852,23 +814,6 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) | |||
852 | return videobuf_streamoff(&fh->mpegq); | 814 | return videobuf_streamoff(&fh->mpegq); |
853 | } | 815 | } |
854 | 816 | ||
855 | static int vidioc_g_mpegcomp (struct file *file, void *fh, | ||
856 | struct v4l2_mpeg_compression *f) | ||
857 | { | ||
858 | printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " | ||
859 | "Replace with VIDIOC_G_EXT_CTRLS!"); | ||
860 | memcpy(f,&default_mpeg_params,sizeof(*f)); | ||
861 | return 0; | ||
862 | } | ||
863 | |||
864 | static int vidioc_s_mpegcomp (struct file *file, void *fh, | ||
865 | struct v4l2_mpeg_compression *f) | ||
866 | { | ||
867 | printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " | ||
868 | "Replace with VIDIOC_S_EXT_CTRLS!"); | ||
869 | return 0; | ||
870 | } | ||
871 | |||
872 | static int vidioc_g_ext_ctrls (struct file *file, void *priv, | 817 | static int vidioc_g_ext_ctrls (struct file *file, void *priv, |
873 | struct v4l2_ext_controls *f) | 818 | struct v4l2_ext_controls *f) |
874 | { | 819 | { |
@@ -1216,8 +1161,6 @@ static struct video_device cx8802_mpeg_template = | |||
1216 | .vidioc_dqbuf = vidioc_dqbuf, | 1161 | .vidioc_dqbuf = vidioc_dqbuf, |
1217 | .vidioc_streamon = vidioc_streamon, | 1162 | .vidioc_streamon = vidioc_streamon, |
1218 | .vidioc_streamoff = vidioc_streamoff, | 1163 | .vidioc_streamoff = vidioc_streamoff, |
1219 | .vidioc_g_mpegcomp = vidioc_g_mpegcomp, | ||
1220 | .vidioc_s_mpegcomp = vidioc_s_mpegcomp, | ||
1221 | .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls, | 1164 | .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls, |
1222 | .vidioc_s_ext_ctrls = vidioc_s_ext_ctrls, | 1165 | .vidioc_s_ext_ctrls = vidioc_s_ext_ctrls, |
1223 | .vidioc_try_ext_ctrls = vidioc_try_ext_ctrls, | 1166 | .vidioc_try_ext_ctrls = vidioc_try_ext_ctrls, |
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index 57f1f5d409e0..002e70a33a4f 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c | |||
@@ -71,7 +71,6 @@ static const struct v4l2_format v4l2_format_table[] = | |||
71 | 71 | ||
72 | struct saa6752hs_state { | 72 | struct saa6752hs_state { |
73 | struct i2c_client client; | 73 | struct i2c_client client; |
74 | struct v4l2_mpeg_compression old_params; | ||
75 | struct saa6752hs_mpeg_params params; | 74 | struct saa6752hs_mpeg_params params; |
76 | enum saa6752hs_videoformat video_format; | 75 | enum saa6752hs_videoformat video_format; |
77 | v4l2_std_id standard; | 76 | v4l2_std_id standard; |
@@ -161,35 +160,6 @@ static struct saa6752hs_mpeg_params param_defaults = | |||
161 | .au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K, | 160 | .au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K, |
162 | }; | 161 | }; |
163 | 162 | ||
164 | static struct v4l2_mpeg_compression old_param_defaults = | ||
165 | { | ||
166 | .st_type = V4L2_MPEG_TS_2, | ||
167 | .st_bitrate = { | ||
168 | .mode = V4L2_BITRATE_CBR, | ||
169 | .target = 7000, | ||
170 | }, | ||
171 | |||
172 | .ts_pid_pmt = 16, | ||
173 | .ts_pid_video = 260, | ||
174 | .ts_pid_audio = 256, | ||
175 | .ts_pid_pcr = 259, | ||
176 | |||
177 | .vi_type = V4L2_MPEG_VI_2, | ||
178 | .vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3, | ||
179 | .vi_bitrate = { | ||
180 | .mode = V4L2_BITRATE_VBR, | ||
181 | .target = 4000, | ||
182 | .max = 6000, | ||
183 | }, | ||
184 | |||
185 | .au_type = V4L2_MPEG_AU_2_II, | ||
186 | .au_bitrate = { | ||
187 | .mode = V4L2_BITRATE_CBR, | ||
188 | .target = 256, | ||
189 | }, | ||
190 | |||
191 | }; | ||
192 | |||
193 | /* ---------------------------------------------------------------------- */ | 163 | /* ---------------------------------------------------------------------- */ |
194 | 164 | ||
195 | static int saa6752hs_chip_command(struct i2c_client* client, | 165 | static int saa6752hs_chip_command(struct i2c_client* client, |
@@ -362,74 +332,6 @@ static void saa6752hs_set_subsampling(struct i2c_client* client, | |||
362 | } | 332 | } |
363 | 333 | ||
364 | 334 | ||
365 | static void saa6752hs_old_set_params(struct i2c_client* client, | ||
366 | struct v4l2_mpeg_compression* params) | ||
367 | { | ||
368 | struct saa6752hs_state *h = i2c_get_clientdata(client); | ||
369 | |||
370 | /* check PIDs */ | ||
371 | if (params->ts_pid_pmt <= MPEG_PID_MAX) { | ||
372 | h->old_params.ts_pid_pmt = params->ts_pid_pmt; | ||
373 | h->params.ts_pid_pmt = params->ts_pid_pmt; | ||
374 | } | ||
375 | if (params->ts_pid_pcr <= MPEG_PID_MAX) { | ||
376 | h->old_params.ts_pid_pcr = params->ts_pid_pcr; | ||
377 | h->params.ts_pid_pcr = params->ts_pid_pcr; | ||
378 | } | ||
379 | if (params->ts_pid_video <= MPEG_PID_MAX) { | ||
380 | h->old_params.ts_pid_video = params->ts_pid_video; | ||
381 | h->params.ts_pid_video = params->ts_pid_video; | ||
382 | } | ||
383 | if (params->ts_pid_audio <= MPEG_PID_MAX) { | ||
384 | h->old_params.ts_pid_audio = params->ts_pid_audio; | ||
385 | h->params.ts_pid_audio = params->ts_pid_audio; | ||
386 | } | ||
387 | |||
388 | /* check bitrate parameters */ | ||
389 | if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) || | ||
390 | (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) { | ||
391 | h->old_params.vi_bitrate.mode = params->vi_bitrate.mode; | ||
392 | h->params.vi_bitrate_mode = (params->vi_bitrate.mode == V4L2_BITRATE_VBR) ? | ||
393 | V4L2_MPEG_VIDEO_BITRATE_MODE_VBR : V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; | ||
394 | } | ||
395 | if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) | ||
396 | h->old_params.st_bitrate.target = params->st_bitrate.target; | ||
397 | if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) | ||
398 | h->old_params.vi_bitrate.target = params->vi_bitrate.target; | ||
399 | if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) | ||
400 | h->old_params.vi_bitrate.max = params->vi_bitrate.max; | ||
401 | if (params->au_bitrate.mode != V4L2_BITRATE_NONE) | ||
402 | h->old_params.au_bitrate.target = params->au_bitrate.target; | ||
403 | |||
404 | /* aspect ratio */ | ||
405 | if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3 || | ||
406 | params->vi_aspect_ratio == V4L2_MPEG_ASPECT_16_9) { | ||
407 | h->old_params.vi_aspect_ratio = params->vi_aspect_ratio; | ||
408 | if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3) | ||
409 | h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3; | ||
410 | else | ||
411 | h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_16x9; | ||
412 | } | ||
413 | |||
414 | /* range checks */ | ||
415 | if (h->old_params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) | ||
416 | h->old_params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; | ||
417 | if (h->old_params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) | ||
418 | h->old_params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; | ||
419 | if (h->old_params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) | ||
420 | h->old_params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; | ||
421 | h->params.vi_bitrate = params->vi_bitrate.target; | ||
422 | h->params.vi_bitrate_peak = params->vi_bitrate.max; | ||
423 | if (h->old_params.au_bitrate.target <= 256) { | ||
424 | h->old_params.au_bitrate.target = 256; | ||
425 | h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K; | ||
426 | } | ||
427 | else { | ||
428 | h->old_params.au_bitrate.target = 384; | ||
429 | h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_384K; | ||
430 | } | ||
431 | } | ||
432 | |||
433 | static int handle_ctrl(struct saa6752hs_mpeg_params *params, | 335 | static int handle_ctrl(struct saa6752hs_mpeg_params *params, |
434 | struct v4l2_ext_control *ctrl, unsigned int cmd) | 336 | struct v4l2_ext_control *ctrl, unsigned int cmd) |
435 | { | 337 | { |
@@ -697,7 +599,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) | |||
697 | return -ENOMEM; | 599 | return -ENOMEM; |
698 | h->client = client_template; | 600 | h->client = client_template; |
699 | h->params = param_defaults; | 601 | h->params = param_defaults; |
700 | h->old_params = old_param_defaults; | ||
701 | h->client.adapter = adap; | 602 | h->client.adapter = adap; |
702 | h->client.addr = addr; | 603 | h->client.addr = addr; |
703 | 604 | ||
@@ -734,23 +635,11 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
734 | { | 635 | { |
735 | struct saa6752hs_state *h = i2c_get_clientdata(client); | 636 | struct saa6752hs_state *h = i2c_get_clientdata(client); |
736 | struct v4l2_ext_controls *ctrls = arg; | 637 | struct v4l2_ext_controls *ctrls = arg; |
737 | struct v4l2_mpeg_compression *old_params = arg; | ||
738 | struct saa6752hs_mpeg_params params; | 638 | struct saa6752hs_mpeg_params params; |
739 | int err = 0; | 639 | int err = 0; |
740 | int i; | 640 | int i; |
741 | 641 | ||
742 | switch (cmd) { | 642 | switch (cmd) { |
743 | case VIDIOC_S_MPEGCOMP: | ||
744 | if (NULL == old_params) { | ||
745 | /* apply settings and start encoder */ | ||
746 | saa6752hs_init(client); | ||
747 | break; | ||
748 | } | ||
749 | saa6752hs_old_set_params(client, old_params); | ||
750 | /* fall through */ | ||
751 | case VIDIOC_G_MPEGCOMP: | ||
752 | *old_params = h->old_params; | ||
753 | break; | ||
754 | case VIDIOC_S_EXT_CTRLS: | 643 | case VIDIOC_S_EXT_CTRLS: |
755 | if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) | 644 | if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) |
756 | return -EINVAL; | 645 | return -EINVAL; |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 0a7d94319685..75d0c5bf46d2 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -284,17 +284,6 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, | |||
284 | case VIDIOC_S_CTRL: | 284 | case VIDIOC_S_CTRL: |
285 | return saa7134_common_ioctl(dev, cmd, arg); | 285 | return saa7134_common_ioctl(dev, cmd, arg); |
286 | 286 | ||
287 | case VIDIOC_S_MPEGCOMP: | ||
288 | printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " | ||
289 | "Replace with VIDIOC_S_EXT_CTRLS!"); | ||
290 | saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg); | ||
291 | ts_init_encoder(dev); | ||
292 | return 0; | ||
293 | case VIDIOC_G_MPEGCOMP: | ||
294 | printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " | ||
295 | "Replace with VIDIOC_G_EXT_CTRLS!"); | ||
296 | saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg); | ||
297 | return 0; | ||
298 | case VIDIOC_S_EXT_CTRLS: | 287 | case VIDIOC_S_EXT_CTRLS: |
299 | /* count == 0 is abused in saa6752hs.c, so that special | 288 | /* count == 0 is abused in saa6752hs.c, so that special |
300 | case is handled here explicitly. */ | 289 | case is handled here explicitly. */ |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 321249240d05..1141b4bf41ce 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -317,8 +317,6 @@ static const char *v4l2_ioctls[] = { | |||
317 | [_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT", | 317 | [_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT", |
318 | [_IOC_NR(VIDIOC_G_FMT)] = "VIDIOC_G_FMT", | 318 | [_IOC_NR(VIDIOC_G_FMT)] = "VIDIOC_G_FMT", |
319 | [_IOC_NR(VIDIOC_S_FMT)] = "VIDIOC_S_FMT", | 319 | [_IOC_NR(VIDIOC_S_FMT)] = "VIDIOC_S_FMT", |
320 | [_IOC_NR(VIDIOC_G_MPEGCOMP)] = "VIDIOC_G_MPEGCOMP", | ||
321 | [_IOC_NR(VIDIOC_S_MPEGCOMP)] = "VIDIOC_S_MPEGCOMP", | ||
322 | [_IOC_NR(VIDIOC_REQBUFS)] = "VIDIOC_REQBUFS", | 320 | [_IOC_NR(VIDIOC_REQBUFS)] = "VIDIOC_REQBUFS", |
323 | [_IOC_NR(VIDIOC_QUERYBUF)] = "VIDIOC_QUERYBUF", | 321 | [_IOC_NR(VIDIOC_QUERYBUF)] = "VIDIOC_QUERYBUF", |
324 | [_IOC_NR(VIDIOC_G_FBUF)] = "VIDIOC_G_FBUF", | 322 | [_IOC_NR(VIDIOC_G_FBUF)] = "VIDIOC_G_FBUF", |
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 8d8e517b344f..9611c3990285 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1313,48 +1313,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1313 | ret=vfd->vidioc_cropcap(file, fh, p); | 1313 | ret=vfd->vidioc_cropcap(file, fh, p); |
1314 | break; | 1314 | break; |
1315 | } | 1315 | } |
1316 | case VIDIOC_G_MPEGCOMP: | ||
1317 | { | ||
1318 | struct v4l2_mpeg_compression *p=arg; | ||
1319 | |||
1320 | /*FIXME: Several fields not shown */ | ||
1321 | if (!vfd->vidioc_g_mpegcomp) | ||
1322 | break; | ||
1323 | ret=vfd->vidioc_g_mpegcomp(file, fh, p); | ||
1324 | if (!ret) | ||
1325 | dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d," | ||
1326 | " ts_pid_video=%d, ts_pid_pcr=%d, " | ||
1327 | "ps_size=%d, au_sample_rate=%d, " | ||
1328 | "au_pesid=%c, vi_frame_rate=%d, " | ||
1329 | "vi_frames_per_gop=%d, " | ||
1330 | "vi_bframes_count=%d, vi_pesid=%c\n", | ||
1331 | p->ts_pid_pmt,p->ts_pid_audio, | ||
1332 | p->ts_pid_video,p->ts_pid_pcr, | ||
1333 | p->ps_size, p->au_sample_rate, | ||
1334 | p->au_pesid, p->vi_frame_rate, | ||
1335 | p->vi_frames_per_gop, | ||
1336 | p->vi_bframes_count, p->vi_pesid); | ||
1337 | break; | ||
1338 | } | ||
1339 | case VIDIOC_S_MPEGCOMP: | ||
1340 | { | ||
1341 | struct v4l2_mpeg_compression *p=arg; | ||
1342 | /*FIXME: Several fields not shown */ | ||
1343 | if (!vfd->vidioc_s_mpegcomp) | ||
1344 | break; | ||
1345 | dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d, " | ||
1346 | "ts_pid_video=%d, ts_pid_pcr=%d, ps_size=%d, " | ||
1347 | "au_sample_rate=%d, au_pesid=%c, " | ||
1348 | "vi_frame_rate=%d, vi_frames_per_gop=%d, " | ||
1349 | "vi_bframes_count=%d, vi_pesid=%c\n", | ||
1350 | p->ts_pid_pmt,p->ts_pid_audio, p->ts_pid_video, | ||
1351 | p->ts_pid_pcr, p->ps_size, p->au_sample_rate, | ||
1352 | p->au_pesid, p->vi_frame_rate, | ||
1353 | p->vi_frames_per_gop, p->vi_bframes_count, | ||
1354 | p->vi_pesid); | ||
1355 | ret=vfd->vidioc_s_mpegcomp(file, fh, p); | ||
1356 | break; | ||
1357 | } | ||
1358 | case VIDIOC_G_JPEGCOMP: | 1316 | case VIDIOC_G_JPEGCOMP: |
1359 | { | 1317 | { |
1360 | struct v4l2_jpegcompression *p=arg; | 1318 | struct v4l2_jpegcompression *p=arg; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 1f503e94eff1..439474f24e34 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -441,94 +441,6 @@ struct v4l2_timecode | |||
441 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 | 441 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 |
442 | /* The above is based on SMPTE timecodes */ | 442 | /* The above is based on SMPTE timecodes */ |
443 | 443 | ||
444 | #ifdef __KERNEL__ | ||
445 | /* | ||
446 | * M P E G C O M P R E S S I O N P A R A M E T E R S | ||
447 | * | ||
448 | * ### WARNING: This experimental MPEG compression API is obsolete. | ||
449 | * ### It is replaced by the MPEG controls API. | ||
450 | * ### This old API will disappear in the near future! | ||
451 | * | ||
452 | */ | ||
453 | enum v4l2_bitrate_mode { | ||
454 | V4L2_BITRATE_NONE = 0, /* not specified */ | ||
455 | V4L2_BITRATE_CBR, /* constant bitrate */ | ||
456 | V4L2_BITRATE_VBR, /* variable bitrate */ | ||
457 | }; | ||
458 | struct v4l2_bitrate { | ||
459 | /* rates are specified in kbit/sec */ | ||
460 | enum v4l2_bitrate_mode mode; | ||
461 | __u32 min; | ||
462 | __u32 target; /* use this one for CBR */ | ||
463 | __u32 max; | ||
464 | }; | ||
465 | |||
466 | enum v4l2_mpeg_streamtype { | ||
467 | V4L2_MPEG_SS_1, /* MPEG-1 system stream */ | ||
468 | V4L2_MPEG_PS_2, /* MPEG-2 program stream */ | ||
469 | V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ | ||
470 | V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ | ||
471 | }; | ||
472 | enum v4l2_mpeg_audiotype { | ||
473 | V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ | ||
474 | V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ | ||
475 | V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ | ||
476 | V4L2_MPEG_AC3, /* AC3 */ | ||
477 | V4L2_MPEG_LPCM, /* LPCM */ | ||
478 | }; | ||
479 | enum v4l2_mpeg_videotype { | ||
480 | V4L2_MPEG_VI_1, /* MPEG-1 */ | ||
481 | V4L2_MPEG_VI_2, /* MPEG-2 */ | ||
482 | }; | ||
483 | enum v4l2_mpeg_aspectratio { | ||
484 | V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ | ||
485 | V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ | ||
486 | V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ | ||
487 | V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ | ||
488 | }; | ||
489 | |||
490 | struct v4l2_mpeg_compression { | ||
491 | /* general */ | ||
492 | enum v4l2_mpeg_streamtype st_type; | ||
493 | struct v4l2_bitrate st_bitrate; | ||
494 | |||
495 | /* transport streams */ | ||
496 | __u16 ts_pid_pmt; | ||
497 | __u16 ts_pid_audio; | ||
498 | __u16 ts_pid_video; | ||
499 | __u16 ts_pid_pcr; | ||
500 | |||
501 | /* program stream */ | ||
502 | __u16 ps_size; | ||
503 | __u16 reserved_1; /* align */ | ||
504 | |||
505 | /* audio */ | ||
506 | enum v4l2_mpeg_audiotype au_type; | ||
507 | struct v4l2_bitrate au_bitrate; | ||
508 | __u32 au_sample_rate; | ||
509 | __u8 au_pesid; | ||
510 | __u8 reserved_2[3]; /* align */ | ||
511 | |||
512 | /* video */ | ||
513 | enum v4l2_mpeg_videotype vi_type; | ||
514 | enum v4l2_mpeg_aspectratio vi_aspect_ratio; | ||
515 | struct v4l2_bitrate vi_bitrate; | ||
516 | __u32 vi_frame_rate; | ||
517 | __u16 vi_frames_per_gop; | ||
518 | __u16 vi_bframes_count; | ||
519 | __u8 vi_pesid; | ||
520 | __u8 reserved_3[3]; /* align */ | ||
521 | |||
522 | /* misc flags */ | ||
523 | __u32 closed_gops:1; | ||
524 | __u32 pulldown:1; | ||
525 | __u32 reserved_4:30; /* align */ | ||
526 | |||
527 | /* I don't expect the above being perfect yet ;) */ | ||
528 | __u32 reserved_5[8]; | ||
529 | }; | ||
530 | #endif | ||
531 | |||
532 | struct v4l2_jpegcompression | 444 | struct v4l2_jpegcompression |
533 | { | 445 | { |
534 | int quality; | 446 | int quality; |
@@ -1420,10 +1332,6 @@ struct v4l2_chip_ident { | |||
1420 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) | 1332 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) |
1421 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) | 1333 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) |
1422 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) | 1334 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) |
1423 | #ifdef __KERNEL__ | ||
1424 | #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) | ||
1425 | #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) | ||
1426 | #endif | ||
1427 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) | 1335 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) |
1428 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) | 1336 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) |
1429 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) | 1337 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 4c5d66e2da67..c544c6f90893 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -271,10 +271,6 @@ struct video_device | |||
271 | int (*vidioc_s_crop) (struct file *file, void *fh, | 271 | int (*vidioc_s_crop) (struct file *file, void *fh, |
272 | struct v4l2_crop *a); | 272 | struct v4l2_crop *a); |
273 | /* Compression ioctls */ | 273 | /* Compression ioctls */ |
274 | int (*vidioc_g_mpegcomp) (struct file *file, void *fh, | ||
275 | struct v4l2_mpeg_compression *a); | ||
276 | int (*vidioc_s_mpegcomp) (struct file *file, void *fh, | ||
277 | struct v4l2_mpeg_compression *a); | ||
278 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, | 274 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, |
279 | struct v4l2_jpegcompression *a); | 275 | struct v4l2_jpegcompression *a); |
280 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | 276 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, |