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 511413 - make tee prefer higher return values
make tee prefer higher return values
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-23 00:32 UTC by Olivier Crête
Modified: 2008-12-08 21:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always have the accumulator for the tee's return value go up (795 bytes, patch)
2008-01-23 00:33 UTC, Olivier Crête
none Details | Review
Improved patch (1.27 KB, patch)
2008-01-23 00:45 UTC, Olivier Crête
needs-work Details | Review

Description Olivier Crête 2008-01-23 00:32:37 UTC
GstTee can currently overwrite GST_FLOW_OK from one element with a GST_FLOW_WRONG_STATE from another, or do the opposite in an unpredictable manner. The accumulator should always go one way, I propose up. Patch attached.
Comment 1 Olivier Crête 2008-01-23 00:33:51 UTC
Created attachment 103501 [details] [review]
Always have the accumulator for the tee's return value go up
Comment 2 Olivier Crête 2008-01-23 00:45:15 UTC
Created attachment 103503 [details] [review]
Improved patch

I though, well, why not just return the highest error always, instead of special-casing not-linked. So I'm attaching an improved patch.
Comment 3 Wim Taymans 2008-01-25 17:25:13 UTC
NOT-LINKED should be returned when all pads are unlinked. OK should be returned when all pads returned OK, any other error value should be passed upstream. I can't quite see how that happens in this patch.
Comment 4 Olivier Crête 2008-01-27 21:46:53 UTC
I was hoping to hide wrong-states too. so that one can stop one branch of from the tee without having to block the streaming thread. That's why I did the prefer higher return value.
Comment 5 Olivier Crête 2008-08-25 22:30:00 UTC
any chance of having this merged? Or should I have a tee fork for farsight ?
Comment 6 Sebastian Dröge (slomo) 2008-08-26 10:01:00 UTC
IMHO it makes sense for tee to ignore wrong-state the same way not-linked is ignored, i.e. when at least some pads return ok
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2008-08-28 06:37:50 UTC
Shouldn't this use the same loging like what demuxers use to aggregate flow-returns (like gst_avi_demux_combine_flows).
Comment 8 Wim Taymans 2008-12-08 21:13:57 UTC
Can you explain why this is a problem? what does the application do to cause one part to go wrong_state while that is not desirable?
Comment 9 Olivier Crête 2008-12-08 21:29:03 UTC
Alright, it seems that I can just release the pad and it will ignore the wrong-state from there afterwards... So lets forget about this bug..