2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
5 * Copyright (C) 2001 FUKUCHI Kentarou
7 * EffecTV is free software. We release this product under the terms of the
8 * GNU General Public License version 2. The license is included in the file
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 #include "gsteffectv.h"
21 struct _elements_entry {
24 GstElementDetails *details;
25 gboolean (*factoryinit) (GstElementFactory *factory);
28 static struct _elements_entry _elements[] = {
29 { "edgeTV", gst_edgetv_get_type, &gst_edgetv_details, NULL },
30 { "agingTV", gst_agingtv_get_type, &gst_agingtv_details, NULL },
31 { "diceTV", gst_dicetv_get_type, &gst_dicetv_details, NULL },
32 { "warpTV", gst_warptv_get_type, &gst_warptv_details, NULL },
33 { "shagadelicTV", gst_shagadelictv_get_type, &gst_shagadelictv_details, NULL },
34 { "vertigoTV", gst_vertigotv_get_type, &gst_vertigotv_details, NULL },
35 { "revTV", gst_revtv_get_type, &gst_revtv_details, NULL },
41 gst_effectv_src_factory (void)
43 static GstPadTemplate *templ = NULL;
45 templ = GST_PAD_TEMPLATE_NEW (
52 "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")),
53 "bpp", GST_PROPS_INT (32),
54 "depth", GST_PROPS_INT (32),
55 "endianness", GST_PROPS_INT (G_BYTE_ORDER),
56 "red_mask", GST_PROPS_INT (0xff0000),
57 "green_mask", GST_PROPS_INT (0xff00),
58 "blue_mask", GST_PROPS_INT (0xff),
59 "width", GST_PROPS_INT_RANGE (16, 4096),
60 "height", GST_PROPS_INT_RANGE (16, 4096)
68 gst_effectv_sink_factory (void)
70 static GstPadTemplate *templ = NULL;
72 templ = GST_PAD_TEMPLATE_NEW (
79 "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")),
80 "bpp", GST_PROPS_INT (32),
81 "depth", GST_PROPS_INT (32),
82 "endianness", GST_PROPS_INT (G_BYTE_ORDER),
83 "red_mask", GST_PROPS_INT (0xff0000),
84 "green_mask", GST_PROPS_INT (0xff00),
85 "blue_mask", GST_PROPS_INT (0xff),
86 "width", GST_PROPS_INT_RANGE (16, 4096),
87 "height", GST_PROPS_INT_RANGE (16, 4096)
95 plugin_init (GModule * module, GstPlugin * plugin)
97 GstElementFactory *factory;
100 while (_elements[i].name) {
101 factory = gst_element_factory_new (_elements[i].name,
102 (_elements[i].type) (),
103 _elements[i].details);
106 g_warning ("gst_effecttv_new failed for `%s'",
110 gst_element_factory_add_pad_template (factory, gst_effectv_src_factory ());
111 gst_element_factory_add_pad_template (factory, gst_effectv_sink_factory ());
113 gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
114 if (_elements[i].factoryinit) {
115 _elements[i].factoryinit (factory);
123 GstPluginDesc plugin_desc = {