mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
imagefreeze: the new get_caps already does the filter intersection
It should be faster to pass the caps to intersect as the filter caps, rather than using NULL and intersecting 'manually' later. https://bugzilla.gnome.org/show_bug.cgi?id=686837
This commit is contained in:
parent
115581eb2e
commit
02d91dcd24
1 changed files with 5 additions and 11 deletions
|
@ -196,17 +196,11 @@ gst_image_freeze_sink_setcaps (GstImageFreeze * self, GstCaps * caps)
|
||||||
intersection = othercaps = NULL;
|
intersection = othercaps = NULL;
|
||||||
|
|
||||||
/* 3. Intersect with downstream peer caps */
|
/* 3. Intersect with downstream peer caps */
|
||||||
othercaps = gst_pad_peer_query_caps (self->srcpad, NULL);
|
othercaps = gst_pad_peer_query_caps (self->srcpad, caps);
|
||||||
if (othercaps) {
|
GST_DEBUG_OBJECT (pad, "Peer query resulted: %" GST_PTR_FORMAT, othercaps);
|
||||||
intersection = gst_caps_intersect (caps, othercaps);
|
|
||||||
GST_DEBUG_OBJECT (pad, "Intersecting: %" GST_PTR_FORMAT, caps);
|
|
||||||
GST_DEBUG_OBJECT (pad, "with: %" GST_PTR_FORMAT, othercaps);
|
|
||||||
GST_DEBUG_OBJECT (pad, "gave: %" GST_PTR_FORMAT, intersection);
|
|
||||||
gst_caps_unref (othercaps);
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
caps = intersection;
|
caps = othercaps;
|
||||||
intersection = othercaps = NULL;
|
othercaps = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
/* 4. For every candidate check if it's accepted downstream
|
/* 4. For every candidate check if it's accepted downstream
|
||||||
* and fixate framerate to nearest 25/1 */
|
* and fixate framerate to nearest 25/1 */
|
||||||
|
|
Loading…
Reference in a new issue