GNOME Bugzilla – Bug 712198
rtptimes in RTP-Infor header not syncronized
Last modified: 2014-02-25 22:28:04 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.
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
Created attachment 263192 [details] [review] Proposed patch for adding interface to get the media start time
Created attachment 263193 [details] [review] Proposed patch where stream, session-media and client use the media start time in RTP-Info header
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.
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
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.