2 * Copyright (C) 2012 Olivier Crete <olivier.crete@collabora.com>
4 * pulsedevicemonitor.h: 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_PULSE_DEVICE_MONITOR_H__
24 #define __GST_PULSE_DEVICE_MONITOR_H__
30 #include <pulse/pulseaudio.h>
31 #include <pulse/thread-mainloop.h>
37 typedef struct _GstPulseDeviceMonitor GstPulseDeviceMonitor;
38 typedef struct _GstPulseDeviceMonitorPrivate GstPulseDeviceMonitorPrivate;
39 typedef struct _GstPulseDeviceMonitorClass GstPulseDeviceMonitorClass;
41 #define GST_TYPE_PULSE_DEVICE_MONITOR (gst_pulse_device_monitor_get_type())
42 #define GST_IS_PULSE_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE_MONITOR))
43 #define GST_IS_PULSE_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE_MONITOR))
44 #define GST_PULSE_DEVICE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE_MONITOR, GstPulseDeviceMonitorClass))
45 #define GST_PULSE_DEVICE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE_MONITOR, GstPulseDeviceMonitor))
46 #define GST_PULSE_DEVICE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_MONITOR, GstPulseDeviceMonitorClass))
47 #define GST_PULSE_DEVICE_MONITOR_CAST(obj) ((GstPulseDeviceMonitor *)(obj))
49 struct _GstPulseDeviceMonitor {
50 GstDeviceMonitor parent;
55 pa_threaded_mainloop *mainloop;
60 GST_PULSE_DEVICE_TYPE_SOURCE,
61 GST_PULSE_DEVICE_TYPE_SINK
64 struct _GstPulseDeviceMonitorClass {
65 GstDeviceMonitorClass parent_class;
68 GType gst_pulse_device_monitor_get_type (void);
71 typedef struct _GstPulseDevice GstPulseDevice;
72 typedef struct _GstPulseDevicePrivate GstPulseDevicePrivate;
73 typedef struct _GstPulseDeviceClass GstPulseDeviceClass;
75 #define GST_TYPE_PULSE_DEVICE (gst_pulse_device_get_type())
76 #define GST_IS_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE))
77 #define GST_IS_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE))
78 #define GST_PULSE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE, GstPulseDeviceClass))
79 #define GST_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE, GstPulseDevice))
80 #define GST_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstPulseDeviceClass))
81 #define GST_PULSE_DEVICE_CAST(obj) ((GstPulseDevice *)(obj))
83 struct _GstPulseDevice {
86 GstPulseDeviceType type;
92 struct _GstPulseDeviceClass {
93 GstDeviceClass parent_class;
96 GType gst_pulse_device_get_type (void);
98 #endif /* __GST_PULSE_DEVICE_MONITOR_H__ */