a52b94f6e599fee9c1b36f778bd878ec1c9572e6
[platform/upstream/gst-plugins-good.git] / ext / flac / gstflac.c
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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include "gstflacenc.h"
25 #include "gstflacdec.h"
26
27 #include "flac_compat.h"
28
29 static gboolean
30 plugin_init (GstPlugin *plugin)
31 {
32   if (!gst_library_load ("gstbytestream"))
33     return FALSE;
34
35   /* we need the gsttags plugin for metadata querying */
36   if (!gst_plugin_load ("gsttags"))
37     return FALSE;
38
39   if (!gst_element_register (plugin, "flacenc", GST_RANK_NONE, GST_TYPE_FLACENC))
40     return FALSE;
41
42   if (!gst_element_register (plugin, "flacdec", GST_RANK_PRIMARY, GST_TYPE_FLACDEC))
43     return FALSE;
44   
45   return TRUE;
46 }
47
48 GST_PLUGIN_DEFINE (
49   GST_VERSION_MAJOR,
50   GST_VERSION_MINOR,
51   "flac",
52   "The FLAC Lossless compressor Codec",
53   plugin_init,
54   VERSION,
55   "LGPL",
56   GST_COPYRIGHT,
57   GST_PACKAGE,
58   GST_ORIGIN)