mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
basetransform: Allow going passthrough inside decide_allocation
Sub-class may want to decide to go passthrough/in-place by inspecting the support meta APIs. This patch duplicates the check for this mode, so we still don't do uneeded allocation query while we allow sub-classes to switch the behaviour during it's own decide_allocation call. Notice that such sub-class need to reset the class to non-passthrough in set_caps() in order for decide_allocation to be called again. This is needed otherwise we'd be doing an allocation query in element in which it make no sense (notably capsfilter). https://bugzilla.gnome.org/show_bug.cgi?id=791453
This commit is contained in:
parent
f85e93d004
commit
443221c661
1 changed files with 9 additions and 0 deletions
|
@ -949,6 +949,15 @@ gst_base_transform_do_bufferpool (GstBaseTransform * trans, GstCaps * outcaps)
|
||||||
if (!result)
|
if (!result)
|
||||||
goto no_decide_allocation;
|
goto no_decide_allocation;
|
||||||
|
|
||||||
|
/* check again in case the sub-class have switch to passthrough/in-place
|
||||||
|
* after looking at the meta APIs */
|
||||||
|
if (priv->passthrough || priv->always_in_place) {
|
||||||
|
GST_DEBUG_OBJECT (trans, "no doing passthrough, delay bufferpool");
|
||||||
|
gst_base_transform_set_allocation (trans, NULL, NULL, NULL, NULL);
|
||||||
|
gst_query_unref (query);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* we got configuration from our peer or the decide_allocation method,
|
/* we got configuration from our peer or the decide_allocation method,
|
||||||
* parse them */
|
* parse them */
|
||||||
if (gst_query_get_n_allocation_params (query) > 0) {
|
if (gst_query_get_n_allocation_params (query) > 0) {
|
||||||
|
|
Loading…
Reference in a new issue