HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide
printf(“ n”);
}
/* Free the resources allocated to the entire linked
* list of rtsp_rtpinfo_t structures
*/
rtsp_free_rtpinfo(rtpinfo);
/* Free the resources allocated for the Response Message */
rtsp_free_msg(rspmsg);
return RTSP_SUCCESS;
}
/*
* process_pause :
* Creates and sends a PAUSE Request message to the
* server. Receives and process the response message.
*/
rtsp_error_t
process_pause(rtsp_conn_t *rtspconn, char *mediaurl)
{
rtsp_msg_t *reqmsg = NULL;
rtsp_msg_t *rspmsg = NULL;
rtsp_error_t err;
int statuscode;
/* Create a PAUSE RTSP Request Message */
err = rtsp_init_request_msg(RTSP_PAUSE, mediaurl, &reqmsg);
if( err!=RTSP_SUCCESS )
return err;
/* Send the Request Message */
err = rtsp_send_msg(rtspconn, NULL, reqmsg, 0);
/* Free the resources allocated for the request message */
rtsp_free_msg(reqmsg);
/* Check for rtsp_send_msg errors */
if( err<0 )
return err;
/* Receive the response for the request Message. We pass
* NULL for channel and size argument since we are sure we
* would be receiving only a RTSP Message and not an
* interleaved media stream.
*/
err = rtsp_recv(rtspconn, &rspmsg, NULL, NULL);
if( err<0 )
return err;
RTSP Sample Program 99