7#define DEFAULT_MCAST_PORT ((uint16_t)5004)
8#define DEFAULT_RTP_PORT ((uint16_t)5004)
9#define DEFAULT_RTCP_PORT ((uint16_t)5005)
10#define DEFAULT_STAT_PORT ((uint16_t)5006)
12#define NTP_EPOCH 2208988800UL
14#define RTP_MIN_SIZE 12
16#define RTP_MARKER 0x80
18#define OPUS_SAMPRATE (48000)
139uint8_t *
gen_bye(uint8_t *output,
size_t bufsize,uint32_t
const *ssrcs,
int sc);
uint8_t float_to_mulaw(float fsample)
int channels_from_pt(int type)
bool legal_opus_samprate(int n)
char const * encoding_string(enum encoding)
struct string_table Opus_application[]
uint8_t * gen_sdes(uint8_t *output, size_t bufsize, uint32_t ssrc, struct rtcp_sdes const *sdes, int sc)
uint8_t * gen_bye(uint8_t *output, size_t bufsize, uint32_t const *ssrcs, int sc)
float mulaw_to_float(uint8_t ulaw)
float alaw_to_float(uint8_t alaw)
struct pt_table PT_table[]
int pt_from_info(int samprate, int channels, enum encoding)
bool legal_opus_size(int n)
void const * ntoh_rtp(struct rtp_header *, void const *)
int samprate_from_pt(int type)
uint8_t * gen_rr(uint8_t *output, size_t bufsize, uint32_t ssrc, struct rtcp_rr const *rr, int rc)
sdes_type
Definition rtp.h:98
@ NOTE
Definition rtp.h:105
@ NAME
Definition rtp.h:100
@ PRIV
Definition rtp.h:106
@ EMAIL
Definition rtp.h:101
@ CNAME
Definition rtp.h:99
@ TOOL
Definition rtp.h:104
@ PHONE
Definition rtp.h:102
@ LOC
Definition rtp.h:103
uint8_t float_to_alaw(float fsample)
int add_pt(int type, int samprate, int channels, enum encoding encoding)
int rtp_process(struct rtp_state *state, struct rtp_header const *rtp, size_t samples)
encoding
Definition rtp.h:26
@ F16LE
Definition rtp.h:33
@ F16BE
Definition rtp.h:36
@ S16BE
Definition rtp.h:29
@ F32BE
Definition rtp.h:35
@ OPUS_VOIP
Definition rtp.h:34
@ MULAW
Definition rtp.h:37
@ NO_ENCODING
Definition rtp.h:27
@ ALAW
Definition rtp.h:38
@ AX25
Definition rtp.h:32
@ F32LE
Definition rtp.h:31
@ S16LE
Definition rtp.h:28
@ OPUS
Definition rtp.h:30
@ UNUSED_ENCODING
Definition rtp.h:39
char const * opus_application_string(int)
enum encoding encoding_from_pt(int type)
#define PKTSIZE
Definition rtp.h:19
struct string_table Opus_signal[]
uint8_t * gen_sr(uint8_t *output, size_t bufsize, struct rtcp_sr const *sr, struct rtcp_rr const *rr, int rc)
int opus_bandwidth_to_code(int bw)
int opus_bandwidth(char const **str, int code)
void * hton_rtp(void *, struct rtp_header const *)
uint8_t const * data
Definition rtp.h:122
struct packet * next
Definition rtp.h:120
size_t len
Definition rtp.h:123
struct rtp_header rtp
Definition rtp.h:121
uint8_t content[PKTSIZE]
Definition rtp.h:124
int channels
Definition rtp.h:44
enum encoding encoding
Definition rtp.h:45
int samprate
Definition rtp.h:43
int highest_seq
Definition rtp.h:91
int lost_packets
Definition rtp.h:90
int lost_fract
Definition rtp.h:89
int jitter
Definition rtp.h:92
uint32_t ssrc
Definition rtp.h:88
int dlsr
Definition rtp.h:94
int lsr
Definition rtp.h:93
enum sdes_type type
Definition rtp.h:111
char message[256]
Definition rtp.h:114
size_t mlen
Definition rtp.h:113
uint32_t ssrc
Definition rtp.h:112
int64_t ntp_timestamp
Definition rtp.h:80
unsigned int rtp_timestamp
Definition rtp.h:81
uint32_t ssrc
Definition rtp.h:79
unsigned int byte_count
Definition rtp.h:83
unsigned int packet_count
Definition rtp.h:82
uint64_t packets
Definition rtp.h:71
uint64_t bytes
Definition rtp.h:72
bool odd_seq_set
Definition rtp.h:69
uint64_t dupes
Definition rtp.h:74
uint32_t timestamp
Definition rtp.h:70
uint64_t drops
Definition rtp.h:73
uint8_t type
Definition rtp.h:65
uint16_t seq
Definition rtp.h:67
uint16_t odd_seq
Definition rtp.h:68
uint32_t ssrc
Definition rtp.h:64
bool init
Definition rtp.h:66
int value
Definition rtp.h:23
char * str
Definition rtp.h:22