annotate include/rtcp_defs.h @ 29:3e01a71b7c7c

implement RTCP Rx
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 08 Jul 2024 02:55:32 +0000
parents
children 9fd693f234f8
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