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 732874 - audioencoder: Baseclass should call set_format() before propose_allocation()
audioencoder: Baseclass should call set_format() before propose_allocation()
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-08 02:00 UTC by Nicolas Dufresne (ndufresne)
Modified: 2018-11-03 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Dufresne (ndufresne) 2014-07-08 02:00:54 UTC
This was introduce during porting https://bugzilla.gnome.org/show_bug.cgi?id=680614.

The downside is that it makes it counter intuitive, as propose_allocation() should happen after set_format(). To implement propose_allocation(), encoder have to get the caps from the pad, and then most likely parse these caps into GstVideoInfo structure. Without this patch, it would simply have cached the input_state, and read the information from there.

I do think this is in the ABI now, but would at least be nice to revisit for 2.0.
Comment 1 Sebastian Dröge (slomo) 2014-07-08 07:33:27 UTC
This might be ok to change now, we should check early in 1.5. As you say it's completely unexpected behaviour, and was probably not noticed earlier only because nobody used propose_allocation in an encoder yet
Comment 2 Tim-Philipp Müller 2016-08-14 10:30:41 UTC
(Retitling for GstVideoEncoder now since that's the main use case, but applies to GstAudioEncoder too.)
Comment 3 Nicolas Dufresne (ndufresne) 2017-05-21 08:34:46 UTC
This has been done for the encoder in 2014.

commit ce50fc221e8a795d7cfedf471d239d4a9d3bf824
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Tue Jul 8 16:59:37 2014 -0400

    videoencoder: Don't delay set_format
    
    This prevent implementing allocation query, as the format need to be
    known in order to determin the size and number of buffers needed.
    
    Note: This may lead to few regressions that will need fixing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732288

So only the audio encoder got this behaviour now. I would believe it's less of a problem as the allocation in audio is not as dependant on the caps as it is for video. Shall we keep that bug open ?
Comment 4 Sebastian Dröge (slomo) 2017-05-22 07:32:04 UTC
I think we should still do the same in the audio base classes (is the decoder affected too?). It allows for faster negotiation and subclasses can still decide to do things later if they really need.
Comment 5 GStreamer system administrator 2018-11-03 11:30:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/123.