video: Update for libgstvideo API changes
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 19 Apr 2012 10:13:03 +0000 (12:13 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 19 Apr 2012 10:30:57 +0000 (12:30 +0200)
gst-libs/gst/pbutils/gstdiscoverer.c
gst/videoconvert/gstvideoconvert.c
sys/ximage/ximagepool.c
sys/xvimage/xvimagepool.c

index e4e40a8..9d9cee2 100644 (file)
@@ -730,7 +730,8 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
       info->framerate_num = vinfo.fps_n;
       info->framerate_denom = vinfo.fps_d;
 
-      info->interlaced = (vinfo.flags & GST_VIDEO_FLAG_INTERLACED) != 0;
+      info->interlaced =
+          vinfo.interlace_mode != GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
     }
 
     if (gst_structure_id_has_field (st, _TAGS_QUARK)) {
index 74e96fb..853b470 100644 (file)
@@ -260,14 +260,13 @@ gst_video_convert_set_info (GstVideoFilter * filter,
     goto format_mismatch;
 
   /* if present, these must match too */
-  if ((in_info->flags & GST_VIDEO_FLAG_INTERLACED) !=
-      (out_info->flags & GST_VIDEO_FLAG_INTERLACED))
+  if (in_info->interlace_mode != out_info->interlace_mode)
     goto format_mismatch;
 
   space->from_spec = in_spec;
   space->to_spec = out_spec;
 
-  interlaced = (in_info->flags & GST_VIDEO_FLAG_INTERLACED) != 0;
+  interlaced = GST_VIDEO_INFO_IS_INTERLACED (in_info);
 
   space->convert =
       videoconvert_convert_new (GST_VIDEO_INFO_FORMAT (out_info), out_spec,
index f46e2e7..d472995 100644 (file)
@@ -580,8 +580,8 @@ ximage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
 
     GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
     /* these are just the defaults for now */
-    meta = gst_buffer_add_video_meta (ximage, 0, GST_VIDEO_INFO_FORMAT (info),
-        priv->padded_width, priv->padded_height);
+    meta = gst_buffer_add_video_meta (ximage, GST_VIDEO_INFO_FORMAT (info),
+        GST_VIDEO_FRAME_FLAG_NONE, priv->padded_width, priv->padded_height);
 
     if (priv->need_alignment) {
       gint vpad, hpad, pstride;
index f23818e..ccd7cce 100644 (file)
@@ -631,8 +631,8 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
 
     GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
     /* these are just the defaults for now */
-    meta = gst_buffer_add_video_meta (xvimage, 0, GST_VIDEO_INFO_FORMAT (info),
-        priv->padded_width, priv->padded_height);
+    meta = gst_buffer_add_video_meta (xvimage, GST_VIDEO_INFO_FORMAT (info),
+        GST_VIDEO_FRAME_FLAG_NONE, priv->padded_width, priv->padded_height);
 
     if (priv->need_alignment) {
       meta->width = GST_VIDEO_INFO_WIDTH (&priv->info);