summaryrefslogtreecommitdiff
path: root/uvc.h
AgeCommit message (Collapse)Author
2018-06-12Split UVC gadget into a library and test applicationLaurent Pinchart
Split the project into a UVC gadget library and a test application. To avoid rolling out a custom build system, switch to CMake. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09uvc: Make uvc_device structure opaqueLaurent Pinchart
The internals of the uvc_device structure should not be accessed outside of uvc.c. The only existing need to access the structure internals is in stream.c, where access to the UVC V4L2 device is needed. To avoid that, create an accessor function uvc_v4l2_device(), and make the structure private. Ideally the UVC V4L2 device should not be exposed. This can be achieved by creating an abstract video sink class to handle the UVC video sink. This is however out of scope for now. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09uvc: Add API to set video formatLaurent Pinchart
Add a uvc_setformat() function to set the format for the UVC video stream instead of accessing the internals of the uvc_device in stream.c. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09uvc: Add API to set function configurationLaurent Pinchart
Add a uvc_set_config() function to set the UVC function configuration instead of accessing the internals of the uvc_device in stream.c. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09uvc: Handle UVC events internally in uvc.cLaurent Pinchart
The event notifier for the UVC device is registered in uvc_stream_set_event_handler(), which requires exposing the uvc_events_process() event handler to the uvc_stream class. Make the event handler internal by registering it in uvc_events_init(). This requires passing the uvc_stream pointer to the uvc_open() function and storing it internally in the uvc_device object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09uvc-gadget: factor out uvc protocol and stream handling codePaul Elder
uvc-gadget.c has been getting cluttered with functions related to UVC protocol handling and stream handling. Additionally, it is forseen that we might want stream handling to be modular for different system models. Factor out code related to UVC protocol handling to uvc.c (and uvc.h) and code related to stream handling to stream.c (and stream.h), and update the Makefile accordingly. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>