After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710268 - basetransform: cannot answer GST_QUERY_ALLOCATION if its src has ANY caps
basetransform: cannot answer GST_QUERY_ALLOCATION if its src has ANY caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.0.7
Other Linux
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-16 13:13 UTC by Kneale Rothwell
Modified: 2014-05-26 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kneale Rothwell 2013-10-16 13:13:56 UTC
In gst_base_src_default_negotiate(), if gst_caps_is_any() goto no_nego_needed, which means that gst_base_src_set_caps is never called and no GST_EVENT_CAPS is emitted from the src element.

In gst_base_transform_default_query(), when answering GST_QUERY_ALLOCATION, if !priv->negotiated, "not negotiated yet, can't answer ALLOCATION query".  

priv->negotiated only gets set in response to a GST_EVENT_CAPS, so for some pipelines the transform element is unable to query further downstream with GST_QUERY_ALLOCATION and instead allocates buffers itself.  For downstream elements, most notably decoders, that require the use of a specific GstAllocator this means some pipelines fail.

For example, assuming myaudiodecoder has a GstAllocator and cannot receive GstBuffers allocated by the default allocator:

 gst-launch-1.0 filesrc location=/usr/test.mp3 ! myaudiodecoder ! myaudiosink

works, i.e. filesrc allocates buffers using an allocator assigned by myaudiodecoder, but


 gst-launch-1.0 filesrc location=/usr/test.mp3 ! identity ! myaudiodecoder ! myaudiosink

fails because the 'identity' element (base class GstBaseTransform) fails to forward the GST_QUERY_ALLOCATION from filesrc (base class GstBaseSrc) to myaudiodecoder because filesrc never emitted a GST_EVENT_CAPS.
Comment 1 Sebastian Dröge (slomo) 2014-01-14 19:45:43 UTC
Confirmed, that needs to be fixed.

However your audiodecoder should use special capsfeatures if it can't work with normal system memory. But that's a separate issue :)
Comment 2 Sebastian Dröge (slomo) 2014-05-26 12:26:38 UTC
commit 70b38dd9375f747bd8a9218c14a00631553ba792
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon May 26 14:23:13 2014 +0200

    basetransform: Passthrough ALLOCATION queries in passthrough mode even if we had no caps yet
    
    Or if the element does not care about caps at all.
    
    Also remove an assigned but unused local variable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710268