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 765734 - fakesink: Property to not drop out-of-segment buffers
fakesink: Property to not drop out-of-segment buffers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-28 16:36 UTC by Jan Schmidt
Modified: 2017-04-04 15:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fakesink: Add property to not drop out-of-segment buffers (7.80 KB, patch)
2016-04-28 16:40 UTC, Jan Schmidt
none Details | Review

Description Jan Schmidt 2016-04-28 16:36:47 UTC
When debugging problematic streams, I really just want to see the flow of buffers and I often use fakesink silent=false. When it silently discards out-of-segment buffers, that makes it hard to know what's really going on.
Comment 1 Jan Schmidt 2016-04-28 16:40:28 UTC
Created attachment 326957 [details] [review]
fakesink: Add property to not drop out-of-segment buffers

Implement handling in basesink to not unconditionally discard
out-of-segment buffers and expose it as a new property on fakesink
(not unconditionally in all basesink based sinks).

The property defaults to FALSE.
Comment 2 Nicolas Dufresne (ndufresne) 2016-04-28 18:44:36 UTC
Review of attachment 326957 [details] [review]:

For anything other then fakesink, it's likely that we'll need to be able to control which side of the "out of segment" should be dropped.
Comment 3 Jan Schmidt 2016-09-09 13:37:55 UTC
(In reply to Nicolas Dufresne (stormer) from comment #2)
> Review of attachment 326957 [details] [review] [review]:
> 
> For anything other then fakesink, it's likely that we'll need to be able to
> control which side of the "out of segment" should be dropped.

Do you remember what you meant by that? I didn't understand at the time what use case you were thinking of, and forgot to ask :)
Comment 4 Nicolas Dufresne (ndufresne) 2016-09-09 14:17:43 UTC
Not completely sure either. I believe this was about code the drops buffer in sink that are completely out of segment (running-time + duration > segment.start).

If I remember anything, the code does not make any difference if the data is before or after the segment. That problematic one is when we drop data before the segment. Though, thinking of it, there should already be code that generate an EOS if there is a buffer that finishes at or after the segment. It would need to be checked.

About this bug, your proposition looks fine to me. I don't have any generic solution in mind. I personally have stopped using this method though due to the numerous race and wrong results being displayed (multiple fakesink case).
Comment 5 Jan Schmidt 2016-11-02 00:23:03 UTC
Pushed. We can still modify the property until 1.11.1
Comment 6 Tim-Philipp Müller 2017-04-02 09:34:43 UTC
Just one note:

commit 812d4976f08de77a03b9a68ad7f44c191e2d4bc4
Author: Jan Schmidt <jan@centricular.com>
Date:   Fri Apr 29 02:38:49 2016 +1000

    fakesink: Add property to not drop out-of-segment buffers
    
    Implement handling in basesink to not unconditionally discard
    out-of-segment buffers and expose it as a new property on fakesink
    (not unconditionally in all basesink based sinks).
    
    The property defaults to FALSE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765734


The property actually defaults to TRUE for fakesink - is that intentional?
Comment 7 Jan Schmidt 2017-04-04 15:03:22 UTC
The commit message is wrong - the code is correct. drop-out-of-segment is TRUE by default, which preserves the previous behaviour.