diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 14:19:20 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 14:19:20 -0200 |
commit | a4368a67e2cfa7868299cf7b20bf87352e351e33 (patch) | |
tree | e142e6f21e41c3b95d73e5f805247514fbb286c5 /linux/include | |
parent | 879cc80f662158ef1a7e0549e5c6efd3380642df (diff) | |
download | mediapointer-dvb-s2-a4368a67e2cfa7868299cf7b20bf87352e351e33.tar.gz mediapointer-dvb-s2-a4368a67e2cfa7868299cf7b20bf87352e351e33.tar.bz2 |
Remove the need of a STD array for drivers using video_ioctl2
From: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: Jonathan Corbet <corbet@lwn.net>
video_ioctl2 will auto-generate standard entries at ENUM_FMT.
Also, now, a driver may return a subset of the video array at
the return, to be stored as the current_norm.
For example, a driver may ask for V4L2_STD_PAL. At return,
driver may change it to V4L2_STD_PAL_B. This way, a futher call
to G_STD will return the exact detected video std.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/media/v4l2-dev.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 5136305c4..e67ef632c 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -47,6 +47,7 @@ /* Video standard functions */ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); +extern char *v4l2_norm_to_name(v4l2_std_id id); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, char *name); @@ -85,12 +86,6 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, * This version moves redundant code from video device code to * the common handler */ -struct v4l2_tvnorm { - char *name; - v4l2_std_id id; - - void *priv_data; -}; struct video_device { @@ -114,9 +109,8 @@ struct video_device int debug; /* Activates debug level*/ /* Video standard vars */ - int tvnormsize; /* Size of tvnorm array */ - v4l2_std_id current_norm; /* Current tvnorm */ - struct v4l2_tvnorm *tvnorms; + v4l2_std_id tvnorms; /* Supported tv norms */ + v4l2_std_id current_norm; /* Current tvnorm */ /* callbacks */ void (*release)(struct video_device *vfd); @@ -221,7 +215,7 @@ struct video_device /* Standard handling G_STD and ENUMSTD are handled by videodev.c */ - int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); + int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); /* Input handling */ |