2006-05-11 17:59:59 +00:00
|
|
|
/* GStreamer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
2006-09-02 14:28:55 +00:00
|
|
|
* 2006 Edgard Lima <edgard.lima@indt.org.br>
|
|
|
|
*
|
|
|
|
* gstv4l2object.h: base class for V4L2 elements
|
2006-05-11 17:59:59 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-04 00:07:18 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2006-05-11 17:59:59 +00:00
|
|
|
*/
|
|
|
|
|
2006-05-19 18:31:25 +00:00
|
|
|
#ifndef __GST_V4L2_OBJECT_H__
|
|
|
|
#define __GST_V4L2_OBJECT_H__
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2014-03-15 10:13:05 +00:00
|
|
|
#include "ext/videodev2.h"
|
2006-05-11 17:59:59 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/base/gstpushsrc.h>
|
|
|
|
|
2011-07-13 11:00:42 +00:00
|
|
|
#include <gst/video/video.h>
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2011-07-13 14:33:58 +00:00
|
|
|
typedef struct _GstV4l2Object GstV4l2Object;
|
|
|
|
typedef struct _GstV4l2ObjectClassHelper GstV4l2ObjectClassHelper;
|
|
|
|
typedef struct _GstV4l2Xv GstV4l2Xv;
|
|
|
|
|
|
|
|
#include <gstv4l2bufferpool.h>
|
2009-08-04 07:14:20 +00:00
|
|
|
|
|
|
|
/* size of v4l2 buffer pool in streaming case */
|
2014-04-05 02:38:05 +00:00
|
|
|
#define GST_V4L2_MIN_BUFFERS 2
|
2009-08-04 07:14:20 +00:00
|
|
|
|
|
|
|
/* max frame width/height */
|
|
|
|
#define GST_V4L2_MAX_SIZE (1<<15) /* 2^15 == 32768 */
|
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-11-28 21:59:59 +00:00
|
|
|
#define GST_TYPE_V4L2_IO_MODE (gst_v4l2_io_mode_get_type ())
|
|
|
|
GType gst_v4l2_io_mode_get_type (void);
|
|
|
|
|
2006-05-19 18:31:25 +00:00
|
|
|
#define GST_V4L2_OBJECT(obj) (GstV4l2Object *)(obj)
|
2006-05-18 19:34:47 +00:00
|
|
|
|
2011-07-18 08:52:23 +00:00
|
|
|
typedef enum {
|
2014-04-14 16:19:39 +00:00
|
|
|
GST_V4L2_IO_AUTO = 0,
|
|
|
|
GST_V4L2_IO_RW = 1,
|
|
|
|
GST_V4L2_IO_MMAP = 2,
|
|
|
|
GST_V4L2_IO_USERPTR = 3,
|
|
|
|
GST_V4L2_IO_DMABUF = 4,
|
|
|
|
GST_V4L2_IO_DMABUF_IMPORT = 5
|
2011-07-18 08:52:23 +00:00
|
|
|
} GstV4l2IOMode;
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2006-09-26 13:18:06 +00:00
|
|
|
typedef gboolean (*GstV4l2GetInOutFunction) (GstV4l2Object * v4l2object, gint * input);
|
|
|
|
typedef gboolean (*GstV4l2SetInOutFunction) (GstV4l2Object * v4l2object, gint input);
|
2007-05-30 14:57:44 +00:00
|
|
|
typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2011-07-13 11:00:42 +00:00
|
|
|
#define GST_V4L2_WIDTH(o) (GST_VIDEO_INFO_WIDTH (&(o)->info))
|
|
|
|
#define GST_V4L2_HEIGHT(o) (GST_VIDEO_INFO_HEIGHT (&(o)->info))
|
|
|
|
#define GST_V4L2_PIXELFORMAT(o) ((o)->fmtdesc->pixelformat)
|
|
|
|
#define GST_V4L2_FPS_N(o) (GST_VIDEO_INFO_FPS_N (&(o)->info))
|
|
|
|
#define GST_V4L2_FPS_D(o) (GST_VIDEO_INFO_FPS_D (&(o)->info))
|
2011-07-13 09:19:28 +00:00
|
|
|
|
|
|
|
/* simple check whether the device is open */
|
|
|
|
#define GST_V4L2_IS_OPEN(o) ((o)->video_fd > 0)
|
|
|
|
|
|
|
|
/* check whether the device is 'active' */
|
|
|
|
#define GST_V4L2_IS_ACTIVE(o) ((o)->active)
|
|
|
|
#define GST_V4L2_SET_ACTIVE(o) ((o)->active = TRUE)
|
|
|
|
#define GST_V4L2_SET_INACTIVE(o) ((o)->active = FALSE)
|
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
struct _GstV4l2Object {
|
|
|
|
GstElement * element;
|
|
|
|
|
2011-07-13 09:19:28 +00:00
|
|
|
enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_BUF_TYPE_VIDEO_OUTPUT */
|
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
/* the video device */
|
|
|
|
char *videodev;
|
|
|
|
|
|
|
|
/* the video-device's file descriptor */
|
|
|
|
gint video_fd;
|
2011-07-18 08:52:23 +00:00
|
|
|
GstV4l2IOMode mode;
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2011-07-13 09:19:28 +00:00
|
|
|
gboolean active;
|
2011-07-13 14:33:58 +00:00
|
|
|
gboolean streaming;
|
2009-08-04 07:14:20 +00:00
|
|
|
|
2011-07-12 16:13:42 +00:00
|
|
|
/* the current format */
|
2011-07-13 11:00:42 +00:00
|
|
|
struct v4l2_fmtdesc *fmtdesc;
|
2014-03-27 22:41:07 +00:00
|
|
|
struct v4l2_format format;
|
2011-07-13 11:00:42 +00:00
|
|
|
GstVideoInfo info;
|
2014-04-15 19:07:23 +00:00
|
|
|
GstVideoAlignment align;
|
|
|
|
|
2014-03-19 21:00:56 +00:00
|
|
|
/* Features */
|
2014-04-15 19:07:23 +00:00
|
|
|
gboolean need_video_meta;
|
2014-03-19 21:00:56 +00:00
|
|
|
gboolean has_alpha_component;
|
2011-07-13 11:00:42 +00:00
|
|
|
|
2013-11-13 12:05:40 +00:00
|
|
|
/* only used if the device supports MPLANE
|
|
|
|
* nb planes is meaning of v4l2 planes
|
|
|
|
* the gstreamer equivalent is gst_buffer_n_memory
|
|
|
|
*/
|
|
|
|
gint n_v4l2_planes;
|
|
|
|
|
2014-05-06 16:58:59 +00:00
|
|
|
/* We cache the frame duration if known */
|
2011-07-13 09:19:28 +00:00
|
|
|
GstClockTime duration;
|
2011-07-12 16:13:42 +00:00
|
|
|
|
2014-05-06 16:55:30 +00:00
|
|
|
/* if the MPLANE device support both contiguous and non contiguous
|
2013-11-13 12:05:40 +00:00
|
|
|
* it allows to select which one we want. But we prefered_non_contiguous
|
|
|
|
* non contiguous mode.
|
|
|
|
*/
|
|
|
|
gboolean prefered_non_contiguous;
|
|
|
|
|
2013-12-19 20:26:52 +00:00
|
|
|
/* This will be set if supported in decide_allocation. It can be used to
|
|
|
|
* calculate the minimum latency of a m2m decoder. */
|
|
|
|
guint32 min_buffers_for_capture;
|
|
|
|
|
2011-07-18 16:54:49 +00:00
|
|
|
/* wanted mode */
|
|
|
|
GstV4l2IOMode req_mode;
|
|
|
|
|
2011-07-13 14:33:58 +00:00
|
|
|
/* optional pool */
|
2011-08-04 11:50:01 +00:00
|
|
|
GstBufferPool *pool;
|
2011-07-13 14:33:58 +00:00
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
/* the video device's capabilities */
|
|
|
|
struct v4l2_capability vcap;
|
|
|
|
|
|
|
|
/* the video device's window properties */
|
|
|
|
struct v4l2_window vwin;
|
|
|
|
|
|
|
|
/* some more info about the current input's capabilities */
|
|
|
|
struct v4l2_input vinput;
|
|
|
|
|
|
|
|
/* lists... */
|
2009-08-04 07:14:20 +00:00
|
|
|
GSList *formats; /* list of available capture formats */
|
2012-10-22 21:58:07 +00:00
|
|
|
GstCaps *probed_caps;
|
2009-08-04 07:14:20 +00:00
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
GList *colors;
|
sys/v4l2/: Renamed some properties to match the tuner interface naming.
Original commit message from CVS:
* sys/v4l2/gstv4l2object.c:
(gst_v4l2_object_install_properties_helper), (gst_v4l2_object_new),
(gst_v4l2_object_set_property_helper),
(gst_v4l2_object_get_property_helper), (gst_v4l2_set_defaults):
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_create):
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_contains_channel),
(gst_v4l2_tuner_list_channels),
(gst_v4l2_tuner_set_channel_and_notify),
(gst_v4l2_tuner_get_channel), (gst_v4l2_tuner_contains_norm),
(gst_v4l2_tuner_list_norms), (gst_v4l2_tuner_set_norm_and_notify),
(gst_v4l2_tuner_get_norm):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_empty_lists):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_get_fps):
Renamed some properties to match the tuner interface naming.
2006-09-27 17:04:22 +00:00
|
|
|
GList *norms;
|
|
|
|
GList *channels;
|
2013-05-20 14:45:37 +00:00
|
|
|
GData *controls;
|
2006-05-11 17:59:59 +00:00
|
|
|
|
|
|
|
/* properties */
|
2010-04-04 11:43:41 +00:00
|
|
|
v4l2_std_id tv_norm;
|
sys/v4l2/: Renamed some properties to match the tuner interface naming.
Original commit message from CVS:
* sys/v4l2/gstv4l2object.c:
(gst_v4l2_object_install_properties_helper), (gst_v4l2_object_new),
(gst_v4l2_object_set_property_helper),
(gst_v4l2_object_get_property_helper), (gst_v4l2_set_defaults):
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_create):
* sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_contains_channel),
(gst_v4l2_tuner_list_channels),
(gst_v4l2_tuner_set_channel_and_notify),
(gst_v4l2_tuner_get_channel), (gst_v4l2_tuner_contains_norm),
(gst_v4l2_tuner_list_norms), (gst_v4l2_tuner_set_norm_and_notify),
(gst_v4l2_tuner_get_norm):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_empty_lists):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_get_fps):
Renamed some properties to match the tuner interface naming.
2006-09-27 17:04:22 +00:00
|
|
|
gchar *channel;
|
2006-05-11 17:59:59 +00:00
|
|
|
gulong frequency;
|
2013-05-20 14:45:37 +00:00
|
|
|
GstStructure *extra_controls;
|
2013-06-04 06:26:33 +00:00
|
|
|
gboolean keep_aspect;
|
|
|
|
GValue *par;
|
2006-05-11 17:59:59 +00:00
|
|
|
|
|
|
|
/* X-overlay */
|
|
|
|
GstV4l2Xv *xv;
|
|
|
|
gulong xwindow_id;
|
|
|
|
|
|
|
|
/* funcs */
|
2006-09-26 13:18:06 +00:00
|
|
|
GstV4l2GetInOutFunction get_in_out_func;
|
|
|
|
GstV4l2SetInOutFunction set_in_out_func;
|
2007-05-30 14:57:44 +00:00
|
|
|
GstV4l2UpdateFpsFunction update_fps_func;
|
2013-06-05 03:42:24 +00:00
|
|
|
|
|
|
|
/* Quirks */
|
|
|
|
/* Skips interlacing probes */
|
|
|
|
gboolean never_interlaced;
|
2013-11-28 22:10:29 +00:00
|
|
|
/* Allow to skip reading initial format through G_FMT. Some devices
|
|
|
|
* just fails if you don't call S_FMT first. (ex: M2M decoders) */
|
|
|
|
gboolean no_initial_format;
|
2006-05-11 17:59:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstV4l2ObjectClassHelper {
|
|
|
|
/* probed devices */
|
|
|
|
GList *devices;
|
|
|
|
};
|
|
|
|
|
sys/v4l2/: Fix EIO handing when capturing. Add new property to specify the number of buffers to enque (and remove the...
Original commit message from CVS:
* sys/v4l2/gstv4l2object.c:
(gst_v4l2_object_install_properties_helper),
(gst_v4l2_object_set_property_helper),
(gst_v4l2_object_get_property_helper), (gst_v4l2_set_defaults):
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_init), (gst_v4l2src_set_property),
(gst_v4l2src_get_property), (gst_v4l2src_set_caps):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list),
(gst_v4l2src_grab_frame), (gst_v4l2src_set_capture),
(gst_v4l2src_capture_init), (gst_v4l2src_capture_start),
(gst_v4l2src_capture_deinit):
Fix EIO handing when capturing. Add new property to specify the number of
buffers to enque (and remove the borked num-buffers usage).
2007-01-17 14:30:50 +00:00
|
|
|
GType gst_v4l2_object_get_type (void);
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
#define V4L2_STD_OBJECT_PROPS \
|
|
|
|
PROP_DEVICE, \
|
|
|
|
PROP_DEVICE_NAME, \
|
|
|
|
PROP_DEVICE_FD, \
|
|
|
|
PROP_FLAGS, \
|
|
|
|
PROP_BRIGHTNESS, \
|
|
|
|
PROP_CONTRAST, \
|
|
|
|
PROP_SATURATION, \
|
|
|
|
PROP_HUE, \
|
|
|
|
PROP_TV_NORM, \
|
|
|
|
PROP_IO_MODE, \
|
2014-05-15 22:08:53 +00:00
|
|
|
PROP_OUTPUT_IO_MODE, \
|
|
|
|
PROP_CAPTURE_IO_MODE, \
|
2013-05-29 19:44:31 +00:00
|
|
|
PROP_EXTRA_CONTROLS, \
|
|
|
|
PROP_PIXEL_ASPECT_RATIO, \
|
2013-06-04 06:26:33 +00:00
|
|
|
PROP_FORCE_ASPECT_RATIO
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2006-09-26 13:18:06 +00:00
|
|
|
/* create/destroy */
|
2013-05-29 19:44:31 +00:00
|
|
|
GstV4l2Object* gst_v4l2_object_new (GstElement * element,
|
|
|
|
enum v4l2_buf_type type,
|
|
|
|
const char * default_device,
|
|
|
|
GstV4l2GetInOutFunction get_in_out_func,
|
|
|
|
GstV4l2SetInOutFunction set_in_out_func,
|
|
|
|
GstV4l2UpdateFpsFunction update_fps_func);
|
|
|
|
|
|
|
|
void gst_v4l2_object_destroy (GstV4l2Object * v4l2object);
|
2006-09-26 13:18:06 +00:00
|
|
|
|
|
|
|
/* properties */
|
2009-08-04 07:14:20 +00:00
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
void gst_v4l2_object_install_properties_helper (GObjectClass * gobject_class,
|
|
|
|
const char * default_device);
|
2006-09-26 13:18:06 +00:00
|
|
|
|
2014-05-15 22:08:53 +00:00
|
|
|
void gst_v4l2_object_install_m2m_properties_helper (GObjectClass * gobject_class);
|
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_set_property_helper (GstV4l2Object * v4l2object,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue * value,
|
|
|
|
GParamSpec * pspec);
|
|
|
|
gboolean gst_v4l2_object_get_property_helper (GstV4l2Object *v4l2object,
|
|
|
|
guint prop_id, GValue * value,
|
|
|
|
GParamSpec * pspec);
|
2011-07-13 14:33:58 +00:00
|
|
|
/* open/close */
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_open (GstV4l2Object *v4l2object);
|
2013-11-28 22:09:26 +00:00
|
|
|
gboolean gst_v4l2_object_open_shared (GstV4l2Object *v4l2object, GstV4l2Object *other);
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_close (GstV4l2Object *v4l2object);
|
2006-09-26 13:18:06 +00:00
|
|
|
|
|
|
|
/* probing */
|
2011-12-21 10:59:46 +00:00
|
|
|
#if 0
|
2006-09-26 13:18:06 +00:00
|
|
|
const GList* gst_v4l2_probe_get_properties (GstPropertyProbe * probe);
|
|
|
|
|
|
|
|
void gst_v4l2_probe_probe_property (GstPropertyProbe * probe, guint prop_id,
|
|
|
|
const GParamSpec * pspec,
|
|
|
|
GList ** klass_devices);
|
|
|
|
gboolean gst_v4l2_probe_needs_probe (GstPropertyProbe * probe, guint prop_id,
|
|
|
|
const GParamSpec * pspec,
|
|
|
|
GList ** klass_devices);
|
|
|
|
GValueArray* gst_v4l2_probe_get_values (GstPropertyProbe * probe, guint prop_id,
|
|
|
|
const GParamSpec * pspec,
|
|
|
|
GList ** klass_devices);
|
2011-12-21 10:59:46 +00:00
|
|
|
#endif
|
2006-05-11 17:59:59 +00:00
|
|
|
|
2009-08-04 07:14:20 +00:00
|
|
|
GstCaps* gst_v4l2_object_get_all_caps (void);
|
|
|
|
|
2013-12-06 19:44:51 +00:00
|
|
|
GstCaps* gst_v4l2_object_get_raw_caps (void);
|
|
|
|
|
|
|
|
GstCaps* gst_v4l2_object_get_codec_caps (void);
|
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps);
|
2009-08-04 07:14:20 +00:00
|
|
|
|
2013-05-17 08:16:48 +00:00
|
|
|
gboolean gst_v4l2_object_caps_equal (GstV4l2Object * v4l2object, GstCaps * caps);
|
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_unlock (GstV4l2Object * v4l2object);
|
|
|
|
gboolean gst_v4l2_object_unlock_stop (GstV4l2Object * v4l2object);
|
2011-07-18 16:54:49 +00:00
|
|
|
|
2013-05-29 19:44:31 +00:00
|
|
|
gboolean gst_v4l2_object_stop (GstV4l2Object * v4l2object);
|
2011-07-13 16:32:00 +00:00
|
|
|
|
2012-10-22 21:58:07 +00:00
|
|
|
GstCaps * gst_v4l2_object_get_caps (GstV4l2Object * v4l2object,
|
|
|
|
GstCaps * filter);
|
|
|
|
|
2014-03-13 18:24:51 +00:00
|
|
|
gboolean gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object,
|
2014-04-15 19:07:23 +00:00
|
|
|
GstVideoInfo * info);
|
2014-03-20 19:31:22 +00:00
|
|
|
|
|
|
|
gboolean gst_v4l2_object_set_crop (GstV4l2Object * obj);
|
2014-05-06 16:55:30 +00:00
|
|
|
|
2013-12-05 23:48:15 +00:00
|
|
|
gboolean gst_v4l2_object_decide_allocation (GstV4l2Object * v4l2object,
|
|
|
|
GstQuery * query);
|
2009-08-04 07:14:20 +00:00
|
|
|
|
2014-03-27 17:20:53 +00:00
|
|
|
gboolean gst_v4l2_object_propose_allocation (GstV4l2Object * obj,
|
|
|
|
GstQuery * query);
|
|
|
|
|
2013-12-18 08:56:35 +00:00
|
|
|
GstStructure * gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc);
|
|
|
|
|
2013-12-03 23:27:47 +00:00
|
|
|
|
2006-05-11 17:59:59 +00:00
|
|
|
#define GST_IMPLEMENT_V4L2_PROBE_METHODS(Type_Class, interface_as_function) \
|
|
|
|
\
|
|
|
|
static void \
|
|
|
|
interface_as_function ## _probe_probe_property (GstPropertyProbe * probe, \
|
2013-05-29 19:44:31 +00:00
|
|
|
guint prop_id, \
|
2006-05-11 17:59:59 +00:00
|
|
|
const GParamSpec * pspec) \
|
|
|
|
{ \
|
2008-10-03 11:32:47 +00:00
|
|
|
Type_Class *this_class = (Type_Class*) G_OBJECT_GET_CLASS (probe); \
|
2006-05-11 17:59:59 +00:00
|
|
|
gst_v4l2_probe_probe_property (probe, prop_id, pspec, \
|
2013-05-29 19:44:31 +00:00
|
|
|
&this_class->v4l2_class_devices); \
|
2006-05-11 17:59:59 +00:00
|
|
|
} \
|
|
|
|
\
|
|
|
|
static gboolean \
|
|
|
|
interface_as_function ## _probe_needs_probe (GstPropertyProbe * probe, \
|
2013-05-29 19:44:31 +00:00
|
|
|
guint prop_id, \
|
2006-05-11 17:59:59 +00:00
|
|
|
const GParamSpec * pspec) \
|
|
|
|
{ \
|
2008-10-03 11:32:47 +00:00
|
|
|
Type_Class *this_class = (Type_Class*) G_OBJECT_GET_CLASS (probe); \
|
2006-05-11 17:59:59 +00:00
|
|
|
return gst_v4l2_probe_needs_probe (probe, prop_id, pspec, \
|
2013-05-29 19:44:31 +00:00
|
|
|
&this_class->v4l2_class_devices); \
|
2006-05-11 17:59:59 +00:00
|
|
|
} \
|
|
|
|
\
|
|
|
|
static GValueArray * \
|
|
|
|
interface_as_function ## _probe_get_values (GstPropertyProbe * probe, \
|
2013-05-29 19:44:31 +00:00
|
|
|
guint prop_id, \
|
2006-05-11 17:59:59 +00:00
|
|
|
const GParamSpec * pspec) \
|
|
|
|
{ \
|
2008-10-03 11:32:47 +00:00
|
|
|
Type_Class *this_class = (Type_Class*) G_OBJECT_GET_CLASS (probe); \
|
2006-05-11 17:59:59 +00:00
|
|
|
return gst_v4l2_probe_get_values (probe, prop_id, pspec, \
|
2013-05-29 19:44:31 +00:00
|
|
|
&this_class->v4l2_class_devices); \
|
2006-05-11 17:59:59 +00:00
|
|
|
} \
|
|
|
|
\
|
2013-05-29 19:44:31 +00:00
|
|
|
static void \
|
2006-05-11 17:59:59 +00:00
|
|
|
interface_as_function ## _property_probe_interface_init (GstPropertyProbeInterface * iface) \
|
|
|
|
{ \
|
|
|
|
iface->get_properties = gst_v4l2_probe_get_properties; \
|
|
|
|
iface->probe_property = interface_as_function ## _probe_probe_property; \
|
|
|
|
iface->needs_probe = interface_as_function ## _probe_needs_probe; \
|
2013-05-29 19:44:31 +00:00
|
|
|
iface->get_values = interface_as_function ## _probe_get_values; \
|
2006-05-11 17:59:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2006-05-19 18:31:25 +00:00
|
|
|
#endif /* __GST_V4L2_OBJECT_H__ */
|