From eed880da1cf4af845700e1caf68d4d689391d4d3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 9 Jun 2018 02:22:54 +0300 Subject: uvc: Handle UVC events internally in uvc.c 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 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 1bff6ef..a99659b 100644 --- a/main.c +++ b/main.c @@ -115,8 +115,8 @@ int main(int argc, char *argv[]) goto done; } - uvc_stream_init_uvc(stream, fc); uvc_stream_set_event_handler(stream, &events); + uvc_stream_init_uvc(stream, fc); /* Main capture loop */ events_loop(&events); -- cgit v1.2.3