chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

/*
 *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "modules/rtp_rtcp/source/rtp_rtcp_impl.h"

#include <string.h>

#include <algorithm>
#include <cstdint>
#include <memory>
#include <set>
#include <string>
#include <utility>

#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "modules/rtp_rtcp/source/ntp_time_util.h"
#include "modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
#include "modules/rtp_rtcp/source/rtcp_sender.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/ntp_time.h"

#ifdef _WIN32
// Disable warning C4355: 'this' : used in base member initializer list.
#pragma warning(disable : 4355)
#endif

namespace webrtc {
namespace {
const int64_t kRtpRtcpRttProcessTimeMs =;
const int64_t kRtpRtcpBitrateProcessTimeMs =;
constexpr TimeDelta kDefaultExpectedRetransmissionTime =;
}  // namespace

ModuleRtpRtcpImpl::RtpSenderContext::RtpSenderContext(
    const RtpRtcpInterface::Configuration& config)
    :{}

std::unique_ptr<RtpRtcp> RtpRtcp::DEPRECATED_Create(
    const Configuration& configuration) {}

ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
    :{}

ModuleRtpRtcpImpl::~ModuleRtpRtcpImpl() = default;

// Process any pending tasks such as timeouts (non time critical events).
void ModuleRtpRtcpImpl::Process() {}

void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) {}

int ModuleRtpRtcpImpl::RtxSendStatus() const {}

void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type,
                                              int associated_payload_type) {}

absl::optional<uint32_t> ModuleRtpRtcpImpl::RtxSsrc() const {}

absl::optional<uint32_t> ModuleRtpRtcpImpl::FlexfecSsrc() const {}

void ModuleRtpRtcpImpl::IncomingRtcpPacket(
    rtc::ArrayView<const uint8_t> rtcp_packet) {}

void ModuleRtpRtcpImpl::RegisterSendPayloadFrequency(int payload_type,
                                                     int payload_frequency) {}

int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) {}

uint32_t ModuleRtpRtcpImpl::StartTimestamp() const {}

// Configure start timestamp, default is a random number.
void ModuleRtpRtcpImpl::SetStartTimestamp(const uint32_t timestamp) {}

uint16_t ModuleRtpRtcpImpl::SequenceNumber() const {}

// Set SequenceNumber, default is a random number.
void ModuleRtpRtcpImpl::SetSequenceNumber(const uint16_t seq_num) {}

void ModuleRtpRtcpImpl::SetRtpState(const RtpState& rtp_state) {}

void ModuleRtpRtcpImpl::SetRtxState(const RtpState& rtp_state) {}

RtpState ModuleRtpRtcpImpl::GetRtpState() const {}

RtpState ModuleRtpRtcpImpl::GetRtxState() const {}

void ModuleRtpRtcpImpl::SetMid(absl::string_view mid) {}

// TODO(pbos): Handle media and RTX streams separately (separate RTCP
// feedbacks).
RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() {}

int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) {}

bool ModuleRtpRtcpImpl::Sending() const {}

void ModuleRtpRtcpImpl::SetSendingMediaStatus(const bool sending) {}

bool ModuleRtpRtcpImpl::SendingMedia() const {}

bool ModuleRtpRtcpImpl::IsAudioConfigured() const {}

void ModuleRtpRtcpImpl::SetAsPartOfAllocation(bool part_of_allocation) {}

bool ModuleRtpRtcpImpl::OnSendingRtpFrame(uint32_t timestamp,
                                          int64_t capture_time_ms,
                                          int payload_type,
                                          bool force_sender_report) {}

bool ModuleRtpRtcpImpl::TrySendPacket(std::unique_ptr<RtpPacketToSend> packet,
                                      const PacedPacketInfo& pacing_info) {}

void ModuleRtpRtcpImpl::SetFecProtectionParams(const FecProtectionParams&,
                                               const FecProtectionParams&) {}

std::vector<std::unique_ptr<RtpPacketToSend>>
ModuleRtpRtcpImpl::FetchFecPackets() {}

void ModuleRtpRtcpImpl::OnAbortedRetransmissions(
    rtc::ArrayView<const uint16_t> sequence_numbers) {}

void ModuleRtpRtcpImpl::OnPacketsAcknowledged(
    rtc::ArrayView<const uint16_t> sequence_numbers) {}

bool ModuleRtpRtcpImpl::SupportsPadding() const {}

bool ModuleRtpRtcpImpl::SupportsRtxPayloadPadding() const {}

std::vector<std::unique_ptr<RtpPacketToSend>>
ModuleRtpRtcpImpl::GeneratePadding(size_t target_size_bytes) {}

std::vector<RtpSequenceNumberMap::Info>
ModuleRtpRtcpImpl::GetSentRtpPacketInfos(
    rtc::ArrayView<const uint16_t> sequence_numbers) const {}

size_t ModuleRtpRtcpImpl::ExpectedPerPacketOverhead() const {}

void ModuleRtpRtcpImpl::OnPacketSendingThreadSwitched() {}

size_t ModuleRtpRtcpImpl::MaxRtpPacketSize() const {}

void ModuleRtpRtcpImpl::SetMaxRtpPacketSize(size_t rtp_packet_size) {}

RtcpMode ModuleRtpRtcpImpl::RTCP() const {}

// Configure RTCP status i.e on/off.
void ModuleRtpRtcpImpl::SetRTCPStatus(const RtcpMode method) {}

int32_t ModuleRtpRtcpImpl::SetCNAME(absl::string_view c_name) {}

absl::optional<TimeDelta> ModuleRtpRtcpImpl::LastRtt() const {}

TimeDelta ModuleRtpRtcpImpl::ExpectedRetransmissionTime() const {}

// Force a send of an RTCP packet.
// Normal SR and RR are triggered via the process function.
int32_t ModuleRtpRtcpImpl::SendRTCP(RTCPPacketType packet_type) {}

void ModuleRtpRtcpImpl::GetSendStreamDataCounters(
    StreamDataCounters* rtp_counters,
    StreamDataCounters* rtx_counters) const {}

// Received RTCP report.
std::vector<ReportBlockData> ModuleRtpRtcpImpl::GetLatestReportBlockData()
    const {}

absl::optional<RtpRtcpInterface::SenderReportStats>
ModuleRtpRtcpImpl::GetSenderReportStats() const {}

absl::optional<RtpRtcpInterface::NonSenderRttStats>
ModuleRtpRtcpImpl::GetNonSenderRttStats() const {}

// (REMB) Receiver Estimated Max Bitrate.
void ModuleRtpRtcpImpl::SetRemb(int64_t bitrate_bps,
                                std::vector<uint32_t> ssrcs) {}

void ModuleRtpRtcpImpl::UnsetRemb() {}

void ModuleRtpRtcpImpl::SetExtmapAllowMixed(bool extmap_allow_mixed) {}

void ModuleRtpRtcpImpl::RegisterRtpHeaderExtension(absl::string_view uri,
                                                   int id) {}

void ModuleRtpRtcpImpl::DeregisterSendRtpHeaderExtension(
    absl::string_view uri) {}

void ModuleRtpRtcpImpl::SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) {}

// Send a Negative acknowledgment packet.
int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list,
                                    const uint16_t size) {}

void ModuleRtpRtcpImpl::SendNack(
    const std::vector<uint16_t>& sequence_numbers) {}

bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const {}

// Store the sent packets, needed to answer to Negative acknowledgment requests.
void ModuleRtpRtcpImpl::SetStorePacketsStatus(const bool enable,
                                              const uint16_t number_to_store) {}

bool ModuleRtpRtcpImpl::StorePackets() const {}

void ModuleRtpRtcpImpl::SendCombinedRtcpPacket(
    std::vector<std::unique_ptr<rtcp::RtcpPacket>> rtcp_packets) {}

int32_t ModuleRtpRtcpImpl::SendLossNotification(uint16_t last_decoded_seq_num,
                                                uint16_t last_received_seq_num,
                                                bool decodability_flag,
                                                bool buffering_allowed) {}

void ModuleRtpRtcpImpl::SetRemoteSSRC(const uint32_t ssrc) {}

void ModuleRtpRtcpImpl::SetLocalSsrc(uint32_t local_ssrc) {}

RtpSendRates ModuleRtpRtcpImpl::GetSendRates() const {}

void ModuleRtpRtcpImpl::OnRequestSendReport() {}

void ModuleRtpRtcpImpl::OnReceivedNack(
    const std::vector<uint16_t>& nack_sequence_numbers) {}

void ModuleRtpRtcpImpl::OnReceivedRtcpReportBlocks(
    rtc::ArrayView<const ReportBlockData> report_blocks) {}

void ModuleRtpRtcpImpl::set_rtt_ms(int64_t rtt_ms) {}

int64_t ModuleRtpRtcpImpl::rtt_ms() const {}

void ModuleRtpRtcpImpl::SetVideoBitrateAllocation(
    const VideoBitrateAllocation& bitrate) {}

RTPSender* ModuleRtpRtcpImpl::RtpSender() {}

const RTPSender* ModuleRtpRtcpImpl::RtpSender() const {}

}  // namespace webrtc