summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-08-17 19:29:51 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 05:06:18 +0200
commit57bee29d6e8cf721864fa47a18366bee5ff24f21 (patch)
treeeec0e9a15386db2bbe041f9e39d60075614c5adc /include/media
parentV4L/DVB: V4L2: add a generic function to find the nearest discrete format to ... (diff)
downloadlinux-57bee29d6e8cf721864fa47a18366bee5ff24f21.tar.xz
linux-57bee29d6e8cf721864fa47a18366bee5ff24f21.zip
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.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 2ce957301f77..86e3631764ef 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 *);