HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide
*/
err = rtsp_recv(rtspconn, &rspmsg, NULL, NULL);
if( err<0 )
return err;
/* Get the status code of the Response Message */
statuscode = rtsp_get_msg_response_line(rspmsg, NULL,
NULL);
if( statuscode!=200 )
{
rtsp_free_msg(rspmsg);
return err;
}
/* Free the resources allocated for the Response Message */
rtsp_free_msg(rspmsg);
printf(“ nTEARDOWN Succeeded n”);
return RTSP_SUCCESS;
}
main(int argc, char *argv[])
{
/*
* mediaurl points to the url passed as a
* command-line argument to the program
*/
char *mediaurl;
/* msgcode identifies the RTSP Method chosen by the user */
int msgcode;
/* rtspconn represents the RTSP Connection to the peer */
rtsp_conn_t *rtspconn=NULL;
/* mapsession represents the mapped session for the
* RTSP connection
*/
rtsp_session_t *mapsession=NULL;
/* err will hold the error numbers returned by RTSP APIs */
rtsp_error_t err;
/*
* crtpport and crtcpport will hold the client
* RTP and RTCP ports for SETUP Request
*/
int crtpport, crtcpport;
/* setupurl holds the URL to be used in SETUP Request */
char setupurl[256];
RTSP Sample Program 101