File tree Expand file tree Collapse file tree 3 files changed +306
-298
lines changed
Expand file tree Collapse file tree 3 files changed +306
-298
lines changed Original file line number Diff line number Diff line change 1- #include < limits>
21#include < inttypes.h>
3-
2+ # include < limits >
43
54struct __attribute__ ((packed)) rtp_header {
6- union {
7- struct {
8- # if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
9- uint16_t csrc_count : 4 ;
10- uint16_t extension : 1 ;
11- uint16_t padding : 1 ;
12- uint16_t version : 2 ;
13- // next byte
14- uint16_t payload_type : 7 ;
15- uint16_t marker : 1 ;
16- # elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
17- uint16_t version : 2 ;
18- uint16_t padding : 1 ;
19- uint16_t extension : 1 ;
20- uint16_t csrc_count : 4 ;
21- // next byte
22- uint16_t marker : 1 ;
23- uint16_t payload_type : 7 ;
5+ union {
6+ struct {
7+ # if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
8+ uint16_t csrc_count : 4 ;
9+ uint16_t extension : 1 ;
10+ uint16_t padding : 1 ;
11+ uint16_t version : 2 ;
12+ // next byte
13+ uint16_t payload_type : 7 ;
14+ uint16_t marker : 1 ;
15+ # elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
16+ uint16_t version : 2 ;
17+ uint16_t padding : 1 ;
18+ uint16_t extension : 1 ;
19+ uint16_t csrc_count : 4 ;
20+ // next byte
21+ uint16_t marker : 1 ;
22+ uint16_t payload_type : 7 ;
2423
25- # else // if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
26- # error "Please fix <endian.h>"
27- # endif // if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
28- };
29- uint16_t flags;
30- };
31- uint16_t sequence_number;
32- uint32_t timestamp;
33- uint32_t ssrc;
24+ # else // if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
25+ # error "Please fix <endian.h>"
26+ # endif // if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
27+ };
28+ uint16_t flags;
29+ };
30+ uint16_t sequence_number;
31+ uint32_t timestamp;
32+ uint32_t ssrc;
3433};
You can’t perform that action at this time.
0 commit comments