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 780904 - rtprtxqueue: implement handling of the max-size-time property
rtprtxqueue: implement handling of the max-size-time property
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.11.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-04 14:36 UTC by George Kiagiadakis
Modified: 2017-04-11 07:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtprtxqueue: implement handling of the max-size-time property (3.92 KB, patch)
2017-04-04 14:36 UTC, George Kiagiadakis
none Details | Review
rtprtxqueue: implement handling of the max-size-time property (3.75 KB, patch)
2017-04-07 13:37 UTC, George Kiagiadakis
none Details | Review
tests/check/rtprtx: add checks for rtprtxqueue's max-size-{time,packets} properties (3.62 KB, patch)
2017-04-07 13:38 UTC, George Kiagiadakis
accepted-commit_now Details | Review
rtprtxqueue: implement handling of the max-size-time property (4.44 KB, patch)
2017-04-10 14:37 UTC, George Kiagiadakis
accepted-commit_now Details | Review

Description George Kiagiadakis 2017-04-04 14:36:14 UTC
Created attachment 349241 [details] [review]
rtprtxqueue: implement handling of the max-size-time property

The max-size-time property in rtprtxqueue is not doing anything. This patch implements it like in rtprtxsend.
Comment 1 Olivier Crête 2017-04-05 19:12:18 UTC
Review of attachment 349241 [details] [review]:

This patch is wrong, the GST_BUFFER_TIMESTAMP() is in nanoseconds, not in the RTP clock. And you can't just use the timestamps, you must convert them to the running time using the segment. Look at how the queue, aggregator or multiqueue are doing it.

::: gst/rtpmanager/gstrtprtxqueue.c
@@ +349,3 @@
+
+  /* it needs to work if ts wraps */
+  if (high_ts >= low_ts) {

GStreamer timestamps are 64-bit, they don't wrap-around !
Comment 2 George Kiagiadakis 2017-04-06 08:27:37 UTC
Indeed, classic case of copy-paste gone wrong. I wonder if it is better to use the buffer timestamps or the RTP clock, like rtprtxsend does, though.
Comment 3 Olivier Crête 2017-04-06 20:32:02 UTC
Using the gst timestamps is probably easier, you dont need to worry about about wrap-arounds, etc.
Comment 4 George Kiagiadakis 2017-04-07 13:37:09 UTC
Created attachment 349477 [details] [review]
rtprtxqueue: implement handling of the max-size-time property
Comment 5 George Kiagiadakis 2017-04-07 13:38:00 UTC
Created attachment 349478 [details] [review]
tests/check/rtprtx: add checks for rtprtxqueue's max-size-{time,packets} properties
Comment 6 Olivier Crête 2017-04-07 14:59:42 UTC
Review of attachment 349477 [details] [review]:

You need to queue the segment events... and to read them at the entrance and and the exit of the queue (and then have two member GstSegment in the object struct). The buffers could be on different segments!
Comment 7 George Kiagiadakis 2017-04-10 14:37:22 UTC
Created attachment 349612 [details] [review]
rtprtxqueue: implement handling of the max-size-time property
Comment 8 Olivier Crête 2017-04-10 20:11:31 UTC
Review of attachment 349612 [details] [review]:

Looks good!
Comment 9 Olivier Crête 2017-04-10 20:13:45 UTC
Review of attachment 349478 [details] [review]:

Looks good too
Comment 10 George Kiagiadakis 2017-04-11 06:58:09 UTC
commit 21f532f1c66f27e1d097cab12a48b2763e0d93ac
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Fri Apr 7 16:33:18 2017 +0300

    tests/check/rtprtx: add checks for rtprtxqueue's max-size-{time,packets} properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780867

commit 7f6c7839301b7a13aae79b260deb4e619248d270
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Tue Apr 4 17:33:31 2017 +0300

    rtprtxqueue: implement handling of the max-size-time property
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780867
Comment 11 George Kiagiadakis 2017-04-11 07:00:10 UTC
oh damn, I pasted the wrong bug link on the commits...