9cfb4699a3e34ec9b2f0a2790b9c709b9d72ce09
[platform/upstream/gstreamer.git] / ext / pulse / plugin.c
1 /*
2  *  GStreamer pulseaudio plugin
3  *
4  *  Copyright (c) 2004-2008 Lennart Poettering
5  *
6  *  gst-pulse is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU Lesser General Public License as
8  *  published by the Free Software Foundation; either version 2.1 of the
9  *  License, or (at your option) any later version.
10  *
11  *  gst-pulse is distributed in the hope that it will be useful, but
12  *  WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with gst-pulse; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  *  USA.
20  */
21
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25
26 #include "pulsesink.h"
27 #include "pulsesrc.h"
28 #include "pulsemixer.h"
29
30 GST_DEBUG_CATEGORY (pulse_debug);
31
32 static gboolean
33 plugin_init (GstPlugin * plugin)
34 {
35
36   if (!gst_element_register (plugin, "pulsesink", GST_RANK_PRIMARY,
37           GST_TYPE_PULSESINK))
38     return FALSE;
39
40   if (!gst_element_register (plugin, "pulsesrc", GST_RANK_PRIMARY,
41           GST_TYPE_PULSESRC))
42     return FALSE;
43
44   if (!gst_element_register (plugin, "pulsemixer", GST_RANK_NONE,
45           GST_TYPE_PULSEMIXER))
46     return FALSE;
47
48   GST_DEBUG_CATEGORY_INIT (pulse_debug, "pulse", 0, "PulseAudio elements");
49   return TRUE;
50 }
51
52 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
53     GST_VERSION_MINOR,
54     "pulseaudio",
55     "PulseAudio Elements Plugin",
56     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)