summaryrefslogtreecommitdiff
path: root/uvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'uvc.c')
-rw-r--r--uvc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/uvc.c b/uvc.c
index 9d425fd..81d1760 100644
--- a/uvc.c
+++ b/uvc.c
@@ -33,6 +33,24 @@
#include "uvc.h"
#include "v4l2.h"
+struct uvc_device
+{
+ struct v4l2_device *vdev;
+
+ struct uvc_stream *stream;
+ struct uvc_function_config *fc;
+
+ struct uvc_streaming_control probe;
+ struct uvc_streaming_control commit;
+
+ int control;
+
+ unsigned int fcc;
+ unsigned int width;
+ unsigned int height;
+ unsigned int maxsize;
+};
+
struct uvc_device *uvc_open(const char *devname, struct uvc_stream *stream)
{
struct uvc_device *dev;
@@ -366,3 +384,12 @@ int uvc_set_format(struct uvc_device *dev, struct v4l2_pix_format *format)
{
return v4l2_set_format(dev->vdev, format);
}
+
+struct v4l2_device *uvc_v4l2_device(struct uvc_device *dev)
+{
+ /*
+ * TODO: The V4L2 device shouldn't be exposed. We should replace this
+ * with an abstract video sink class when one will be avaiilable.
+ */
+ return dev->vdev;
+}