v4l2: Add support for querying capabilities

This adds a helper function to query v4l2 capabilities, returning
either the device caps when available or the general device caps
otherwise.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
Paul Kocialkowski
2018-08-06 16:38:48 +02:00
parent 7d1ac10517
commit 57999e3883
2 changed files with 22 additions and 0 deletions
+1
View File
@@ -29,6 +29,7 @@
#define SOURCE_SIZE_MAX (1024 * 1024)
int v4l2_query_capabilities(int video_fd, unsigned int *capabilities);
bool v4l2_find_format(int video_fd, unsigned int type,
unsigned int pixelformat);
int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat,