v4l2src: Try to avoid TRY_FMT when camera is streaming
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2object.h
index 7f46f8d..7871eaf 100644 (file)
@@ -35,6 +35,7 @@
 #include <gst/base/gstpushsrc.h>
 
 #include <gst/video/video.h>
+#include <unistd.h>
 
 typedef struct _GstV4l2Object GstV4l2Object;
 typedef struct _GstV4l2ObjectClassHelper GstV4l2ObjectClassHelper;
@@ -111,6 +112,7 @@ typedef gboolean  (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
 
 struct _GstV4l2Object {
   GstElement * element;
+  GstObject * dbg_obj;
 
   enum v4l2_buf_type type;   /* V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_BUF_TYPE_VIDEO_OUTPUT */
 
@@ -193,7 +195,7 @@ struct _GstV4l2Object {
   gint (*ioctl) (gint fd, gulong request, ...);
   gssize (*read) (gint fd, gpointer buffer, gsize n);
   gpointer (*mmap) (gpointer start, gsize length, gint prot, gint flags,
-      gint fd, gint64 offset);
+      gint fd,  off_t offset);
   gint (*munmap) (gpointer _start, gsize length);
 
   /* Quirks */
@@ -234,6 +236,7 @@ GType gst_v4l2_object_get_type (void);
 
 /* create/destroy */
 GstV4l2Object*  gst_v4l2_object_new       (GstElement * element,
+                                           GstObject * dbg_obj,
                                            enum v4l2_buf_type  type,
                                            const char * default_device,
                                            GstV4l2GetInOutFunction get_in_out_func,
@@ -275,7 +278,9 @@ gint         gst_v4l2_object_extrapolate_stride (const GstVideoFormatInfo * finf
 gboolean     gst_v4l2_object_set_format  (GstV4l2Object * v4l2object, GstCaps * caps, GstV4l2Error * error);
 gboolean     gst_v4l2_object_try_format  (GstV4l2Object * v4l2object, GstCaps * caps, GstV4l2Error * error);
 
-gboolean     gst_v4l2_object_caps_equal  (GstV4l2Object * v4l2object, GstCaps * caps);
+gboolean     gst_v4l2_object_caps_equal       (GstV4l2Object * v4l2object, GstCaps * caps);
+gboolean     gst_v4l2_object_caps_is_subset   (GstV4l2Object * v4l2object, GstCaps * caps);
+GstCaps *    gst_v4l2_object_get_current_caps (GstV4l2Object * v4l2object);
 
 gboolean     gst_v4l2_object_unlock      (GstV4l2Object * v4l2object);
 gboolean     gst_v4l2_object_unlock_stop (GstV4l2Object * v4l2object);