#include <gst/base/gstpushsrc.h>
#include <gst/video/video.h>
+#include <unistd.h>
typedef struct _GstV4l2Object GstV4l2Object;
typedef struct _GstV4l2ObjectClassHelper GstV4l2ObjectClassHelper;
struct _GstV4l2Object {
GstElement * element;
+ GstObject * dbg_obj;
enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_BUF_TYPE_VIDEO_OUTPUT */
GstV4l2UpdateFpsFunction update_fps_func;
/* syscalls */
- int (*fd_open) (int fd, int v4l2_flags);
- int (*close) (int fd);
- int (*dup) (int fd);
- int (*ioctl) (int fd, unsigned long int request, ...);
- ssize_t (*read) (int fd, void *buffer, size_t n);
- void * (*mmap) (void *start, size_t length, int prot, int flags,
- int fd, int64_t offset);
- int (*munmap) (void *_start, size_t length);
+ gint (*fd_open) (gint fd, gint v4l2_flags);
+ gint (*close) (gint fd);
+ gint (*dup) (gint fd);
+ 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, off_t offset);
+ gint (*munmap) (gpointer _start, gsize length);
/* Quirks */
/* Skips interlacing probes */
/* 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,
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);