RTSP State Machine
[RTSP Layer]

Collaboration diagram for RTSP State Machine:

Functions

void rtsp_unbusy (rtsp_thread *)
int rtsp_reinit (rtsp_thread *)
void rtsp_clean (void *)
void * rtsp (void *)
int init_state (rtsp_thread *, short)
int ready_state (rtsp_thread *, short)
int playing_state (rtsp_thread *, short)
int recording_state (rtsp_thread *, short)

Variables

int(* state_machine [STATES_NUM])(rtsp_thread *, short)

Detailed Description

RTSP State Machine, dispatches incoming events to the corrent handler.

Function Documentation

int init_state ( rtsp_thread rtsp_th,
short  event 
)

Handles RTSP events when the controller is in INIT state

Parameters:
rtsp_th The controller for which to handle the events
event The event generated by handle_rtsp_pkt
Returns:
0 if everything is ok, 1 on error

Definition at line 299 of file rtsp_state_machine.c.

References rtcp_thread_create(), rtsp_thread::rtp_th, and rtp_thread_create().

Referenced by rtsp_init().

Here is the call graph for this function:

int playing_state ( rtsp_thread rtsp_th,
short  event 
)

Handles RTSP events when the controller is in PLAYING state

Parameters:
rtsp_th The controller for which to handle the events
event The event generated by handle_rtsp_pkt
Returns:
0 if everything is ok, 1 on error

Definition at line 427 of file rtsp_state_machine.c.

References rtsp_reinit().

Referenced by rtsp_init().

Here is the call graph for this function:

int ready_state ( rtsp_thread rtsp_th,
short  event 
)

Handles RTSP events when the controller is in READY state

Parameters:
rtsp_th The controller for which to handle the events
event The event generated by handle_rtsp_pkt
Returns:
0 if everything is ok, 1 on error

Definition at line 367 of file rtsp_state_machine.c.

References rtsp_reinit().

Referenced by rtsp_init().

Here is the call graph for this function:

int recording_state ( rtsp_thread rtsp_th,
short  event 
)

Handles RTSP events when the controller is in RECORDING state. Every event in this state will do nothing, because recording is not implemented

Parameters:
rtsp_th The controller for which to handle the events
event The event generated by handle_rtsp_pkt
Returns:
Always 0, because recording is not implemented

Definition at line 489 of file rtsp_state_machine.c.

Referenced by rtsp_init().

void* rtsp ( void *  rtsp_thrd  ) 

RTSP packets handling main loop Each rtsp controller forks a thread running this loop to handle incoming answers If there are packets pending on the incoming transports it will call handle_rtsp_pkt

Parameters:
rtsp_thrd The rtsp thread/controller for which to run the loop

Definition at line 199 of file rtsp_state_machine.c.

References handle_rtsp_pkt(), rtsp_thread::in_buffer, rtsp_thread::interleaved, rtsp_reinit(), rtsp_buffer::size, and rtsp_thread::transport.

Referenced by rtsp_init().

Here is the call graph for this function:

int rtsp_reinit ( rtsp_thread  ) 

< free sdp description info

Definition at line 113 of file rtsp_state_machine.c.

References rtsp_session_s::body, rtsp_session_s::content_base, rtsp_session_s::info, rtsp_session_s::media_queue, rtsp_session_s::next, rtsp_medium_s::next, rtsp_medium_s::rtp_sess, and rtsp_thread::rtp_th.

Referenced by playing_state(), ready_state(), and rtsp().


Generated on Tue Feb 3 03:10:03 2009 for libnemesi by  doxygen 1.5.4