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 763337 - capsfilter: remove unnecessary gst_pad_has_current_caps() calls for each buffer
capsfilter: remove unnecessary gst_pad_has_current_caps() calls for each buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-08 18:38 UTC by Tim-Philipp Müller
Modified: 2016-03-24 12:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
capsfilter: optimisation: avoid unnecessary gst_pad_has_current_caps() checks (4.49 KB, patch)
2016-03-08 19:27 UTC, Tim-Philipp Müller
committed Details | Review
audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks (1.78 KB, patch)
2016-03-08 19:27 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2016-03-08 18:38:14 UTC
capsfilter seems to do a lot of gst_pad_get_current_caps() which I think are entirely superfluous and from the comments in the code this is a leftover of caps-being-set-on-buffers or such, e.g. in gst_capsfilter_prepare_buf().

We should be able to optimise that.
Comment 1 Tim-Philipp Müller 2016-03-08 19:27:21 UTC
Created attachment 323433 [details] [review]
capsfilter: optimisation: avoid unnecessary gst_pad_has_current_caps() checks
Comment 2 Tim-Philipp Müller 2016-03-08 19:27:47 UTC
Created attachment 323434 [details] [review]
audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks
Comment 3 Sebastian Dröge (slomo) 2016-03-09 07:07:19 UTC
Comment on attachment 323434 [details] [review]
audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks

Maybe gst_audio_decoder_set_needs_format() should become a flag on GstPad and be implemented there?
Comment 4 Sebastian Dröge (slomo) 2016-03-24 12:51:03 UTC
Attachment 323433 [details] pushed as bc78548 - capsfilter: optimisation: avoid unnecessary gst_pad_has_current_caps() checks
Comment 5 Sebastian Dröge (slomo) 2016-03-24 12:51:29 UTC
Comment on attachment 323434 [details] [review]
audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks

Attachment 323434 [details] pushed as f4fb623 - audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks