don't mix tabs and spaces
[platform/upstream/gst-plugins-good.git] / gst / effectv / gsteffectv.c
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * EffecTV:
5  * Copyright (C) 2001 FUKUCHI Kentarou
6  *
7  * EffecTV is free software. This library is free software;
8  * you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  * 
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  * 
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifdef HAVE_CONFIG_H
25 #include "config.h"
26 #endif
27
28 #include <string.h>
29 #include <gst/gst.h>
30 #include <gst/video/video.h>
31 #include "gsteffectv.h"
32
33
34 struct _elements_entry
35 {
36   gchar *name;
37     GType (*type) (void);
38 };
39
40 static struct _elements_entry _elements[] = {
41   {"edgeTV", gst_edgetv_get_type},
42   {"agingTV", gst_agingtv_get_type},
43   {"diceTV", gst_dicetv_get_type},
44   {"warpTV", gst_warptv_get_type},
45   {"shagadelicTV", gst_shagadelictv_get_type},
46   {"vertigoTV", gst_vertigotv_get_type},
47   {"revTV", gst_revtv_get_type},
48   {"quarkTV", gst_quarktv_get_type},
49   {NULL, 0},
50 };
51
52
53 GstStaticPadTemplate gst_effectv_src_template = GST_STATIC_PAD_TEMPLATE ("src",
54     GST_PAD_SRC,
55     GST_PAD_ALWAYS,
56     GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx "; " GST_VIDEO_CAPS_RGBx)
57     );
58
59 GstStaticPadTemplate gst_effectv_sink_template =
60     GST_STATIC_PAD_TEMPLATE ("sink",
61     GST_PAD_SINK,
62     GST_PAD_ALWAYS,
63     GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx "; " GST_VIDEO_CAPS_RGBx)
64     );
65
66 static gboolean
67 plugin_init (GstPlugin * plugin)
68 {
69   gint i = 0;
70
71   if (!gst_library_load ("gstvideofilter"))
72     return FALSE;
73
74   while (_elements[i].name) {
75     if (!gst_element_register (plugin, _elements[i].name,
76             GST_RANK_NONE, (_elements[i].type) ()))
77       return FALSE;
78     i++;
79   }
80
81   return TRUE;
82 }
83
84 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
85     GST_VERSION_MINOR,
86     "effectv",
87     "effect plugins from the effectv project",
88     plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN);