[Live-devel] Live555 RTSP Client never sees RTCP BYE message from Live555 Server

Matt Schuckmann matt at schuckmannacres.com
Tue Mar 10 15:02:38 PDT 2009


Ok, I added a call to RTCPInstance::sendBYE() at the very start of the 
StreamState::endPlaying and that seems to get get the BYE sent to the 
client. Although I'm not sure what this would do in a multiple client 
scenario, I think everybody would get the BYE message which may not be 
right, might want to add a way to send the BYE to just the destinations 
that are being removed, what do you think. This also means that in some 
cases 2 BYE messages for each stream could be sent which may or may not 
be a problem.

Matt S.

PS. You also should note that the BYE handler code in OpenRTSP causes 
all the streams to be deleted and the RTCPInstance objects with them, 
the problem is the RTCPInstance object is in the process of handling a 
packet. It's not a problem for OpenRTSP since the BYE handler never 
actually exits in this case (i.e. exit(0) is called in shutdown() which 
is called from sessionAfterPlaying()) but anybody using this code as an 
example for an application that persists after the session has ended 
could be in heap (pun intended) of trouble.

I'm considering solving this in my case by scheduling a shutdown task 
after the last BYE message is received.


Matt Schuckmann wrote:
> Ok, I'm feeling better now and I've determined that the server is 
> attempting to send the RTCP BYE packet in the RTCPInstance destructor 
> but by that time all the destinations have been removed from the 
> GroupSocket so no data is actually sent (I've confirmed this with 
> WireShark).
>
> I had thought that the client could use the receipt of the BYE packet, 
> for each stream, from the server as a signal that the session had been 
> closed (either the video ended or the server had force-ably closed the 
> session (my UI supports this) and the client could clean up and notify 
> the user appropriately.
> Now I'm not so sure anymore.
>
> I did find a reference on the forums that the server will send the BYE 
> packet if the source supports seeking. Why can't it send the BYE 
> packet when the session is ending too? Seems like it would be the 
> right thing to do.
>
> The shutdown code for the streams is very confusing and I'm not sure 
> how to proceed to get things working the way I'd like, can you make 
> any suggestions?
>
> Thanks,
> Matt S.
>
>
> Matt Schuckmann wrote:
>> I've been trying to determine why my Live555 based RTSP client is 
>> never seeing the RTCP BYE messages from the LIVE555 server object 
>> (i.e. my bye handler is never getting called).
>>
>> In reading the code it looks like the server RTCP code aways combines 
>> the BYE packet with the SR packet and it looks like the RTCP packet 
>> handler code on the client sees the SR packet reads the SR stuff then 
>> reads the stuff that is the same as the RR stuff then ignores 
>> anything else that might be in the packet.  Do I have this correct? 
>> or am I missing something. Note pretty much the same appears to be 
>> true for the server receiving the BYE messages from the client.
>>
>> I'm having a difficult time debugging this (probably because I'm 
>> starting to feel sick, darn kids keep bring these germs home) so any 
>> help or hints as to what might be going on would be helpful.
>>
>> Thanks
>> Matt S.
>> _______________________________________________
>> live-devel mailing list
>> live-devel at lists.live555.com
>> http://lists.live555.com/mailman/listinfo/live-devel
>>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>


More information about the live-devel mailing list