[Live-devel] two questions about liveMedia source code
Ross Finlayson
finlayson at live555.com
Thu Apr 10 06:44:24 PDT 2008
>I'm reading liveMedia source code(version 2008.4.3), and have two
>questions about it
>
>(1) in RTSPClient::setupMediaSubsession (RTSPClient.cpp, line 956):
>subsession.connectionEndpointName() = serverAddressStr;
>where the serverAddressStr comes from the transport section of SDP
>response of Server.
>
>But in the same function(line 983),
>"subsession.setDestinations(fServerAddress)" set the destination
>address of the client subsession to fServerAddress
>
>I searched fServerAddress and found that it is set in
>RTSPClient::openConnectionFromURL( line 1792). fServerAddress comes
>from the RTSP URL.
>
>So why not set the mediaSubSession destination address to the
>address of SETUP response?
>
>If the RTSP URL is more appropriate, then is line 956 redundant?
Actually, line 983 was incorrect. It should be
subsession.setDestinations(subsession.connectionEndpointAddress());
(to match what the preceding comment says :-)
Thanks for noticing this. It has now been fixed in the latest
software release (2008.04.09).
> (2) In rtcp_from_spec.c, line 286, the OnReceive function,
>
>if (TypeOfEvent(e) == EVENT_BYE) {
> *members += 1;
>}
>
>I read RFC3550 A.7, it has the same code above.
>
>Why not should it be:
>
>if (TypeOfEvent(e) == EVENT_BYE) {
> *members -= 1;
>}
I was unsure about this, so I asked people on the "avt at ietf.org"
mailing list (the mailing list for the group that standardizes
RTP/RTCP). This was their response (which, I admit, I don't fully
understand :-)
"Because there is a special rule for when a end-point is leaving a
session, i.e. waiting to send BYE. Which the comment in the code
indicates. In that face one retargets the members counter to count
number of BYE messages received to make the correct back off to avoid
floods of RTCP BYE."
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list