[Live-devel] How to safely close the openRtsp?

Johnnie Au-Yeung lanlamer at gmail.com
Fri Dec 16 19:13:51 PST 2011


Hi,ALL:
        The openRtsp has designed to be close  rudely by the CTRL+C or
console windows's close button. But while developing GUI streaming client
that based on the openRtsp,we may have to safely close the openRtsp and do
some related works. Can you please give me some sugguestion that what I
should do or not.
        In my opinion, if the client want to close on it's own
initiavte,the followming may be necessary:
        1)  write the leaving received video data to file.
        2)  send TEARDOWN to server to notify that the client is going to
close.
        3)  release related resources such as allocated memory  and objects.
        4)  set watchVariable to NULL or 0 to exit the doEventLoop.

        if the server was fininished to streaming, an BYE command may send
to the client,and we can be notified by the onSourceClosure that set by
getNextFrame on the contiunePlaying in the MediaSink and do the following:
        1) write the file format tail to the storage file.
        2) notify the GUI that the server asked the openRtsp to close.

        Any sugguestion may be pleasure and helpful! Thanks very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111217/35d91166/attachment-0001.html>


More information about the live-devel mailing list