RTSP state machine

Source: Internet
Author: User

The state machine status of the RTSP protocol is for specific objects. Each object is uniquely identified by the rtsp url and session ID. The OPTIONS, ANNOUNCE, DESCRIBE, GET_PARAMETER, and SET_PARAMETER requests do not affect the status of objects on the client and server. I. Client state machine status definition: Init: SETUP has been sent, waiting for response. ready: you have received the response from the SETUP request or received the PAUSE Request Response in the Playing status. playing: receives the PLAY Request Response Recording: receives the RECORD request response status change: status: Init SETUP Ready TEARDOWN Init Ready PLAY Playing RECORD Recording TEARDOWN Init SETUP Ready Playing PAUSE Ready TEARDOWN Init PLAY Playing SETUP Playing (changed transport) recording PAUSE Ready TEARDOWN Init RECORD Recording SETUP Recording (Changed transport) When a request is sent and receives a 3xx response, the status changes to Init and the 4xx response is received, and the status remains unchanged. Ii. server state machine status definition: Init: initial state, no valid color SETUP Request received Ready: The last SETUP is successfully received, and a response is sent; or after the Playing status, you can successfully receive the PAUSE request and send a response to Playing: the last PLAY request is successfully received, and a response is sent. The data has been Recording: the server is recording the status changes when the media data server receives the customer request. 1. when Playing or Recording is in Unicast mode, if no valid message is received from the customer within the specified interval (1 min by default), such as RTCP report or RTSP command, the server may return to the Init status and close the RTSP session. 2. When the server is in the Ready status, if the server has not received the RTSP request after the 1 minute interval, the server may return to the Init status. 3. When the Range processing specified by the client ends, the server returns from the Playing or Recording status to the Ready status. Status Change: status Init SETUP Ready TEARDOWN Init Ready PLAY Playing SETUP Ready TEARDOWN Init RECORD Recording Playing play pause Ready TEARDOWN Init SETUP Playing Recording RECORD Recording PAUSE Ready TEARDOWN the Init SETUP Recording request generates a 3xx response, the status changes to Init to generate a 4xx response, and the status remains unchanged.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.