Skip to contentSkip to conversation

libv4l1: move VIDIOCGAUDIO,VIDIOCSAUDIO,VIDIOCGVBIFMT,VIDIOCSVBIFMT

PATCH New [email protected] 1 participant 1 message Jun 8, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libv4l1: move VIDIOCGAUDIO,VIDIOCSAUDIO,VIDIOCGVBIFMT,VIDIOCSVBIFMT

From: Huzaifa Sidhpurwala <[email protected]>

merged two previous patches, now uses v4l2_set_control and v4l2_get_control

---
 lib/libv4l1/libv4l1-priv.h |    7 ++
 lib/libv4l1/libv4l1.c      |  172 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+), 0 deletions(-)
lib/libv4l1/libv4l1-priv.h +7 -0
index 11f4fd0..11ee57a 100644
@@ -60,6 +60,13 @@ extern FILE *v4l1_log_file;
 #define min(a, b) (((a) < (b)) ? (a) : (b))
 #endif
 
+#define DIV_ROUND_CLOSEST(x, divisor)(                  \
+{                                                       \
+	typeof(divisor) __divisor = divisor;            \
+	(((x) + ((__divisor) / 2)) / (__divisor));      \
+}                                                       \
+)
+
 struct v4l1_dev_info {
 	int fd;
 	int flags;
lib/libv4l1/libv4l1.c +172 -0

178 lines not on this page · raw message

Signature · 1 line
1.6.6.1