#include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h"
#include <string.h>
#include "api/scoped_refptr.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/forward_error_correction_internal.h"
#include "rtc_base/checks.h"
namespace webrtc {
namespace {
constexpr size_t kMaxMediaPackets = …;
constexpr size_t kMaxTrackedMediaPackets = …;
constexpr size_t kMaxFecPackets = …;
constexpr size_t kFecLevel0HeaderSize = …;
constexpr size_t kFecLevel1HeaderSizeLBitSet = …;
constexpr size_t kFecLevel1HeaderSizeLBitClear = …;
constexpr size_t kPacketMaskOffset = …;
size_t UlpfecHeaderSize(size_t packet_mask_size) { … }
}
UlpfecHeaderReader::UlpfecHeaderReader()
: … { … }
UlpfecHeaderReader::~UlpfecHeaderReader() = default;
bool UlpfecHeaderReader::ReadFecHeader(
ForwardErrorCorrection::ReceivedFecPacket* fec_packet) const { … }
UlpfecHeaderWriter::UlpfecHeaderWriter()
: … { … }
UlpfecHeaderWriter::~UlpfecHeaderWriter() = default;
size_t UlpfecHeaderWriter::MinPacketMaskSize(const uint8_t* packet_mask,
size_t packet_mask_size) const { … }
size_t UlpfecHeaderWriter::FecHeaderSize(size_t packet_mask_size) const { … }
void UlpfecHeaderWriter::FinalizeFecHeader(
rtc::ArrayView<const ProtectedStream> protected_streams,
ForwardErrorCorrection::Packet& fec_packet) const { … }
}