Expand description
RTSP session state machine — RFC 2326 Appendix A.
Implements the client (§A.1) and server (§A.2) transition tables exactly as
transcribed in docs/state-machines.md. State
is tracked per session object (stream URL + session id); this module models
a single object’s state.
The state-neutral methods OPTIONS, DESCRIBE, ANNOUNCE, GET_PARAMETER,
and SET_PARAMETER are permitted in every state and never change it
(RFC 2326 Appendix A intro). The state-affecting methods are SETUP,
PLAY, PAUSE, TEARDOWN, RECORD, and REDIRECT.
Enums§
- Session
State - The lifecycle state of an RTSP session object (RFC 2326 §A.1 / §A.2).
Functions§
- client_
next_ state - Computes the next state for the client after receiving a
2xxsuccess response tomethodsent incurrentstate, per the RFC 2326 §A.1 client state table. - is_
state_ neutral - Returns
truefor the methods that do not affect session state and are therefore permitted in every state (RFC 2326 Appendix A intro). - server_
next_ state - Computes the next state for the server after sending a
2xxsuccess response to a receivedmethodincurrentstate, per the RFC 2326 §A.2 server state table.