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