summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)Author
2022-11-22src: Move main to srcKieran Bingham
Move the main uvc-gadget application to src/ to make it clear there is a separation between library and application code. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-11-17main: reorganize usage printPaul Elder
Minor changes to the -h usage output. Reorder the input and the help option printing, and make the example usages use argv0. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
2018-08-31main: Initialise stream object to NULLKieran Bingham
If the capture device fails to load the default cleanup path will be taken. This error path relies on objects either existing or being set to NULL. Ensure that the stream pointer is initialised to prevent segfaults on the error path. Fixes: 1b8f9204db68 ("stream: Use abstract video sources") Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reiewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-12Update copyright dates and ownerLaurent Pinchart
Ideas on Board SPRL, the original copyright owner of the UVC gadget application code, has been dissolved. All company copyrights have been transferred to Laurent Pinchart. Update the copyright notices to accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-12Use SPDX headersLaurent Pinchart
Replace the boilerplate copyright headers with an SPDX header to ease license compliance. This doesn't change the license of any of the files. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-09stream: Use abstract video sourcesLaurent Pinchart
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>
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>