v4l2-allocator: Add S to REQBUFS/CREATE_BUFS enum
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 28 Apr 2014 12:48:26 +0000 (08:48 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 8 May 2014 19:56:37 +0000 (15:56 -0400)
All enum that has REQBUFS and CREATE_BUFS where missing S, which was
confusing since they are supposed to match with associcated ioctl name. This
also fixes the yet unused CAN_REQUEST flag check.

sys/v4l2/gstv4l2allocator.c
sys/v4l2/gstv4l2allocator.h

index fa884f6..dc1573a 100644 (file)
@@ -461,8 +461,8 @@ gst_v4l2_allocator_init (GstV4l2Allocator * allocator)
 
 #define GST_V4L2_ALLOCATOR_PROBE(obj,type) \
     gst_v4l2_allocator_probe ((obj), V4L2_MEMORY_ ## type, \
-        GST_V4L2_ALLOCATOR_FLAG_ ## type ## _REQBUF, \
-        GST_V4L2_ALLOCATOR_FLAG_ ## type ## _CREATE_BUF)
+        GST_V4L2_ALLOCATOR_FLAG_ ## type ## _REQBUFS, \
+        GST_V4L2_ALLOCATOR_FLAG_ ## type ## _CREATE_BUFS)
 static guint32
 gst_v4l2_allocator_probe (GstV4l2Allocator * allocator, guint32 memory,
     guint32 breq_flag, guint32 bcreate_flag)
index 282f855..53ac7af 100644 (file)
@@ -40,7 +40,7 @@ G_BEGIN_DECLS
 #define GST_V4L2_ALLOCATOR_CAN_REQUEST(obj,type) \
         (GST_OBJECT_FLAG_IS_SET (obj, GST_V4L2_ALLOCATOR_FLAG_ ## type ## _REQBUFS))
 #define GST_V4L2_ALLOCATOR_CAN_ALLOCATE(obj,type) \
-        (GST_OBJECT_FLAG_IS_SET (obj, GST_V4L2_ALLOCATOR_FLAG_ ## type ## _CREATE_BUF))
+        (GST_OBJECT_FLAG_IS_SET (obj, GST_V4L2_ALLOCATOR_FLAG_ ## type ## _CREATE_BUFS))
 
 typedef struct _GstV4l2Allocator GstV4l2Allocator;
 typedef struct _GstV4l2AllocatorClass GstV4l2AllocatorClass;
@@ -51,12 +51,12 @@ typedef enum _GstV4l2Return GstV4l2Return;
 
 enum _GstV4l2AllocatorFlags
 {
-  GST_V4L2_ALLOCATOR_FLAG_MMAP_REQBUF        = (GST_ALLOCATOR_FLAG_LAST << 0),
-  GST_V4L2_ALLOCATOR_FLAG_MMAP_CREATE_BUF    = (GST_ALLOCATOR_FLAG_LAST << 1),
-  GST_V4L2_ALLOCATOR_FLAG_USERPTR_REQBUF     = (GST_ALLOCATOR_FLAG_LAST << 2),
-  GST_V4L2_ALLOCATOR_FLAG_USERPTR_CREATE_BUF = (GST_ALLOCATOR_FLAG_LAST << 3),
-  GST_V4L2_ALLOCATOR_FLAG_DMABUF_REQBUF      = (GST_ALLOCATOR_FLAG_LAST << 4),
-  GST_V4L2_ALLOCATOR_FLAG_DMABUF_CREATE_BUF  = (GST_ALLOCATOR_FLAG_LAST << 5),
+  GST_V4L2_ALLOCATOR_FLAG_MMAP_REQBUFS        = (GST_ALLOCATOR_FLAG_LAST << 0),
+  GST_V4L2_ALLOCATOR_FLAG_MMAP_CREATE_BUFS    = (GST_ALLOCATOR_FLAG_LAST << 1),
+  GST_V4L2_ALLOCATOR_FLAG_USERPTR_REQBUFS     = (GST_ALLOCATOR_FLAG_LAST << 2),
+  GST_V4L2_ALLOCATOR_FLAG_USERPTR_CREATE_BUFS = (GST_ALLOCATOR_FLAG_LAST << 3),
+  GST_V4L2_ALLOCATOR_FLAG_DMABUF_REQBUFS      = (GST_ALLOCATOR_FLAG_LAST << 4),
+  GST_V4L2_ALLOCATOR_FLAG_DMABUF_CREATE_BUFS  = (GST_ALLOCATOR_FLAG_LAST << 5),
 };
 
 enum _GstV4l2Return