mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
basetransform: optimize default acceptcaps implementation
Pass the fixed caps we're asked to accept as a filter for the caps query, so we don't get a fully-expanded set of caps back (which we don't need and can take a lot of time for intersection). This reduces the time for camerabin to produce a second frame on a logitech C910 camera from around 52 seconds to a bit less then 16 seconds on my system. https://bugzilla.gnome.org/show_bug.cgi?id=702632
This commit is contained in:
parent
0d57bd3198
commit
12a72d2b08
1 changed files with 2 additions and 2 deletions
|
@ -1236,9 +1236,9 @@ gst_base_transform_acceptcaps_default (GstBaseTransform * trans,
|
|||
|
||||
/* get all the formats we can handle on this pad */
|
||||
if (direction == GST_PAD_SRC)
|
||||
allowed = gst_pad_query_caps (trans->srcpad, NULL);
|
||||
allowed = gst_pad_query_caps (trans->srcpad, caps);
|
||||
else
|
||||
allowed = gst_pad_query_caps (trans->sinkpad, NULL);
|
||||
allowed = gst_pad_query_caps (trans->sinkpad, caps);
|
||||
|
||||
if (!allowed) {
|
||||
GST_DEBUG_OBJECT (trans, "gst_pad_query_caps() failed");
|
||||
|
|
Loading…
Reference in a new issue