11#include <promeki/config.h>
12#if PROMEKI_ENABLE_NETWORK
20PROMEKI_NAMESPACE_BEGIN
67 SourceDescription = 202,
73 enum SdesItemType : uint8_t {
107 static Buffer buildSenderReport(uint32_t ssrc,
const NtpTime &ntp, uint32_t rtpTimestamp,
108 uint32_t senderPacketCount, uint32_t senderOctetCount);
132 uint8_t fractionLost = 0;
133 int32_t cumulativeLost = 0;
134 uint32_t extendedHighestSeq = 0;
135 uint32_t interarrivalJitter = 0;
158 static Buffer buildReceiverReport(uint32_t ssrc,
const List<ReportBlock> &blocks);
173 static Buffer buildBye(uint32_t ssrc);
192 static Buffer buildSourceDescriptionCname(uint32_t ssrc,
const String &cname);
207 static Buffer compound(
const List<Buffer> &packets);
220 bool padding =
false;
223 size_t lengthBytes = 0;
227 bool isValid()
const {
return version == 2 && lengthBytes >= 4; }
243 static Header parseHeader(
const uint8_t *data,
size_t size);
256 struct SenderReportInfo {
259 uint32_t rtpTimestamp = 0;
260 uint32_t senderPacketCount = 0;
261 uint32_t senderOctetCount = 0;
282 static bool parseSenderReport(
const uint8_t *data,
size_t size, SenderReportInfo *out);
307 static List<SenderReportInfo> findSenderReports(
const uint8_t *data,
size_t size);
325 static List<uint32_t> findByeSources(
const uint8_t *data,
size_t size);