RTSP Public Interface
[RTSP Layer]

Collaboration diagram for RTSP Public Interface:
RTSP controller and management public interface. More...

Defines

#define rtsp_status(ctrl)   ctrl->status

Functions

rtsp_ctrl * rtsp_init (nms_rtsp_hints *)
int rtsp_is_busy (rtsp_ctrl *)
RTSP_Error rtsp_wait (rtsp_ctrl *)
int rtsp_close (rtsp_ctrl *)
int rtsp_open (rtsp_ctrl *, char *)
int rtsp_pause (rtsp_ctrl *)
int rtsp_stop (rtsp_ctrl *)
int rtsp_play (rtsp_ctrl *, double, double)
int rtsp_seek (rtsp_ctrl *, double, double)
int rtsp_uninit (rtsp_ctrl *)
void rtsp_info_print (rtsp_ctrl *)
rtp_thread * rtsp_get_rtp_th (rtsp_ctrl *rtsp_ctl)
rtp_session * rtsp_get_rtp_queue (rtsp_ctrl *rtsp_ctl)

Detailed Description

RTSP controller and management public interface.

The RTSP module requests the media streams and handles the service handshake. Once this phase is complete it behaves like a remote controller for the requested multimedia stream.


Function Documentation

int rtsp_close ( rtsp_ctrl *  rtsp_ctl  ) 

Sends to the rtsp main loop the request to close the connection for the given control structure

Parameters:
rtsp_ctl The control structure for which to close the connection
Returns:
0

Definition at line 200 of file rtsp.c.

rtp_session* rtsp_get_rtp_queue ( rtsp_ctrl *  rtsp_ctl  ) 

Gets the head of the RTP sessions queue linked to the given RTSP controller

Parameters:
rtsp_ctl The RTSP controller for which to get the RTP sessions queue
Returns:
The RTP session queue

Definition at line 259 of file rtsp.c.

Referenced by rtp_session_get_ssrc().

rtp_thread* rtsp_get_rtp_th ( rtsp_ctrl *  rtsp_ctl  ) 

Gets the RTP thread linked to the given RTSP controller

Parameters:
rtsp_ctl The RTSP controller for which to get the RTP thread
Returns:
The RTP thread

Definition at line 269 of file rtsp.c.

void rtsp_info_print ( rtsp_ctrl *  rtsp_ctl  ) 

Prints the informations about the given RTSP controller: Session informations, medium informations.

Parameters:
rtsp_ctl The controller for which to print the informations

Definition at line 279 of file rtsp.c.

References sdp_medium_info_s::attr_list, sdp_session_info::attr_list, rtsp_medium_s::filename, rtsp_session_s::info, rtsp_session_s::media_queue, rtsp_medium_s::medium_info, sdp_attr_s::name, rtsp_session_s::next, rtsp_medium_s::next, sdp_attr_s::next, rtsp_session_s::pathname, and sdp_attr_s::value.

rtsp_ctrl* rtsp_init ( nms_rtsp_hints *  hints  ) 

Initialized the library and starts a thread that handles both commands to send to the server and responses received from the server.

The ports to use for the new connection. This are just hints.

Returns:
A rtsp_ctrl instance. This is the structures that control the newly created communication channel

Definition at line 52 of file rtsp.c.

References rtsp_thread::cond_busy, rtsp_thread::default_rtp_proto, rtsp_thread::force_rtp_port, rtsp_thread::hints, init_state(), playing_state(), ready_state(), recording_state(), rtp_init(), rtsp_thread::rtp_th, rtsp(), RTSP_MIN_RTP_PORT, and rtsp_thread::transport.

Here is the call graph for this function:

int rtsp_is_busy ( rtsp_ctrl *  rtsp_ctl  ) 

Checks if the given controller is waiting to process a given command

Parameters:
rtsp_ctl The controller for which to check the state
Returns:
TRUE if its busy, FALSE if its ready

Definition at line 344 of file rtsp.c.

int rtsp_open ( rtsp_ctrl *  rtsp_ctl,
char *  urlname 
)

Sends to the controller the request to open a given url

Parameters:
rtsp_ctl The controller that should open the url
urlanem The path of the document to open
Returns:
0

Definition at line 503 of file rtsp.c.

Referenced by check_status().

int rtsp_pause ( rtsp_ctrl *  rtsp_ctl  ) 

Sends to the controller the request to pause the current stream

Parameters:
rtsp_ctl The controller for which to pause the content
Returns:
0

Definition at line 552 of file rtsp.c.

int rtsp_play ( rtsp_ctrl *  rtsp_ctl,
double  start,
double  stop 
)

Sends to the controller the request to play the content in a given range

Parameters:
rtsp_ctl The controller that should start playing its content
start from where to start playing
stop where to stop playing
Returns:
0

Definition at line 591 of file rtsp.c.

int rtsp_seek ( rtsp_ctrl *  rtsp_ctl,
double  new_start,
double  new_end 
)

Starts playing the given new range of the stream, stopping the previously played one This is implemented with a PAUSE and PLAY methods call

Parameters:
rtsp_ctl The controller that should start playing in the new range
start from where to start playing
stop where to stop playing
Returns:
0

Definition at line 640 of file rtsp.c.

int rtsp_stop ( rtsp_ctrl *  rtsp_ctl  ) 

Sends to the controller the request to stop

Parameters:
rtsp_ctl The controller that should stop
Returns:
0

Definition at line 671 of file rtsp.c.

int rtsp_uninit ( rtsp_ctrl *  rtsp_ctl  ) 

Uninits the given RTSP controller

Parameters:
rtsp_ctl The controller to shut down
Returns:
0 If Shutdown was done

1 If it wasn't possible to cancel the running main loop

Definition at line 710 of file rtsp.c.

RTSP_Error rtsp_wait ( rtsp_ctrl *  rtsp_ctl  ) 

Waits for the main loop to handle the last given command, this should be called after issuing a command to the rtsp main loop.

Parameters:
rtsp_ctl The control structure for which to wait.
Returns:
The last response received from the server if the server is still alive. RTSP_Ready If the library has just been initialized RTSP_Reinitialized If the library has been reinitialized (connection error, server went down, etc)

Definition at line 235 of file rtsp.c.

References rtsp_thread::cond_busy.


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