1 /*
2  * GStreamer
3  * Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
4  * Copyright (C) 2007,2008 Pioneers of the Inevitable <songbird@songbirdnest.com>
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., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * The development of this code was made possible due to the involvement of
22  * Pioneers of the Inevitable, the creators of the Songbird Music player
23  *
24  */
25 
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29 
30 #include "gstosxaudioelement.h"
31 #include "gstosxaudiosink.h"
32 #include "gstosxaudiosrc.h"
33 #ifndef HAVE_IOS
34 #include "gstosxaudiodeviceprovider.h"
35 #endif
36 
37 static gboolean
plugin_init(GstPlugin * plugin)38 plugin_init (GstPlugin * plugin)
39 {
40   if (!gst_element_register (plugin, "osxaudiosink", GST_RANK_PRIMARY,
41           GST_TYPE_OSX_AUDIO_SINK)) {
42     return FALSE;
43   }
44   if (!gst_element_register (plugin, "osxaudiosrc", GST_RANK_PRIMARY,
45           GST_TYPE_OSX_AUDIO_SRC)) {
46     return FALSE;
47   }
48 #ifndef HAVE_IOS
49   if (!gst_device_provider_register (plugin, "osxaudiodeviceprovider",
50           GST_RANK_PRIMARY, GST_TYPE_OSX_AUDIO_DEVICE_PROVIDER))
51     return FALSE;
52 #endif
53 
54   return TRUE;
55 }
56 
57 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
58     GST_VERSION_MINOR,
59     osxaudio,
60     "OSX (Mac OS X) audio support for GStreamer",
61     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
62