Fork me on GitHub
pp-rtp.h
Go to the documentation of this file.
1 
13 #ifndef _JANUS_PP_RTP
14 #define _JANUS_PP_RTP
15 
16 #ifdef __MACH__
17 #include <machine/endian.h>
18 #define __BYTE_ORDER BYTE_ORDER
19 #define __BIG_ENDIAN BIG_ENDIAN
20 #define __LITTLE_ENDIAN LITTLE_ENDIAN
21 #else
22 #include <endian.h>
23 #endif
24 
25 typedef struct janus_pp_rtp_header
26 {
27 #if __BYTE_ORDER == __BIG_ENDIAN
28  uint16_t version:2;
29  uint16_t padding:1;
30  uint16_t extension:1;
31  uint16_t csrccount:4;
32  uint16_t markerbit:1;
33  uint16_t type:7;
34 #elif __BYTE_ORDER == __LITTLE_ENDIAN
35  uint16_t csrccount:4;
36  uint16_t extension:1;
37  uint16_t padding:1;
38  uint16_t version:2;
39  uint16_t type:7;
40  uint16_t markerbit:1;
41 #endif
42  uint16_t seq_number;
43  uint32_t timestamp;
44  uint32_t ssrc;
45  uint32_t csrc[16];
47 
49  uint16_t type;
50  uint16_t length;
52 
53 typedef struct janus_pp_frame_packet {
54  uint16_t seq; /* RTP Sequence number */
55  uint64_t ts; /* RTP Timestamp */
56  uint16_t len; /* Length of the data */
57  int pt; /* Payload type of the data */
58  long offset; /* Offset of the data in the file */
59  int skip; /* Bytes to skip, besides the RTP header */
60  uint8_t drop; /* Whether this packet can be dropped (e.g., padding)*/
61  int audiolevel; /* Value of audio level in RTP extension, if parsed */
62  int rotation; /* Value of rotation in RTP extension, if parsed */
66 
67 #endif
uint16_t markerbit
Definition: pp-rtp.h:32
int audiolevel
Definition: pp-rtp.h:61
struct janus_pp_rtp_header janus_pp_rtp_header
uint16_t seq
Definition: pp-rtp.h:54
struct janus_pp_rtp_header_extension janus_pp_rtp_header_extension
Definition: pp-rtp.h:48
uint64_t ts
Definition: pp-rtp.h:55
uint16_t type
Definition: pp-rtp.h:33
uint16_t version
Definition: pp-rtp.h:28
uint16_t type
Definition: pp-rtp.h:49
uint16_t padding
Definition: pp-rtp.h:29
long offset
Definition: pp-rtp.h:58
Definition: pp-rtp.h:25
uint16_t len
Definition: pp-rtp.h:56
uint32_t csrc[16]
Definition: pp-rtp.h:45
uint32_t timestamp
Definition: pp-rtp.h:43
struct janus_pp_frame_packet janus_pp_frame_packet
uint16_t extension
Definition: pp-rtp.h:30
int skip
Definition: pp-rtp.h:59
uint32_t ssrc
Definition: pp-rtp.h:44
uint16_t seq_number
Definition: pp-rtp.h:42
Definition: pp-rtp.h:53
struct janus_pp_frame_packet * next
Definition: pp-rtp.h:63
uint16_t length
Definition: pp-rtp.h:50
int pt
Definition: pp-rtp.h:57
uint8_t drop
Definition: pp-rtp.h:60
int rotation
Definition: pp-rtp.h:62
struct janus_pp_frame_packet * prev
Definition: pp-rtp.h:64
uint16_t csrccount
Definition: pp-rtp.h:31