From: Sebastian Dröge Date: Mon, 16 May 2011 10:02:48 +0000 (+0200) Subject: videoscale: Update for negotiation related API changes X-Git-Tag: 1.19.3~511^2~7681 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d39d5bb8fb626160c410547ed162aac15b882fc;p=platform%2Fupstream%2Fgstreamer.git videoscale: Update for negotiation related API changes --- diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 2dc8658..73f764e 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -197,7 +197,7 @@ static gboolean gst_video_scale_src_event (GstBaseTransform * trans, /* base transform vmethods */ static GstCaps *gst_video_scale_transform_caps (GstBaseTransform * trans, - GstPadDirection direction, GstCaps * caps); + GstPadDirection direction, GstCaps * caps, GstCaps * filter); static gboolean gst_video_scale_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out); static gboolean gst_video_scale_get_unit_size (GstBaseTransform * trans, @@ -322,7 +322,7 @@ gst_video_scale_get_property (GObject * object, guint prop_id, GValue * value, static GstCaps * gst_video_scale_transform_caps (GstBaseTransform * trans, - GstPadDirection direction, GstCaps * caps) + GstPadDirection direction, GstCaps * caps, GstCaps * filter) { GstCaps *ret; GstStructure *structure; @@ -347,6 +347,15 @@ gst_video_scale_transform_caps (GstBaseTransform * trans, 1, G_MAXINT, G_MAXINT, 1, NULL); } + if (filter) { + GstCaps *intersection; + + intersection = + gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (ret); + ret = intersection; + } + GST_DEBUG_OBJECT (trans, "returning caps: %" GST_PTR_FORMAT, ret); return ret;