From c84108de3c240bd57401236ad332001f0f50a62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 19 Apr 2012 12:13:03 +0200 Subject: [PATCH] video: Update for libgstvideo API changes --- gst-libs/gst/pbutils/gstdiscoverer.c | 3 ++- gst/videoconvert/gstvideoconvert.c | 5 ++--- sys/ximage/ximagepool.c | 4 ++-- sys/xvimage/xvimagepool.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index e4e40a8fef..9d9cee28b0 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -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)) { diff --git a/gst/videoconvert/gstvideoconvert.c b/gst/videoconvert/gstvideoconvert.c index 74e96fb45f..853b470b70 100644 --- a/gst/videoconvert/gstvideoconvert.c +++ b/gst/videoconvert/gstvideoconvert.c @@ -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, diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c index f46e2e7e11..d4729951e1 100644 --- a/sys/ximage/ximagepool.c +++ b/sys/ximage/ximagepool.c @@ -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; diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index f23818e974..ccd7cceabc 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -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);