add experimental kiosrc plugin
[platform/upstream/gstreamer.git] / ext / alsa / gstalsaplugin.c
1 /*
2  * Copyright (C) 2001 CodeFactory AB
3  * Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
4  * Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
5  * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25
26 #include "gstalsasink.h"
27 #include "gstalsasrc.h"
28 #include "gstalsamixer.h"
29
30 GST_DEBUG_CATEGORY (alsa_debug);
31
32 static gboolean
33 plugin_init (GstPlugin * plugin)
34 {
35   if (!gst_element_register (plugin, "alsamixer", GST_RANK_NONE,
36           GST_TYPE_ALSA_MIXER))
37     return FALSE;
38   if (!gst_element_register (plugin, "alsasrc", GST_RANK_NONE,
39           GST_TYPE_ALSA_SRC))
40     return FALSE;
41   if (!gst_element_register (plugin, "alsasink", GST_RANK_NONE,
42           GST_TYPE_ALSA_SINK))
43     return FALSE;
44
45   GST_DEBUG_CATEGORY_INIT (alsa_debug, "alsa", 0, "alsa plugins");
46
47   return TRUE;
48 }
49
50 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
51     GST_VERSION_MINOR,
52     "alsa",
53     "ALSA plugin library",
54     plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)