[v4l2videodecoder] Post message for number of buffers
[platform/upstream/gst-plugins-good.git] / gst / effectv / gstop.c
index 6d01395..283878f 100644 (file)
@@ -20,8 +20,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 /**
@@ -34,7 +34,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v videotestsrc ! optv ! videoconvert ! autovideosink
+ * gst-launch-1.0 -v videotestsrc ! optv ! videoconvert ! autovideosink
  * ]| This pipeline shows the effect of optv on a test stream.
  * </refsect2>
  */
@@ -275,14 +275,12 @@ gst_optv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
   height = GST_VIDEO_INFO_HEIGHT (in_info);
 
   for (i = 0; i < 4; i++) {
-    if (filter->opmap[i])
-      g_free (filter->opmap[i]);
+    g_free (filter->opmap[i]);
     filter->opmap[i] = g_new (gint8, width * height);
   }
   setOpmap (filter->opmap, width, height);
 
-  if (filter->diff)
-    g_free (filter->diff);
+  g_free (filter->diff);
   filter->diff = g_new (guint8, width * height);
 
   return TRUE;
@@ -307,14 +305,12 @@ gst_optv_finalize (GObject * object)
     gint i;
 
     for (i = 0; i < 4; i++) {
-      if (filter->opmap[i])
-        g_free (filter->opmap[i]);
+      g_free (filter->opmap[i]);
       filter->opmap[i] = NULL;
     }
   }
 
-  if (filter->diff)
-    g_free (filter->diff);
+  g_free (filter->diff);
   filter->diff = NULL;
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -394,16 +390,16 @@ gst_optv_class_init (GstOpTVClass * klass)
           "Luma threshold", 0, G_MAXINT, DEFAULT_THRESHOLD,
           GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  gst_element_class_set_details_simple (gstelement_class, "OpTV effect",
+  gst_element_class_set_static_metadata (gstelement_class, "OpTV effect",
       "Filter/Effect/Video",
       "Optical art meets real-time video effect",
       "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>, "
       "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
 
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_optv_sink_template));
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&gst_optv_src_template));
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_optv_sink_template);
+  gst_element_class_add_static_pad_template (gstelement_class,
+      &gst_optv_src_template);
 
   trans_class->start = GST_DEBUG_FUNCPTR (gst_optv_start);