Merge remote-tracking branch 'origin/master' into 0.11
[platform/upstream/gstreamer.git] / gst / effectv / gstwarp.c
index f4a617f..80161a7 100644 (file)
@@ -54,7 +54,8 @@
 #include <math.h>
 
 #include "gstwarp.h"
-#include <gst/video/gstmetavideo.h>
+#include <gst/video/gstvideometa.h>
+#include <gst/video/gstvideopool.h>
 
 #ifndef M_PI
 #define M_PI    3.14159265358979323846
@@ -132,11 +133,7 @@ initDistTable (GstWarpTV * filter, gint width, gint height)
 {
   gint32 halfw, halfh, *distptr;
   gint x, y;
-#ifdef PS2
-  float m;
-#else
   float m;
-#endif
 
   halfw = width >> 1;
   halfh = height >> 1;
@@ -161,7 +158,7 @@ gst_warptv_transform (GstBaseTransform * trans, GstBuffer * in, GstBuffer * out)
   gint width, height;
   gint xw, yw, cw;
   gint32 c, i, x, y, dx, dy, maxx, maxy;
-  gint32 skip, *ctptr, *distptr;
+  gint32 *ctptr, *distptr;
   gint32 *ctable;
   guint32 *src, *dest;
   gint sstride, dstride;
@@ -190,7 +187,6 @@ gst_warptv_transform (GstBaseTransform * trans, GstBuffer * in, GstBuffer * out)
   distptr = warptv->disttable;
   ctable = warptv->ctable;
 
-  skip = 0;                     /* video_width*sizeof(RGB32)/4 - video_width;; */
   c = 0;
 
   for (x = 0; x < 512; x++) {
@@ -243,7 +239,7 @@ gst_warptv_start (GstBaseTransform * trans)
 }
 
 static gboolean
-gst_wraptv_setup_allocation (GstBaseTransform * trans, GstQuery * query)
+gst_wraptv_decide_allocation (GstBaseTransform * trans, GstQuery * query)
 {
   GstBufferPool *pool = NULL;
   guint size, min, max, prefix, alignment;
@@ -255,7 +251,8 @@ gst_wraptv_setup_allocation (GstBaseTransform * trans, GstQuery * query)
     GstStructure *config;
 
     config = gst_buffer_pool_get_config (pool);
-    gst_buffer_pool_config_add_meta (config, GST_META_API_VIDEO);
+    gst_buffer_pool_config_add_option (config,
+        GST_BUFFER_POOL_OPTION_VIDEO_META);
     gst_buffer_pool_set_config (pool, config);
   }
   return TRUE;
@@ -293,8 +290,8 @@ gst_warptv_class_init (GstWarpTVClass * klass)
 
   trans_class->start = GST_DEBUG_FUNCPTR (gst_warptv_start);
   trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_warptv_set_caps);
-  trans_class->setup_allocation =
-      GST_DEBUG_FUNCPTR (gst_wraptv_setup_allocation);
+  trans_class->decide_allocation =
+      GST_DEBUG_FUNCPTR (gst_wraptv_decide_allocation);
   trans_class->transform = GST_DEBUG_FUNCPTR (gst_warptv_transform);
 
   initSinTable ();
@@ -303,6 +300,5 @@ gst_warptv_class_init (GstWarpTVClass * klass)
 static void
 gst_warptv_init (GstWarpTV * warptv)
 {
-  gst_pad_use_fixed_caps (GST_BASE_TRANSFORM_SRC_PAD (warptv));
-  gst_pad_use_fixed_caps (GST_BASE_TRANSFORM_SINK_PAD (warptv));
+  /* nothing to do */
 }