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

rtcp_parse_pkt
The rtcp_parse_pkt API uses rtcp_pkt_t, the RTCP packet data structure
that begins with the common header, as follows:
typedef struct rtcp_pkt {
rtcp_common_t *common;
union {
struct rtcp_sr *sr;
struct rtcp_rr *rr;
struct rtcp_sdes *sdes;
struct rtcp_app *app;
struct rtcp_bye *bye;
}rtcp_unit;
};
typedef struct rtcp_pkt rtcp_pkt_t;
The declaration of rtcp_parse_pkt is as follows:
int rtcp_parse_pkt(rtcp_pkt_t **pkt, char *buf, int buflen);
where buf contains the RTCP packet that was received using rtcp_recv, buflen
contains the length of buf in bytes, and pkt is an array of type rtcp_pkt_t
dynamically allocated by the rtcp_parse_pkt.
Upon success, rtcp_parse_pkt returns the number of elements in pkt; upon
failure, it returns a negative number to indicate errors. You can free the memory
allocated to pkt by calling rtcp_free_pkt.
rtcp_free_pkt
You can use rtcp_free_pkt to free the memory allocated by rtcp_parse_pkt.
The declaration of rtcp_free_pkt is as follows:
# include <rtp.h>
int rtcp_free_pkt(rtcp_pkt_t *pkt);
where pkt is a pointer to the rtcp_pkt_t structure.
RTP Call Order Sequence
Figure 2-1 illustrates the RTP call order sequence.
26 Using MSP APIs