#include "modules/rtp_rtcp/include/flexfec_sender.h"
#include <string.h>
#include <list>
#include <utility>
#include "absl/strings/string_view.h"
#include "api/environment/environment.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/forward_error_correction.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
constexpr uint16_t kMaxInitRtpSeqNumber = …;
constexpr size_t kFlexfecMaxHeaderSize = …;
const int kMsToRtpTimestamp = …;
constexpr TimeDelta kPacketLogInterval = …;
RtpHeaderExtensionMap RegisterSupportedExtensions(
const std::vector<RtpExtension>& rtp_header_extensions) { … }
}
FlexfecSender::FlexfecSender(
const Environment& env,
int payload_type,
uint32_t ssrc,
uint32_t protected_media_ssrc,
absl::string_view mid,
const std::vector<RtpExtension>& rtp_header_extensions,
rtc::ArrayView<const RtpExtensionSize> extension_sizes,
const RtpState* rtp_state)
: … { … }
FlexfecSender::~FlexfecSender() = default;
void FlexfecSender::SetProtectionParameters(
const FecProtectionParams& delta_params,
const FecProtectionParams& key_params) { … }
void FlexfecSender::AddPacketAndGenerateFec(const RtpPacketToSend& packet) { … }
std::vector<std::unique_ptr<RtpPacketToSend>> FlexfecSender::GetFecPackets() { … }
size_t FlexfecSender::MaxPacketOverhead() const { … }
DataRate FlexfecSender::CurrentFecRate() const { … }
absl::optional<RtpState> FlexfecSender::GetRtpState() { … }
}