#ifdef __HI_CODEC__
#else#define WORDS_BIGENDIAN
#endif
typedef struct rtp_packet_header {
#ifdef WORDS_BIGENDIAN
unsigned short ph_v:2; /* packet type */
unsigned short ph_p:1; /* padding flag */
unsigned short ph_x:1; /* header extension flag */
unsigned short ph_cc:4; /* CSRC count */
unsigned short ph_m:1; /* marker bit */
unsigned short ph_pt:7; /* payload type */
#else
unsigned short ph_cc:4; /* CSRC count */
unsigned short ph_x:1; /* header extension flag */
unsigned short ph_p:1; /* padding flag */
unsigned short ph_v:2; /* packet type */
unsigned short ph_pt:7; /* payload type */
unsigned short ph_m:1; /* marker bit */
#endif
uint16_t ph_seq; /* sequence number */
uint32_t ph_ts; /* timestamp */
uint32_t ph_ssrc; /* synchronization source */
/* The csrc list, header extension and data follow, but can't */
/* be represented in the struct. */
} rtp_packet_header;
小端模式高位在低地址; 大端低地址低位高地址高位
1730

被折叠的 条评论
为什么被折叠?



