static GstElementDetails colorspace_details = {
"Colorspace converter",
"Filter/Effect",
- "LGPL",
"Converts video from one colorspace to another",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001",
+ "Wim Taymans <wim.taymans@chello.be>"
};
static GType gst_colorspace_get_type (void);
static void gst_colorspace_class_init (GstColorspaceClass *klass);
+static void gst_colorspace_base_init (GstColorspaceClass *klass);
static void gst_colorspace_init (GstColorspace *space);
static void gst_colorspace_set_property (GObject *object, guint prop_id,
if (!colorspace_type) {
static const GTypeInfo colorspace_info = {
sizeof(GstColorspaceClass),
- NULL,
+ (GBaseInitFunc)gst_colorspace_base_init,
NULL,
(GClassInitFunc)gst_colorspace_class_init,
NULL,
return colorspace_type;
}
+static void
+gst_colorspace_base_init (GstColorspaceClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_pad_template (element_class, srctempl);
+ gst_element_class_add_pad_template (element_class, sinktempl);
+ gst_element_class_set_details (element_class, &colorspace_details);
+}
+
static void
gst_colorspace_class_init (GstColorspaceClass *klass)
{
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
GstCaps *caps;
lcs_init (NULL, NULL);
- factory = gst_element_factory_new ("colorspacelcs", GST_TYPE_COLORSPACE,
- &colorspace_details);
- g_return_val_if_fail (factory != NULL, FALSE);
+ if (!gst_element_register (plugin, "colorspace", GST_RANK_NONE,
+ GST_TYPE_COLORSPACE))
+ return FALSE;
/* create caps for templates */
caps = gst_caps_new ("csp_templ_yuv",
GST_PAD_ALWAYS,
caps, NULL);
- gst_element_factory_add_pad_template (factory, srctempl);
- gst_element_factory_add_pad_template (factory, sinktempl);
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"colorspacelcs",
- plugin_init
-};
+ "LCS colorspace convertor",
+ plugin_init,
+ VERSION,
+ "LGPL",
+ "(c) 2003 The LCS team",
+ "LCS",
+ "http://www.codecs.org/"
+)