annotate include/rtcp_defs.h @ 35:c0ce22777694

add helper functions for DSCP and socket priority
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 09 Jul 2024 01:56:26 +0000
parents 9fd693f234f8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * Some definitions for RTCP, just enough to implement the subset
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * planned for libtwrtp.
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #pragma once
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include <stdint.h>
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 struct rtcp_sr_rr_hdr {
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 uint8_t v_p_rc;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 uint8_t pt;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 uint16_t len;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 uint32_t ssrc;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 };
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 struct rtcp_sr_block {
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 uint32_t ntp_sec;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 uint32_t ntp_fract;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 uint32_t rtp_ts;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 uint32_t pkt_count;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 uint32_t octet_count;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 };
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 struct rtcp_rr_block {
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 uint32_t ssrc;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 uint32_t lost_word;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 uint32_t max_seq_ext;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 uint32_t jitter;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 uint16_t lsr_sec;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 uint16_t lsr_fract;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 uint16_t dlsr_sec;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 uint16_t dlsr_fract;
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 };
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #define RTCP_PT_SR 200
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #define RTCP_PT_RR 201
3e01a71b7c7c implement RTCP Rx
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define RTCP_PT_SDES 202
30
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
39 #define RTCP_PT_BYE 203
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
40 #define RTCP_PT_APP 204
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
41
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
42 #define SDES_ITEM_CNAME 1
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
43 #define SDES_ITEM_NAME 2
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
44 #define SDES_ITEM_EMAIL 3
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
45 #define SDES_ITEM_PHONE 4
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
46 #define SDES_ITEM_LOC 5
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
47 #define SDES_ITEM_TOOL 6
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
48 #define SDES_ITEM_NOTE 7
9fd693f234f8 definitions for RTCP SDES
Mychaela Falconia <falcon@freecalypso.org>
parents: 29
diff changeset
49 #define SDES_ITEM_PRIV 8