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 766422 - videoaggregator: rtspsrc ! compositor produces no output
videoaggregator: rtspsrc ! compositor produces no output
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 766420 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-05-14 10:00 UTC by Olivier Crête
Modified: 2016-05-20 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videoaggregator: Don't wait if input buffer is after output (1.15 KB, patch)
2016-05-14 10:01 UTC, Olivier Crête
none Details | Review
videoaggregator: Don't wait if input buffer is after output (1.30 KB, patch)
2016-05-14 10:53 UTC, Olivier Crête
reviewed Details | Review

Description Olivier Crête 2016-05-14 10:00:41 UTC
It seems that videoaggregator doesn't work if the source if rtspsrc. This seems that it is because the buffers has no duration is the first timestamp isn't running time 0. in particular the running time of the first input buffer is beyond the end time of the first output buffer.

Test pipeline:
gst-launch-1.0  uridecodebin uri=rtspt://streaming1.osu.edu/media2/ufsap/ufsap.mov ! compositor ! xvimagesink

Relevant debug line:
0:00:05.902285075 28417      0x1e0c370 DEBUG        videoaggregator gstvideoaggregator.c:1149:gst_videoaggregator_fill_queues:<compositor0:sink_0> buffer duration is -1, start_time >= output_end_running_time. No previous buffer, need more data


Patch upcoming.
Comment 1 Olivier Crête 2016-05-14 10:01:06 UTC
*** Bug 766420 has been marked as a duplicate of this bug. ***
Comment 2 Olivier Crête 2016-05-14 10:01:57 UTC
Created attachment 327862 [details] [review]
videoaggregator: Don't wait if input buffer is after output

If the input buffer is after the end of the output buffer, then waiting
for more data won't help. We will never get an input buffer for this point.

This fixes compositing of streams from rtspsrc.
Comment 3 Nicolas Dufresne (ndufresne) 2016-05-14 10:10:05 UTC
Review of attachment 327862 [details] [review]:

::: gst-libs/gst/video/gstvideoaggregator.c
@@ +1148,2 @@
             GST_DEBUG_OBJECT (pad, "buffer duration is -1, start_time >= "
                 "output_end_running_time. No previous buffer, need more data");

Perhaps update the trace too ?
Comment 4 Olivier Crête 2016-05-14 10:53:40 UTC
Created attachment 327867 [details] [review]
videoaggregator: Don't wait if input buffer is after output

If the input buffer is after the end of the output buffer, then waiting
for more data won't help. We will never get an input buffer for this point.

This fixes compositing of streams from rtspsrc.
Comment 5 Sebastian Dröge (slomo) 2016-05-15 07:38:05 UTC
Review of attachment 327867 [details] [review]:

Do we have the same problem in audioaggregator, did you check?

::: gst-libs/gst/video/gstvideoaggregator.c
@@ -1148,3 @@
             GST_DEBUG_OBJECT (pad, "buffer duration is -1, start_time >= "
-                "output_end_running_time. No previous buffer, need more data");
-            need_more_data = TRUE;

The problem here is that now you might aggregate for the current output time without having a buffer for this pad. While the buffer for the current time of this pad might just arrive immediately afterwards and we just didn't get it yet because the late buffer was on the pad first.

Maybe this should only happen on timeout?
Comment 6 Olivier Crête 2016-05-19 19:41:56 UTC
Audioaggregator is fine

This is the case "if (start_time >= output_end_running_time)", so I understand that means that buffer on this pad is entirely after the "end time" of the output buffer, not before, so you won't get an _older_ buffer than the one that is currently on your pad.
Comment 7 Sebastian Dröge (slomo) 2016-05-20 06:33:17 UTC
Ah so that's when the buffer is after the current time... and we were waiting for more data then instead of just outputting to get closer the that buffer. Go ahead then :)
Comment 8 Olivier Crête 2016-05-20 15:09:51 UTC
Merged into master:

commit e357e372e17fa5870be8e58a4bd52b512317c693
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Sat May 14 11:56:59 2016 +0200

    videoaggregator: Don't wait if input buffer is after output
    
    If the input buffer is after the end of the output buffer, then waiting
    for more data won't help. We will never get an input buffer for this point.
    
    This fixes compositing of streams from rtspsrc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766422


and 1.8:

commit 7ed830268078f8e0abfac228755d7965bfb01e7b
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Sat May 14 11:56:59 2016 +0200

    videoaggregator: Don't wait if input buffer is after output
    
    If the input buffer is after the end of the output buffer, then waiting
    for more data won't help. We will never get an input buffer for this point.
    
    This fixes compositing of streams from rtspsrc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766422