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 712198 - rtptimes in RTP-Infor header not syncronized
rtptimes in RTP-Infor header not syncronized
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-13 08:34 UTC by Branko Subasic
Modified: 2014-02-25 22:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch for adding interface to get the media start time (5.83 KB, patch)
2013-11-30 01:19 UTC, Sebastian Rasmussen
rejected Details | Review
Proposed patch where stream, session-media and client use the media start time in RTP-Info header (12.53 KB, patch)
2013-11-30 01:21 UTC, Sebastian Rasmussen
none Details | Review
Proposed patch where stream, session-media and client use the media start time in RTP-Info header (12.52 KB, patch)
2013-12-02 23:51 UTC, Sebastian Rasmussen
rejected Details | Review

Description Branko Subasic 2013-11-13 08:34:08 UTC
The RTSP PLAY-response contains an RTP-Info header, which, among other things, contains initial rtp timestamps for each media. These timestamps indicate the "implied start point", and are also used for inter-media synchronization.

To be usable for synchronization they must represent the same point in time. Unfortunately gst-rtsp-server currently for each media takes the timestamp of the first buffer to generate the rtptime value in the RTP-Info header for that media. That means that the rtptime values for the different medias in the RTP-Info header will NOT represent the same point in time, and thus renders them useless for syncronization purpose.
Comment 1 Wim Taymans 2013-11-15 14:13:10 UTC
The idea is to add the running-time of the buffer corresponding to the RTP-time in the caps. That should then make it possible for the server to align the rtp-time to a common running-time
Comment 2 Sebastian Rasmussen 2013-11-30 01:19:21 UTC
Created attachment 263192 [details] [review]
Proposed patch for adding interface to get the media start time
Comment 3 Sebastian Rasmussen 2013-11-30 01:21:58 UTC
Created attachment 263193 [details] [review]
Proposed patch where stream, session-media and client use the media start time in RTP-Info header
Comment 4 Sebastian Rasmussen 2013-11-30 01:23:37 UTC
I should probably add a unit test for these changes. But because there might be changes desired about in what file each implementation is done, please have a look at these ones and get back to me and I'll contribute the tests at the same time.
Comment 5 Sebastian Rasmussen 2013-12-02 23:51:38 UTC
Created attachment 263352 [details] [review]
Proposed patch where stream, session-media and client use the media start time in RTP-Info header

fix leak + run gst-indent
Comment 6 Wim Taymans 2013-12-26 16:16:27 UTC
I was not happy with how it was structured, I commited this instead:


commit 8aaa432d5881f82abff3cf60978e8e739b70ed70
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Thu Dec 26 17:02:50 2013 +0100

    stream: return clock-rate from get_rtpinfo
    
    And use it to correct the rtptime to the requested start-time.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=712198

commit 037e21b578d56057a205bd07422b53f3c1d1e7e8
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Thu Dec 26 16:28:59 2013 +0100

    session-media: calculate start-time

commit cfdc7408b533048515f59b7cd1190c5f1f0b2797
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Thu Dec 26 14:43:35 2013 +0100

    stream: also return the running-time
    
    Return the running-time in the rtpinfo as well.

commit 4ca0b23a3fcf1a3ecb3559bd931e162ab5921cdc
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Thu Dec 26 15:41:14 2013 +0100

    session-media: let the session-media make the RTPInfo
    
    Add method to create the RTPInfo for a stream-transport.
    Add method to create the RTPInfo for all stream-transports in a
    session-media.
    Use the session-media RTPInfo code in client. This allows us to refactor
    another method to link the TCP callbacks.