[Live-devel] Correct use of RTSPClient->sendTeardownCommand

Ross Finlayson finlayson at live555.com
Thu Mar 29 07:23:06 PDT 2012


> I am streaming a file from the server to the client. When the file ends, the SubsessionByeHandler in my client is called, which in turn calls the SubsessionAfterPalying in the client.  What I want to do is send a teardown command back to the server at this point, so that the server knows that the file has reached its end. I had a look at RTSPClient->sendTeardownCommand, but I am not sure how to specify which function to call in the server.

You don't.  "sendTeardownCommand()" merely tells the client to send a RTSP "TEARDOWN" command for the specified session.  It's up to the server to decide what to do when it receives that command.  However, our server implementation will automatically do the right thing (i.e., close the input file) when it receives the command.

In summary:
- Look at the code for "testRTSPClient" to see how "subsessionByeHandler()" ends up calling "shutdownStream()", which in turn, calls "sendTeardownCommand()".
- You don't need to make any modifications or additions to the server code; it already handles "TEARDOWN".


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120329/9d8d86ec/attachment.html>


More information about the live-devel mailing list