diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-08-17 14:29:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 01:06:18 -0200 |
commit | 57bee29d6e8cf721864fa47a18366bee5ff24f21 (patch) | |
tree | eec0e9a15386db2bbe041f9e39d60075614c5adc /include/media | |
parent | 79c6ff93c74e793ccceb464ee3698478c812ce79 (diff) | |
download | op-kernel-dev-57bee29d6e8cf721864fa47a18366bee5ff24f21.zip op-kernel-dev-57bee29d6e8cf721864fa47a18366bee5ff24f21.tar.gz |
V4L/DVB: soc-camera: allow only one video queue per device
Multiple user-space application instances can open the same video device, but
it only makes sense for one of them to manage the videobuffer queue and set
video format of the device. Restrict soc-camera respectively.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/soc_camera.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 2ce9573..86e3631 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -21,6 +21,8 @@ extern struct bus_type soc_camera_bus_type; +struct file; + struct soc_camera_device { struct list_head list; struct device dev; @@ -41,10 +43,7 @@ struct soc_camera_device { /* soc_camera.c private count. Only accessed with .video_lock held */ int use_count; struct mutex video_lock; /* Protects device data */ -}; - -struct soc_camera_file { - struct soc_camera_device *icd; + struct file *streamer; /* stream owner */ struct videobuf_queue vb_vidq; }; @@ -79,7 +78,7 @@ struct soc_camera_host_ops { int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); void (*init_videobuf)(struct videobuf_queue *, struct soc_camera_device *); - int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); + int (*reqbufs)(struct soc_camera_device *, struct v4l2_requestbuffers *); int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); int (*set_bus_param)(struct soc_camera_device *, __u32); int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *); |