Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / ext / jp2k / gstjp2k.c
1 /* GStreamer Jasper based j2k image decoder/encoder
2  * Copyright (C) 2008 Mark Nauwelaerts <mnauw@users.sf.net>
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 "gstjasperdec.h"
25 #include "gstjasperenc.h"
26
27 /* entry point to initialize the plug-in
28  * initialize the plug-in itself
29  * register the element factories and pad templates
30  * register the features
31  */
32 static gboolean
33 plugin_init (GstPlugin * plugin)
34 {
35   if (!gst_element_register (plugin, "jp2kdec", GST_RANK_MARGINAL,
36           GST_TYPE_JASPER_DEC))
37     return FALSE;
38
39   if (!gst_element_register (plugin, "jp2kenc", GST_RANK_MARGINAL,
40           GST_TYPE_JASPER_ENC))
41     return FALSE;
42
43   /* plugin initialisation succeeded */
44   return TRUE;
45 }
46
47
48 /* this is the structure that gst-register looks for
49  * so keep the name plugin_desc, or you cannot get your plug-in registered */
50 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
51     GST_VERSION_MINOR,
52     "jp2k",
53     "Jasper-based JPEG2000 image decoder/encoder",
54     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)