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 #include <glib.h>
26 
27 typedef struct janus_pp_rtp_header
28 {
29 #if __BYTE_ORDER == __BIG_ENDIAN
30  uint16_t version:2;
31  uint16_t padding:1;
32  uint16_t extension:1;
33  uint16_t csrccount:4;
34  uint16_t markerbit:1;
35  uint16_t type:7;
36 #elif __BYTE_ORDER == __LITTLE_ENDIAN
37  uint16_t csrccount:4;
38  uint16_t extension:1;
39  uint16_t padding:1;
40  uint16_t version:2;
41  uint16_t type:7;
42  uint16_t markerbit:1;
43 #endif
44  uint16_t seq_number;
45  uint32_t timestamp;
46  uint32_t ssrc;
47  uint32_t csrc[16];
49 
51  uint16_t type;
52  uint16_t length;
54 
55 typedef struct janus_pp_frame_packet {
56  janus_pp_rtp_header *header; /* Pointer to RTP header */
57  int version; /* Version of the .mjr file (2=has timestamps) */
58  uint32_t p_ts; /* Packet timestamp as saved by Janus (if available) */
59  uint16_t seq; /* RTP Sequence number */
60  uint64_t ts; /* RTP Timestamp */
61  uint16_t len; /* Length of the data */
62  int pt; /* Payload type of the data */
63  long offset; /* Offset of the data in the file */
64  int skip; /* Bytes to skip, besides the RTP header */
65  uint8_t drop; /* Whether this packet can be dropped (e.g., padding)*/
66  int audiolevel; /* Value of audio level in RTP extension, if parsed */
67  int rotation; /* Value of rotation in RTP extension, if parsed */
71 
72 #endif
uint16_t markerbit
Definition: pp-rtp.h:34
int audiolevel
Definition: pp-rtp.h:66
struct janus_pp_rtp_header janus_pp_rtp_header
uint16_t seq
Definition: pp-rtp.h:59
struct janus_pp_rtp_header_extension janus_pp_rtp_header_extension
Definition: pp-rtp.h:50
uint64_t ts
Definition: pp-rtp.h:60
uint16_t type
Definition: pp-rtp.h:35
uint32_t p_ts
Definition: pp-rtp.h:58
uint16_t version
Definition: pp-rtp.h:30
int version
Definition: pp-rtp.h:57
uint16_t type
Definition: pp-rtp.h:51
uint16_t padding
Definition: pp-rtp.h:31
long offset
Definition: pp-rtp.h:63
Definition: pp-rtp.h:27
uint16_t len
Definition: pp-rtp.h:61
uint32_t csrc[16]
Definition: pp-rtp.h:47
uint32_t timestamp
Definition: pp-rtp.h:45
struct janus_pp_frame_packet janus_pp_frame_packet
uint16_t extension
Definition: pp-rtp.h:32
int skip
Definition: pp-rtp.h:64
uint32_t ssrc
Definition: pp-rtp.h:46
uint16_t seq_number
Definition: pp-rtp.h:44
Definition: pp-rtp.h:55
struct janus_pp_frame_packet * next
Definition: pp-rtp.h:68
uint16_t length
Definition: pp-rtp.h:52
int pt
Definition: pp-rtp.h:62
uint8_t drop
Definition: pp-rtp.h:65
int rotation
Definition: pp-rtp.h:67
janus_pp_rtp_header * header
Definition: pp-rtp.h:56
struct janus_pp_frame_packet * prev
Definition: pp-rtp.h:69
uint16_t csrccount
Definition: pp-rtp.h:33