Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / ext / jpeg / gstjpeg.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 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif
22
23 #include <string.h>
24
25 #include <gst/gst.h>
26
27 #include "gstjpeg.h"
28 #include "gstjpegdec.h"
29 #include "gstjpegenc.h"
30 #include "gstsmokeenc.h"
31 #include "gstsmokedec.h"
32
33 GType
34 gst_idct_method_get_type (void)
35 {
36   static GType idct_method_type = 0;
37   static const GEnumValue idct_method[] = {
38     {JDCT_ISLOW, "Slow but accurate integer algorithm", "islow"},
39     {JDCT_IFAST, "Faster, less accurate integer method", "ifast"},
40     {JDCT_FLOAT, "Floating-point: accurate, fast on fast HW", "float"},
41     {0, NULL, NULL},
42   };
43
44   if (!idct_method_type) {
45     idct_method_type = g_enum_register_static ("GstIDCTMethod", idct_method);
46   }
47   return idct_method_type;
48 }
49
50 static gboolean
51 plugin_init (GstPlugin * plugin)
52 {
53
54   if (!gst_element_register (plugin, "jpegenc", GST_RANK_PRIMARY,
55           GST_TYPE_JPEGENC))
56     return FALSE;
57
58   if (!gst_element_register (plugin, "jpegdec", GST_RANK_PRIMARY,
59           GST_TYPE_JPEG_DEC))
60     return FALSE;
61
62   if (!gst_element_register (plugin, "smokeenc", GST_RANK_PRIMARY,
63           GST_TYPE_SMOKEENC))
64     return FALSE;
65
66   if (!gst_element_register (plugin, "smokedec", GST_RANK_PRIMARY,
67           GST_TYPE_SMOKEDEC))
68     return FALSE;
69
70   return TRUE;
71 }
72
73 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
74     GST_VERSION_MINOR,
75     "jpeg",
76     "JPeg plugin library",
77     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)