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

/* 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;
/* Retrieve RTP-Info Header information from the message */
err = rtsp_get_msg_hdr(rspmsg, RTSP_RTP_INFO_HDR,
&rtpinfo, NULL);
if( err!=RTSP_SUCCESS )
{
rtsp_free_msg(rspmsg);
return err;
}
printf( nServer RTP Info : n);
/*
* The RTP-Info header can have multiple rtp-info-spec
* entries. The multiple rtp-info-spec entries are linked
* together through the next structure member
*/
for(prtpinfo=rtpinfo; prtpinfo!=NULL;
prtpinfo=prtpinfo->next)
{
printf( t);
/* If url member is NULL, then URL was not
* specified in the rtp-info-spec entry in the header
*/
if(prtpinfo->url)
printf(URL=%s, , prtpinfo->url);
/* If seq member is -1, then sequence number was not
* specified in the rtp-info-spec entry in the header
*/
if(prtpinfo->seq!=-1)
printf(seq=%d, , prtpinfo->seq);
/* If rtptime member is -1, then RTP Timestamp was not
* specified in the rtp-info-spec entry in the header
*/
if(prtpinfo->rtptime!=-1)
printf(rtptime=%lld, prtpinfo->rtptime);
98 Sample Programs