#include "modules/rtp_rtcp/source/fec_test_helper.h"
#include <memory>
#include <utility>
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/rtp_packet.h"
#include "rtc_base/checks.h"
namespace webrtc {
namespace test {
namespace fec {
namespace {
constexpr uint8_t kRtpMarkerBitMask = …;
constexpr uint8_t kFecPayloadType = …;
constexpr uint8_t kRedPayloadType = …;
constexpr uint8_t kVp8PayloadType = …;
constexpr int kPacketTimestampIncrement = …;
}
MediaPacketGenerator::MediaPacketGenerator(uint32_t min_packet_size,
uint32_t max_packet_size,
uint32_t ssrc,
Random* random)
: … { … }
MediaPacketGenerator::~MediaPacketGenerator() = default;
ForwardErrorCorrection::PacketList MediaPacketGenerator::ConstructMediaPackets(
int num_media_packets,
uint16_t start_seq_num) { … }
ForwardErrorCorrection::PacketList MediaPacketGenerator::ConstructMediaPackets(
int num_media_packets) { … }
uint16_t MediaPacketGenerator::GetNextSeqNum() { … }
AugmentedPacketGenerator::AugmentedPacketGenerator(uint32_t ssrc)
: … { … }
void AugmentedPacketGenerator::NewFrame(size_t num_packets) { … }
uint16_t AugmentedPacketGenerator::NextPacketSeqNum() { … }
std::unique_ptr<AugmentedPacket> AugmentedPacketGenerator::NextPacket(
size_t offset,
size_t length) { … }
void AugmentedPacketGenerator::WriteRtpHeader(const RTPHeader& header,
uint8_t* data) { … }
FlexfecPacketGenerator::FlexfecPacketGenerator(uint32_t media_ssrc,
uint32_t flexfec_ssrc)
: … { … }
std::unique_ptr<AugmentedPacket> FlexfecPacketGenerator::BuildFlexfecPacket(
const ForwardErrorCorrection::Packet& packet) { … }
UlpfecPacketGenerator::UlpfecPacketGenerator(uint32_t ssrc)
: … { … }
RtpPacketReceived UlpfecPacketGenerator::BuildMediaRedPacket(
const AugmentedPacket& packet,
bool is_recovered) { … }
RtpPacketReceived UlpfecPacketGenerator::BuildUlpfecRedPacket(
const ForwardErrorCorrection::Packet& packet) { … }
}
}
}