[Live-devel] live555 media server and multiple RTSP joins

Brody, Ben Ben.Brody at wsp.com
Fri Jul 8 07:26:39 PDT 2022


Hi,

We are experiencing an issue with a product on the project that I'm working on. It is an analogue video encoder that uses the live555 media server. When we make multiple RTSP joins to the device, each new RTSP join causes the video sessions already in progress to glitch.

I noticed one of the updates to live555 from 2016 that we think could be related:

2016.01.20:
- When a server calls "startStream()" to start a RTSP stream for a client, we now no longer
  make a slight adjustment to the RTP timestamp sequence (using the "presetNextTimestamp()" call)
  if there is already another ongoing stream using the same "RTPSink".  The effect of this is
  only minor, but it ensures that the addition of an addition 'destination' to an ongoing RTSP/RTP
  stream does not cause any change to the contents of the RTP/RTCP packets.
  (Thanks to Erik Montnemery for noting this issue.)

I believe that this update was implemented by making sure that the timestamp is only adjusted if "hasMultipleDestinations" is false.

>From RTPSink.cpp:

  if (!groupsockBeingUsed().hasMultipleDestinations()) {
    // Don't adjust the timestamp stream if we already have another destination ongoing
    fTimestampBase = tsNow;
    fNextTimestampHasBeenPreset = True;
  }

>From Groupsock.hh:

Boolean hasMultipleDestinations() const { return fDests != NULL && fDests->fNext != NULL; }

What I'm trying to figure out is whether hasMultipleDestinations will be true after the first RTSP join to the server. Clearly at that point fDests will not be NULL. However, I'm suspecting that fDests->fNext might be NULL until a second RTSP client joins the stream. Looking at the Groupsock OutputSocket constructor that seems to initialise fDests with a new destRecord that has the next parameter set to NULL. I think that fDests->fNext is only non-NULL after a new destination is added using addDestination.

Does the first RTSP join both construct a destination and add a destination?

If not, why does hasMultipleDestinations include "&& fDests->fNext != NULL"?

Thank you in advance and sorry for dredging up such an old change.

Regards, Ben.




[Logo WSP]<https://www.wsp.com/en-GB/>


Ben Brody MEng CEng MIET MINCOSE
Associate Director





T +44 (0)161 602 8438
M +44 (0)7917 266785






WSP in the UK, No 8 First Street, Manchester, M15 4RP





wsp.com<https://www.wsp.com/en-GB/>

Confidential
This message, including any document or file attached, is intended only for the addressee and may contain privileged and/or confidential information. Any other person is strictly prohibited from reading, using, disclosing or copying this message. If you have received this message in error, please notify the sender and delete the message. Thank you. WSP UK Limited, a limited company registered in England & Wales with registered number 01383511. Registered office: WSP House, 70 Chancery Lane, London, WC2A 1AF.



________________________________


NOTICE: This communication and any attachments ("this message") may contain information which is privileged, confidential, proprietary or otherwise subject to restricted disclosure under applicable law. This message is for the sole use of the intended recipient(s). Any unauthorized use, disclosure, viewing, copying, alteration, dissemination or distribution of, or reliance on, this message is strictly prohibited. If you have received this message in error, or you are not an authorized or intended recipient, please notify the sender immediately by replying to this message, delete this message and all copies from your e-mail system and destroy any printed copies.



-LAEmHhHzdJzBlTWfa4Hgs7pbKl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20220708/92d55c2d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 899 bytes
Desc: image001.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20220708/92d55c2d/attachment-0001.png>


More information about the live-devel mailing list