2 * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
4 * gstv4l2deviceprovider.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_PROVIDER_H__
24 #define __GST_V4L2_DEVICE_PROVIDER_H__
33 #include <gudev/gudev.h>
38 typedef struct _GstV4l2DeviceProvider GstV4l2DeviceProvider;
39 typedef struct _GstV4l2DeviceProviderClass GstV4l2DeviceProviderClass;
41 #define GST_TYPE_V4L2_DEVICE_PROVIDER (gst_v4l2_device_provider_get_type())
42 #define GST_IS_V4L2_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER))
43 #define GST_IS_V4L2_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE_PROVIDER))
44 #define GST_V4L2_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER, GstV4l2DeviceProviderClass))
45 #define GST_V4L2_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE_PROVIDER, GstV4l2DeviceProvider))
46 #define GST_V4L2_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstV4l2DeviceProviderClass))
47 #define GST_V4L2_DEVICE_PROVIDER_CAST(obj) ((GstV4l2DeviceProvider *)(obj))
49 struct _GstV4l2DeviceProvider {
50 GstDeviceProvider parent;
53 GMainContext *context;
62 GST_V4L2_DEVICE_TYPE_INVALID = 0,
63 GST_V4L2_DEVICE_TYPE_SOURCE,
64 GST_V4L2_DEVICE_TYPE_SINK
67 struct _GstV4l2DeviceProviderClass {
68 GstDeviceProviderClass parent_class;
71 GType gst_v4l2_device_provider_get_type (void);
74 typedef struct _GstV4l2Device GstV4l2Device;
75 typedef struct _GstV4l2DeviceClass GstV4l2DeviceClass;
77 #define GST_TYPE_V4L2_DEVICE (gst_v4l2_device_get_type())
78 #define GST_IS_V4L2_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_DEVICE))
79 #define GST_IS_V4L2_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_DEVICE))
80 #define GST_V4L2_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2_DEVICE, GstV4l2DeviceClass))
81 #define GST_V4L2_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_DEVICE, GstV4l2Device))
82 #define GST_V4L2_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstV4l2DeviceClass))
83 #define GST_V4L2_DEVICE_CAST(obj) ((GstV4l2Device *)(obj))
85 struct _GstV4l2Device {
93 struct _GstV4l2DeviceClass {
94 GstDeviceClass parent_class;
97 GType gst_v4l2_device_get_type (void);
101 #endif /* __GST_V4L2_DEVICE_PROVIDER_H__ */