/**
* SECTION:element-solarize
+ * @title: solarize
*
* Solarize does a smart inverse in a video stream in realtime.
*
- * <refsect2>
- * <title>Example launch line</title>
+ * ## Example launch line
* |[
- * gst-launch -v videotestsrc ! solarize ! videoconvert ! autovideosink
+ * gst-launch-1.0 -v videotestsrc ! solarize ! videoconvert ! autovideosink
* ]| This pipeline shows the effect of solarize on a test stream
- * </refsect2>
+ *
*/
#ifdef HAVE_CONFIG_H
"Solarize tunable inverse in the video signal.",
"Luis de Bethencourt <luis@debethencourt.com>");
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_solarize_sink_template));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_solarize_src_template));
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_solarize_sink_template);
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_solarize_src_template);
gobject_class->set_property = gst_solarize_set_property;
gobject_class->get_property = gst_solarize_get_property;
/* Initialize the element,
* instantiate pads and add them to element,
- * set pad calback functions, and
+ * set pad callback functions, and
* initialize instance structure.
*/
static void
gint period = 1, up_length = 1, down_length = 1;
gint x, c;
gint param;
- static const guint floor = 0;
static const guint ceiling = 255;
-
-
if (end != start)
period = end - start;
if (param < up_length) {
color[c] = param * ceiling;
color[c] /= up_length;
- color[c] += floor;
} else {
color[c] = down_length - (param - up_length);
color[c] *= ceiling;
color[c] /= down_length;
- color[c] += floor;
}
}