1 | /* GStreamer |
2 | * Copyright (C) 2013 Olivier Crete <[email protected]> |
3 | * |
4 | * gstdevicemonitor.c: Device monitor |
5 | * |
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. |
10 | * |
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. |
15 | * |
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. |
20 | */ |
21 | |
22 | |
23 | #ifndef __GST_DEVICE_MONITOR_H__ |
24 | #define __GST_DEVICE_MONITOR_H__ |
25 | |
26 | #include <gst/gstobject.h> |
27 | #include <gst/gstdevice.h> |
28 | #include <gst/gstdeviceprovider.h> |
29 | #include <gst/gstdeviceproviderfactory.h> |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | typedef struct _GstDeviceMonitor GstDeviceMonitor; |
34 | typedef struct _GstDeviceMonitorPrivate GstDeviceMonitorPrivate; |
35 | typedef struct _GstDeviceMonitorClass GstDeviceMonitorClass; |
36 | |
37 | #define GST_TYPE_DEVICE_MONITOR (gst_device_monitor_get_type()) |
38 | #define GST_IS_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DEVICE_MONITOR)) |
39 | #define GST_IS_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DEVICE_MONITOR)) |
40 | #define GST_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitorClass)) |
41 | #define GST_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitor)) |
42 | #define GST_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstDeviceMonitorClass)) |
43 | #define GST_DEVICE_MONITOR_CAST(obj) ((GstDeviceMonitor *)(obj)) |
44 | |
45 | /** |
46 | * GstDeviceMonitor: |
47 | * @parent: the parent #GstObject structure |
48 | * |
49 | * Opaque device monitor object structure. |
50 | * |
51 | * Since: 1.4 |
52 | */ |
53 | struct _GstDeviceMonitor { |
54 | GstObject parent; |
55 | |
56 | /*< private >*/ |
57 | |
58 | GstDeviceMonitorPrivate *priv; |
59 | |
60 | gpointer _gst_reserved[GST_PADDING]; |
61 | }; |
62 | |
63 | /** |
64 | * GstDeviceMonitorClass: |
65 | * @parent_class: the parent #GstObjectClass structure |
66 | * |
67 | * Opaque device monitor class structure. |
68 | * |
69 | * Since: 1.4 |
70 | */ |
71 | struct _GstDeviceMonitorClass { |
72 | GstObjectClass parent_class; |
73 | |
74 | /*< private >*/ |
75 | gpointer _gst_reserved[GST_PADDING]; |
76 | }; |
77 | |
78 | GST_API |
79 | GType gst_device_monitor_get_type (void); |
80 | |
81 | GST_API |
82 | GstDeviceMonitor * gst_device_monitor_new (void); |
83 | |
84 | GST_API |
85 | GstBus * gst_device_monitor_get_bus (GstDeviceMonitor * monitor); |
86 | |
87 | GST_API |
88 | GList * gst_device_monitor_get_devices (GstDeviceMonitor * monitor); |
89 | |
90 | |
91 | GST_API |
92 | gboolean gst_device_monitor_start (GstDeviceMonitor * monitor); |
93 | |
94 | GST_API |
95 | void gst_device_monitor_stop (GstDeviceMonitor * monitor); |
96 | |
97 | |
98 | GST_API |
99 | guint gst_device_monitor_add_filter (GstDeviceMonitor * monitor, |
100 | const gchar * classes, |
101 | GstCaps * caps); |
102 | GST_API |
103 | gboolean gst_device_monitor_remove_filter (GstDeviceMonitor * monitor, |
104 | guint filter_id); |
105 | GST_API |
106 | gchar ** gst_device_monitor_get_providers (GstDeviceMonitor * monitor); |
107 | |
108 | GST_API |
109 | void gst_device_monitor_set_show_all_devices (GstDeviceMonitor * monitor, gboolean show_all); |
110 | |
111 | GST_API |
112 | gboolean gst_device_monitor_get_show_all_devices (GstDeviceMonitor * monitor); |
113 | |
114 | #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC |
115 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDeviceMonitor, gst_object_unref) |
116 | #endif |
117 | |
118 | G_END_DECLS |
119 | |
120 | #endif /* __GST_DEVICE_MONITOR_H__ */ |
121 | |