Fork me on GitHub
Loading...
Searching...
No Matches
pp-rtp.h
Go to the documentation of this file.
1
13#ifndef JANUS_PP_RTP
14#define JANUS_PP_RTP
15
16#if defined(__MACH__) || defined(__FreeBSD__)
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#define JANUS_PP_RTP_EXTMAP_AUDIO_LEVEL "urn:ietf:params:rtp-hdrext:ssrc-audio-level"
28#define JANUS_PP_RTP_EXTMAP_VIDEO_ORIENTATION "urn:3gpp:video-orientation"
29
30typedef struct janus_pp_rtp_header
31{
32#if __BYTE_ORDER == __BIG_ENDIAN
33 uint16_t version:2;
34 uint16_t padding:1;
35 uint16_t extension:1;
36 uint16_t csrccount:4;
37 uint16_t markerbit:1;
38 uint16_t type:7;
39#elif __BYTE_ORDER == __LITTLE_ENDIAN
40 uint16_t csrccount:4;
41 uint16_t extension:1;
42 uint16_t padding:1;
43 uint16_t version:2;
44 uint16_t type:7;
45 uint16_t markerbit:1;
46#endif
47 uint16_t seq_number;
48 uint32_t timestamp;
49 uint32_t ssrc;
50 uint32_t csrc[16];
52
54 uint16_t type;
55 uint16_t length;
57
58typedef struct janus_pp_frame_packet {
59 janus_pp_rtp_header *header; /* Pointer to RTP header */
60 int version; /* Version of the .mjr file (2=has timestamps) */
61 uint32_t p_ts; /* Packet timestamp as saved by Janus (if available) */
62 uint16_t seq; /* RTP Sequence number */
63 uint64_t ts; /* RTP Timestamp */
64 uint16_t len; /* Length of the data */
65 int pt; /* Payload type of the data */
66 long offset; /* Offset of the data in the file */
67 int skip; /* Bytes to skip, besides the RTP header */
68 uint8_t drop; /* Whether this packet can be dropped (e.g., padding)*/
69 int audiolevel; /* Value of audio level in RTP extension, if parsed */
70 int rotation; /* Value of rotation in RTP extension, if parsed */
74
75#endif
Definition: pp-rtp.h:58
uint16_t seq
Definition: pp-rtp.h:62
uint16_t len
Definition: pp-rtp.h:64
int audiolevel
Definition: pp-rtp.h:69
uint32_t p_ts
Definition: pp-rtp.h:61
long offset
Definition: pp-rtp.h:66
int version
Definition: pp-rtp.h:60
int pt
Definition: pp-rtp.h:65
struct janus_pp_frame_packet * next
Definition: pp-rtp.h:71
int skip
Definition: pp-rtp.h:67
struct janus_pp_frame_packet * prev
Definition: pp-rtp.h:72
int rotation
Definition: pp-rtp.h:70
uint8_t drop
Definition: pp-rtp.h:68
uint64_t ts
Definition: pp-rtp.h:63
janus_pp_rtp_header * header
Definition: pp-rtp.h:59
Definition: pp-rtp.h:53
uint16_t type
Definition: pp-rtp.h:54
uint16_t length
Definition: pp-rtp.h:55
Definition: pp-rtp.h:31
uint32_t csrc[16]
Definition: pp-rtp.h:50
uint16_t markerbit
Definition: pp-rtp.h:37
uint16_t seq_number
Definition: pp-rtp.h:47
uint32_t ssrc
Definition: pp-rtp.h:49
uint16_t padding
Definition: pp-rtp.h:34
uint32_t timestamp
Definition: pp-rtp.h:48
uint16_t extension
Definition: pp-rtp.h:35
uint16_t csrccount
Definition: pp-rtp.h:36
uint16_t type
Definition: pp-rtp.h:38
uint16_t version
Definition: pp-rtp.h:33