2 * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
4 * gstv4l2devicemonitor.h: V4l2 device probing and monitoring
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_V4L2_DEVICE_MONITOR_H__
24 #define __GST_V4L2_DEVICE_MONITOR_H__
33 #include <gudev/gudev.h>
38 typedef struct _GstV4l2DeviceMonitor GstV4l2DeviceMonitor;
39 typedef struct _GstV4l2DeviceMonitorPrivate GstV4l2DeviceMonitorPrivate;
40 typedef struct _GstV4l2DeviceMonitorClass GstV4l2DeviceMonitorClass;
42 #define GST_TYPE_V4L2_DEVICE_MONITOR (gst_v4l2_device_monitor_get_type())
43 #define GST_IS_V4L2_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE_MONITOR))
44 #define GST_IS_V4L2_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE_MONITOR))
45 #define GST_V4L2_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE_MONITOR, GstV4l2DeviceMonitorClass))
46 #define GST_V4L2_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE_MONITOR, GstV4l2DeviceMonitor))
47 #define GST_V4L2_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstV4l2DeviceMonitorClass))
48 #define GST_V4L2_DEVICE_MONITOR_CAST(obj) ((GstV4l2DeviceMonitor *)(obj))
50 struct _GstV4l2DeviceMonitor {
51 GstDeviceMonitor parent;
54 GMainContext *context;
63 GST_V4L2_DEVICE_TYPE_INVALID = 0,
64 GST_V4L2_DEVICE_TYPE_SOURCE,
65 GST_V4L2_DEVICE_TYPE_SINK
68 struct _GstV4l2DeviceMonitorClass {
69 GstDeviceMonitorClass parent_class;
72 GType gst_v4l2_device_monitor_get_type (void);
75 typedef struct _GstV4l2Device GstV4l2Device;
76 typedef struct _GstV4l2DevicePrivate GstV4l2DevicePrivate;
77 typedef struct _GstV4l2DeviceClass GstV4l2DeviceClass;
79 #define GST_TYPE_V4L2_DEVICE (gst_v4l2_device_get_type())
80 #define GST_IS_V4L2_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE))
81 #define GST_IS_V4L2_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE))
82 #define GST_V4L2_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE, GstV4l2DeviceClass))
83 #define GST_V4L2_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE, GstV4l2Device))
84 #define GST_V4L2_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstV4l2DeviceClass))
85 #define GST_V4L2_DEVICE_CAST(obj) ((GstV4l2Device *)(obj))
87 struct _GstV4l2Device {
95 struct _GstV4l2DeviceClass {
96 GstDeviceClass parent_class;
99 GType gst_v4l2_device_get_type (void);
101 #endif /* __GST_V4L2_DEVICE_MONITOR_H__ */