annotate include/rtcp_defs.h @ 42:334d883b96ba

twrtp_jibuf_create: make config argument const While this config structure is not a constant in the mathematical sense of the term (it is expected that vty config changes may happen while twjit instance is alive), twjit functions never write to it, only read, hence it is 'const' in the not-quite-mathematical C-standard sense.
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 20 Dec 2024 22:47:20 +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