[Live-devel] track synchronization with live555

David Betrand bidibulle at operamail.com
Wed Mar 21 08:59:18 PDT 2007


Ross,

> I don't believe there is anything wrong with the current code.  

There is nothing wrong in your code as long as you DON'T handle rtp-info information (except of course the fact your streams are not synchronized until one SR report is received for each track). 
But if you use rtp-info as well (like I do in my app), for sure there will be a problem. This is because when receiving the rtp-info timestamps you don't get the sender wall clock, so you must initialize fSyncTime with YOUR wall clock (gettimeofday). Then, your track are perfectly synchronized. Then as soon as you receive the first SR, you desynchronize your streams because you will use sender's wall clock (by setting fSyncTime variable). Thus you have a jump in your presentation time. 
That's why I talked about a "synchronization time difference". This simply reflects the wall clock difference between the sender and the receiver.

Please, if you disagree, tell me how you would use those timestamps sent in the rtp-info, without breaking something in the current code ?

Personnaly, I see two solutions :
- first one is the easy one : modify the synchronization mechanism so that it uses rtp-info time when it is available, and SR time when no rtp-info is available

- second one is the complex one : modify SR report handling to cope ALSO with rtp-info synchronization. This means keeping the existing code in case there is no rtp-info available, else computing some wall clock time difference between local and sender, and updating synchronization accordingly (which is mainly usefull to compensate for drift for long, uninterrupted presentations, as described in RFC 2326)

So, if you agree that there might be some interest for the library, I can  propose the code for solution 1 or 2 (with a preference for solution 1 for simplicity). Otherwise, I will have to choose solution 1 and keep this patch for my own app (as well as the small modifications needed in some other places to make the rtp-info processing possible). This would mean I will not be able to upgrade liveMedia with the latest official build anymore :-(
  

David


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze



More information about the live-devel mailing list