1 /* GStreamer 2 * Copyright (C) 2016 Hyunjun Ko <zzoon@igalia.com> 3 * 4 * gstosxaudiodeviceeprovider.h: OSX audio probing and monitoring 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_OSX_AUDIO_DEIVCE_PROVIDER_H__ 24 #define __GST_OSX_AUDIO_DEIVCE_PROVIDER_H__ 25 26 #ifdef HAVE_CONFIG_H 27 #include "config.h" 28 #endif 29 30 #include <gst/gst.h> 31 #include "gstosxcoreaudiocommon.h" 32 33 G_BEGIN_DECLS 34 typedef struct _GstOsxAudioDeviceProvider GstOsxAudioDeviceProvider; 35 typedef struct _GstOsxAudioDeviceProviderClass GstOsxAudioDeviceProviderClass; 36 37 #define GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER (gst_osx_audio_device_provider_get_type()) 38 #define GST_IS_OSX_AUDIO_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER)) 39 #define GST_IS_OSX_AUDIO_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER)) 40 #define GST_OSX_AUDIO_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER, GstOsxAudioDeviceProviderClass)) 41 #define GST_OSX_AUDIO_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER, GstOsxAudioDeviceProvider)) 42 #define GST_OSX_AUDIO_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstOsxAudioDeviceProviderClass)) 43 #define GST_OSX_AUDIO_DEVICE_PROVIDER_CAST(obj) ((GstOsxAudioDeviceProvider *)(obj)) 44 45 struct _GstOsxAudioDeviceProvider 46 { 47 GstDeviceProvider parent; 48 }; 49 50 struct _GstOsxAudioDeviceProviderClass 51 { 52 GstDeviceProviderClass parent_class; 53 }; 54 55 GType gst_osx_audio_device_provider_get_type (void); 56 57 typedef struct _GstOsxAudioDevice GstOsxAudioDevice; 58 typedef struct _GstOsxAudioDeviceClass GstOsxAudioDeviceClass; 59 60 #define GST_TYPE_OSX_AUDIO_DEVICE (gst_osx_audio_device_get_type()) 61 #define GST_IS_OSX_AUDIO_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OSX_AUDIO_DEVICE)) 62 #define GST_IS_OSX_AUDIO_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OSX_AUDIO_DEVICE)) 63 #define GST_OSX_AUDIO_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OSX_AUDIO_DEVICE, GstOsxAudioClass)) 64 #define GST_OSX_AUDIO_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OSX_AUDIO_DEVICE, GstOsxAudioDevice)) 65 #define GST_OSX_AUDIO_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstOsxAudioDeviceClass)) 66 #define GST_OSX_AUDIO_DEVICE_CAST(obj) ((GstOsxAudioDevice *)(obj)) 67 68 typedef enum 69 { 70 GST_OSX_AUDIO_DEVICE_TYPE_INVALID = 0, 71 GST_OSX_AUDIO_DEVICE_TYPE_SOURCE, 72 GST_OSX_AUDIO_DEVICE_TYPE_SINK 73 } GstOsxAudioDeviceType; 74 75 struct _GstOsxAudioDevice 76 { 77 GstDevice parent; 78 79 const gchar *element; 80 AudioDeviceID device_id; 81 }; 82 83 struct _GstOsxAudioDeviceClass 84 { 85 GstDeviceClass parent_class; 86 }; 87 88 GType gst_osx_audio_device_get_type (void); 89 90 G_END_DECLS 91 #endif /* __GST_OSX_AUDIO_DEIVCE_PROVIDER_H__ */ 92