2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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.
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.
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.
22 #include "gsteffectv.h"
25 struct _elements_entry {
28 GstElementDetails *details;
29 gboolean (*factoryinit) (GstElementFactory *factory);
32 static struct _elements_entry _elements[] = {
33 { "edgeTV", gst_edgetv_get_type, &gst_edgetv_details, NULL },
34 { "agingTV", gst_agingtv_get_type, &gst_agingtv_details, NULL },
40 gst_effectv_src_factory (void)
42 static GstPadTemplate *templ = NULL;
44 templ = GST_PAD_TEMPLATE_NEW (
51 "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")),
52 "bpp", GST_PROPS_INT (32),
53 "depth", GST_PROPS_INT (32),
54 "endianness", GST_PROPS_INT (G_BYTE_ORDER),
55 "red_mask", GST_PROPS_INT (0xff0000),
56 "green_mask", GST_PROPS_INT (0xff00),
57 "blue_mask", GST_PROPS_INT (0xff),
58 "width", GST_PROPS_INT_RANGE (16, 4096),
59 "height", GST_PROPS_INT_RANGE (16, 4096)
67 gst_effectv_sink_factory (void)
69 static GstPadTemplate *templ = NULL;
71 templ = GST_PAD_TEMPLATE_NEW (
78 "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")),
79 "bpp", GST_PROPS_INT (32),
80 "depth", GST_PROPS_INT (32),
81 "endianness", GST_PROPS_INT (G_BYTE_ORDER),
82 "red_mask", GST_PROPS_INT (0xff0000),
83 "green_mask", GST_PROPS_INT (0xff00),
84 "blue_mask", GST_PROPS_INT (0xff),
85 "width", GST_PROPS_INT_RANGE (16, 4096),
86 "height", GST_PROPS_INT_RANGE (16, 4096)
94 plugin_init (GModule * module, GstPlugin * plugin)
96 GstElementFactory *factory;
99 while (_elements[i].name) {
100 factory = gst_element_factory_new (_elements[i].name,
101 (_elements[i].type) (),
102 _elements[i].details);
105 g_warning ("gst_effecttv_new failed for `%s'",
109 gst_element_factory_add_pad_template (factory, gst_effectv_src_factory ());
110 gst_element_factory_add_pad_template (factory, gst_effectv_sink_factory ());
112 gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
113 if (_elements[i].factoryinit) {
114 _elements[i].factoryinit (factory);
122 GstPluginDesc plugin_desc = {