1 /*
2  * GStreamer openal plugin
3  *
4  * Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
5  * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
6  * Copyright (C) 2009-2010 Chris Robinson <chris.kcat@gmail.com>
7  * Copyright (C) 2013 Juan Manuel Borges Caño <juanmabcmail@gmail.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifdef HAVE_CONFIG_H
26 #include "config.h"
27 #endif
28 
29 #include "gstopenalsink.h"
30 #include "gstopenalsrc.h"
31 
32 #include <gst/gst-i18n-plugin.h>
33 
34 GST_DEBUG_CATEGORY (openal_debug);
35 
36 static gboolean
plugin_init(GstPlugin * plugin)37 plugin_init (GstPlugin * plugin)
38 {
39   if (!gst_element_register (plugin, "openalsink", GST_RANK_SECONDARY,
40           GST_TYPE_OPENAL_SINK))
41     return FALSE;
42 
43   if (!gst_element_register (plugin, "openalsrc", GST_RANK_SECONDARY,
44           GST_TYPE_OPENAL_SRC))
45     return FALSE;
46 
47 #ifdef ENABLE_NLS
48   GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
49       LOCALEDIR);
50   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
51   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
52 #endif
53 
54   GST_DEBUG_CATEGORY_INIT (openal_debug, "openal", 0, "openal plugins");
55   return TRUE;
56 }
57 
58 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
59     GST_VERSION_MINOR,
60     openal,
61     "OpenAL plugin library",
62     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
63