1 /* GStreamer
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include "gst/tag/tag.h"
25
26 #include "gstvorbisenc.h"
27 #include "gstvorbisdec.h"
28 #include "gstvorbisparse.h"
29 #include "gstvorbistag.h"
30
31 GST_DEBUG_CATEGORY (vorbisenc_debug);
32 GST_DEBUG_CATEGORY (vorbisdec_debug);
33 GST_DEBUG_CATEGORY (vorbisparse_debug);
34 GST_DEBUG_CATEGORY (vorbistag_debug);
35
36 static gboolean
plugin_init(GstPlugin * plugin)37 plugin_init (GstPlugin * plugin)
38 {
39 if (!gst_element_register (plugin, "vorbisenc", GST_RANK_PRIMARY,
40 GST_TYPE_VORBISENC))
41 return FALSE;
42
43 if (!gst_element_register (plugin, "vorbisdec", GST_RANK_PRIMARY,
44 gst_vorbis_dec_get_type ()))
45 return FALSE;
46
47 if (!gst_element_register (plugin, "vorbisparse", GST_RANK_NONE,
48 gst_vorbis_parse_get_type ()))
49 return FALSE;
50
51 if (!gst_element_register (plugin, "vorbistag", GST_RANK_NONE,
52 gst_vorbis_tag_get_type ()))
53 return FALSE;
54
55 GST_DEBUG_CATEGORY_INIT (vorbisenc_debug, "vorbisenc", 0,
56 "vorbis encoding element");
57 GST_DEBUG_CATEGORY_INIT (vorbisdec_debug, "vorbisdec", 0,
58 "vorbis decoding element");
59 GST_DEBUG_CATEGORY_INIT (vorbisparse_debug, "vorbisparse", 0,
60 "vorbis parsing element");
61 GST_DEBUG_CATEGORY_INIT (vorbistag_debug, "vorbistag", 0,
62 "vorbis tagging element");
63
64 gst_tag_register_musicbrainz_tags ();
65
66 return TRUE;
67 }
68
69 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
70 GST_VERSION_MINOR,
71 vorbis,
72 "Vorbis plugin library",
73 plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
74