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 796894 - typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.14.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-30 15:13 UTC by Sebastian Dröge (slomo)
Modified: 2018-08-02 07:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return (8.15 KB, patch)
2018-07-30 15:13 UTC, Sebastian Dröge (slomo)
none Details | Review
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return (8.97 KB, patch)
2018-07-30 19:32 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2018-07-30 15:13:02 UTC
See commit message
Comment 1 Sebastian Dröge (slomo) 2018-07-30 15:13:08 UTC
Created attachment 373220 [details] [review]
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return

And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.
Comment 2 Tim-Philipp Müller 2018-07-30 16:44:28 UTC
gtk-doc chunk has some copy'n'pasted bits that are no longer true ("Returns:", "free-func: gst_caps_unref)
Comment 3 Sebastian Dröge (slomo) 2018-07-30 19:32:28 UTC
Created attachment 373222 [details] [review]
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return

And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.
Comment 4 Sebastian Dröge (slomo) 2018-07-30 19:33:01 UTC
(In reply to Tim-Philipp Müller from comment #2)
> gtk-doc chunk has some copy'n'pasted bits that are no longer true
> ("Returns:", "free-func: gst_caps_unref)

Fixed that and also changed the error behaviour a bit. If during the loop we ever get an non-EOS error, we just exit early and don't return any caps at all (see comment in the code for reasoning).
Comment 5 Sebastian Dröge (slomo) 2018-08-01 14:29:08 UTC
Attachment 373222 [details] pushed as 41f1a40 - typefind: Add new gst_type_find_helper_get_range_full() that returns flow return