documentation: fixed a heap o' typos
[platform/upstream/gstreamer.git] / gst / gaudieffects / gstsolarize.c
index dde548f..23a69d0 100644 (file)
 
 /**
  * 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
@@ -88,7 +88,6 @@ enum
   PROP_THRESHOLD,
   PROP_START,
   PROP_END,
-  PROP_SILENT
 };
 
 /* Initializations */
@@ -144,10 +143,10 @@ gst_solarize_class_init (GstSolarizeClass * klass)
       "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;
@@ -168,17 +167,13 @@ gst_solarize_class_init (GstSolarizeClass * klass)
           "End parameter", 0, 256, DEFAULT_END,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
-  g_object_class_install_property (gobject_class, PROP_SILENT,
-      g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
-          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
   vfilter_class->transform_frame =
       GST_DEBUG_FUNCPTR (gst_solarize_transform_frame);
 }
 
 /* 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
@@ -187,7 +182,6 @@ gst_solarize_init (GstSolarize * filter)
   filter->threshold = DEFAULT_THRESHOLD;
   filter->start = DEFAULT_START;
   filter->end = DEFAULT_END;
-  filter->silent = FALSE;
 }
 
 static void
@@ -197,9 +191,6 @@ gst_solarize_set_property (GObject * object, guint prop_id,
   GstSolarize *filter = GST_SOLARIZE (object);
 
   switch (prop_id) {
-    case PROP_SILENT:
-      filter->silent = g_value_get_boolean (value);
-      break;
     case PROP_THRESHOLD:
       filter->threshold = g_value_get_uint (value);
       break;
@@ -223,9 +214,6 @@ gst_solarize_get_property (GObject * object, guint prop_id,
 
   GST_OBJECT_LOCK (filter);
   switch (prop_id) {
-    case PROP_SILENT:
-      g_value_set_boolean (value, filter->silent);
-      break;
     case PROP_THRESHOLD:
       g_value_set_uint (value, filter->threshold);
       break;
@@ -315,11 +303,8 @@ transform (guint32 * src, guint32 * dest, gint video_area,
   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;
 
@@ -347,12 +332,10 @@ transform (guint32 * src, guint32 * dest, gint video_area,
       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;
       }
     }