diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-06-09 12:13:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-06-09 19:44:21 +0300 |
commit | 1b8f9204db684eff0d52b03c47fa666bf4e495f5 (patch) | |
tree | 02fadfefd72b45a6356f36f5442212aa772425bc /stream.h | |
parent | de8d802f21e002270b0b758835fa25232a31208e (diff) |
stream: Use abstract video sources
Replace the manual V4L2 capture implementation by an abstract
video_source, provided by the user of the UVC stream. Removes any
knowledge of the video source internals from the uvc_stream class,
allowing usage of different source types.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'stream.h')
-rw-r--r-- | stream.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -24,22 +24,21 @@ struct events; struct uvc_function_config; struct uvc_stream; struct v4l2_pix_format; +struct video_source; /* * uvc_stream_new - Create a new UVC stream * @uvc_device: Filename of UVC device node - * @cap_device: Filename of V4L2 capture device node * - * Create a new UVC stream with V4L2 @uvc_device as the output and @cap_device - * as input. + * Create a new UVC stream to handle the UVC function corresponding to the video + * device node @uvc_device. * * Streams allocated with this function can be deleted with uvc_stream_delete(). * * On success, returns a pointer to newly allocated and populated struct uvc_stream. * On failure, returns NULL. */ -struct uvc_stream *uvc_stream_new(const char *uvc_device, - const char *cap_device); +struct uvc_stream *uvc_stream_new(const char *uvc_device); /* * uvc_stream_init_uvc - Initialize a UVC stream @@ -72,6 +71,9 @@ void uvc_stream_init_uvc(struct uvc_stream *stream, void uvc_stream_set_event_handler(struct uvc_stream *stream, struct events *events); +void uvc_stream_set_video_source(struct uvc_stream *stream, + struct video_source *src); + /* * uvc_stream_delete - Delete a UVC stream * @stream: the UVC stream |