Hi Ross,

> *The way to do this is to look for, and handle, a RTCP “BYE” packet that
> the server should send when it ends the stream.  And the way to do that is
> to call “setByeHandler()” or “setByeWithReasonHandler()” on the
> “RTCPInstance” object.*
>
I had installed ByeHandler in RTSP client long time ago but I have never
seen it called back.
You have just reminded me, I check RTCP BYE message at RTSPServer and see
that there are two
possible places which sendBYE() can be invoked when the server closes a
client session/connection but no place
gets effect.

The first place:
void StreamState::endPlaying() {
    // sendBYE() is commented by you.
}

The second place:
RTCPInstance::~RTCPInstance() {
   ...
   sendBYE();

  // Calling sendBYE() at this place is too late because all sockets are
closed.
  // therefore, "BYE" message is never sent to clients.
}


>
> * No, you’re ‘barking up the wrong tree’ here.  All that is doing is
> detecting when the RTSP TCP connection has ended.  And that can happen at
> any time during the stream - not necessarily when the stream ends.  (It is
> perfectly legal for a RTSP server to close the RTSP TCP connection at any
> time - even while the RTP stream is ongoing.  Should that happen, our
> “RTSPClient” code would recover from this automatically; it is of no
> concern to application code.)*
>

Yes, that is exact what I want to handle. In many times video stream in my
app is stopped, I want to show GUI that the network is
disconnected.
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to