diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/rtcp_defs.h	Mon Jul 08 02:55:32 2024 +0000
@@ -0,0 +1,38 @@
+/*
+ * Some definitions for RTCP, just enough to implement the subset
+ * planned for libtwrtp.
+ */
+
+#pragma once
+
+#include <stdint.h>
+
+struct rtcp_sr_rr_hdr {
+	uint8_t		v_p_rc;
+	uint8_t		pt;
+	uint16_t	len;
+	uint32_t	ssrc;
+};
+
+struct rtcp_sr_block {
+	uint32_t	ntp_sec;
+	uint32_t	ntp_fract;
+	uint32_t	rtp_ts;
+	uint32_t	pkt_count;
+	uint32_t	octet_count;
+};
+
+struct rtcp_rr_block {
+	uint32_t	ssrc;
+	uint32_t	lost_word;
+	uint32_t	max_seq_ext;
+	uint32_t	jitter;
+	uint16_t	lsr_sec;
+	uint16_t	lsr_fract;
+	uint16_t	dlsr_sec;
+	uint16_t	dlsr_fract;
+};
+
+#define	RTCP_PT_SR	200
+#define	RTCP_PT_RR	201
+#define	RTCP_PT_SDES	202