HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide
* rtspconn => The RTSP Connection over which messages
* are sent and received.
*
*/
/*
* process_describe :
* Creates and sends a DESCRIBE Request message to the
* server. Receives and processes the response message.
*/
rtsp_error_t
process_describe(rtsp_conn_t *rtspconn, char *mediaurl)
{
rtsp_msg_t *reqmsg = NULL;
rtsp_msg_t *rspmsg = NULL;
rtsp_error_t err;
char accepttype[] = “application/sdp”;
uint8_t *sdpbuf;
uint16_t sdpbuflen;
/* Create a DESCRIBE RTSP Request Message */
err = rtsp_init_request_msg(RTSP_DESCRIBE, mediaurl,
&reqmsg);
if( err!=RTSP_SUCCESS )
return err;
/* Specify the Accept RTSP Header in the Request Message */
err = rtsp_set_msg_hdr(reqmsg, RTSP_ACCEPT_HDR, accepttype,
strlen(accepttype));
if( err!=RTSP_SUCCESS )
{
rtsp_free_msg(reqmsg);
return err;
}
/* Send the Request Message */
err = rtsp_send_msg(rtspconn, NULL, reqmsg, 0);
rtsp_free_msg(reqmsg);
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;
/* Retrieve the Content-Length Header information */
94 Sample Programs