<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for the detailed Information. <div><br></div><div>I am using live RTP source as stream source to a subclass of OnDemandServerMediaSubsession. </div><div>In this case RTP when source stops sending data , the application gets a message upon which i want to close the session. </div><div><br><div><div><br></div><div>On Mar 16, 2012, at 1:53 AM, Ross Finlayson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>How to invoke a RTCP BYE message to the client from the RTSP Server application (e.g testOnDemandRTSPServer) ?<br></div></blockquote><div><br></div></div>This will happen automatically when the stream ends - i.e., when the server reaches the end of the file that's being streamed. There is nothing that you need to do to get this; the server will send this automatically.<div><br></div><div>There are exceptions to this, however. If the file being streamed has a known 'range' - as reported in the SDP description that the server sends in response to the RTSP "DESCRIBE" - then the server will not send a RTCP "BYE" when it reaches the end of the file. The reason for this is that files with a known range are typically also 'seekable'. By not sending a RTCP "BYE" when the server reaches the end of this kind of file, the stream will be kept alive, which allows the client - if desired - to seek backwards in the stream, to replay part or all of it.</div><div><br></div><div>In our current implementation, the following file types are 'seekable', have a known 'range', and thus our server will *not* send a RTCP "BYE" when it reaches the end of a file:</div><div>- DV video files</div><div>- MP3 audio files</div><div>- MPEG Transport Stream files (with corresponding 'index' files)</div><div>- WAV audio files</div><div><br></div><div>A client that is receiving this kind of file therefore can't expect to receive a RTCP "BYE" to signal 'end of stream'. Instead, it should call "MediaSession::playEndTime()" (and "MediaSession::playStartTime()") to figure out the duration of the stream, and set a timer for this duration. (See, for example, the code for "testRTSPClient".)</div><div><br></div><div>Other kinds of files - e.g., AC-3, AAC, AMR, H.264, MPEG-4 - do not have a known 'range', are not 'seekable', and thus - for such files - the server *will* send a RTCP "BYE" when it reaches the end of the file.</div><br><br><div apple-content-edited="true">
Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a>
</div>
<br></div>_______________________________________________<br>live-devel mailing list<br><a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>http://lists.live555.com/mailman/listinfo/live-devel<br></blockquote></div><br></div></body></html>