HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide

RTSP Session APIs
The RTSP session data structure encapsulates all the necessary information about an
RTSP session, such as the session URL, session ID and the state of the session. The
udata member of this structure stores the session data that is specific to the application.
The rtsp.h file contains the definition of the rtsp_session_t data structure.
The following is the definition of rtsp_session_t data structure:
typedef struct rtsp_session
{
char *url;
char *id;
uint16_t idlen;
rtsp_state_t state;
rtsp_conn_t *conn;
void *udata;
} rtsp_session_t;
The url structure member contains the session URL and is initialized with the string
present in the location pointed to by the url argument. If the url argument is NULL,
the url structure member is set to NULL.
The id structure member contains the session ID and is initialized with the string present
in the location pointed by the session_id argument. If the session_id argument is NULL,
the id structure member is set to NULL.
The idlen structure member contains the length of the string present in the location
pointed to by the id structure member.
The state structure member contains the state of the RTSP session. This member is
initialized to RTSP_STATE_INIT. It takes one of the values described in Table 2-2.
Table 2-2 The state Argument Values
DescriptionValue
Session is initialized.
RTSP_STATE_INIT
SETUP or PAUSE message transaction was successfully
completed.
RTSP_STATE_READY
PLAY message transaction was successfully completed.
RTSP_STATE_PLAY
RECORD message transaction was successfully completed.
RTSP_STATE_RECORD
The conn structure member is a pointer to the associated RTSP connection for this RTSP
session. If there is no associated RTSP connection, the conn structure member is NULL.
The udata structure member is a void pointer and is for storing any session-specific
application data. It is initialized to NULL.
There is no association between an RTSP session and an RTSP connection. Hence,
different messages pertaining to a particular RTSP session may transmit multiple RTSP
connections. However, an application may choose to create such an association. For
36 Using MSP APIs