chromium/third_party/webrtc/modules/pacing/prioritized_packet_queue.cc

/*
 *  Copyright (c) 2022 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/pacing/prioritized_packet_queue.h"

#include <algorithm>
#include <array>
#include <utility>

#include "absl/container/inlined_vector.h"
#include "absl/types/optional.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/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

namespace webrtc {
namespace {

constexpr int kAudioPrioLevel =;

int GetPriorityForType(
    RtpPacketMediaType type,
    absl::optional<RtpPacketToSend::OriginalType> original_type) {}

}  // namespace

absl::InlinedVector<TimeDelta, PrioritizedPacketQueue::kNumPriorityLevels>
PrioritizedPacketQueue::ToTtlPerPrio(PacketQueueTTL packet_queue_ttl) {}

DataSize PrioritizedPacketQueue::QueuedPacket::PacketSize() const {}

PrioritizedPacketQueue::StreamQueue::StreamQueue(Timestamp creation_time)
    :{}

bool PrioritizedPacketQueue::StreamQueue::EnqueuePacket(QueuedPacket packet,
                                                        int priority_level) {}

PrioritizedPacketQueue::QueuedPacket
PrioritizedPacketQueue::StreamQueue::DequeuePacket(int priority_level) {}

bool PrioritizedPacketQueue::StreamQueue::HasPacketsAtPrio(
    int priority_level) const {}

bool PrioritizedPacketQueue::StreamQueue::IsEmpty() const {}

Timestamp PrioritizedPacketQueue::StreamQueue::LeadingPacketEnqueueTime(
    int priority_level) const {}

Timestamp PrioritizedPacketQueue::StreamQueue::LastEnqueueTime() const {}

std::array<std::deque<PrioritizedPacketQueue::QueuedPacket>,
           PrioritizedPacketQueue::kNumPriorityLevels>
PrioritizedPacketQueue::StreamQueue::DequeueAll() {}

PrioritizedPacketQueue::PrioritizedPacketQueue(
    Timestamp creation_time,
    bool prioritize_audio_retransmission,
    PacketQueueTTL packet_queue_ttl)
    :{}

void PrioritizedPacketQueue::Push(Timestamp enqueue_time,
                                  std::unique_ptr<RtpPacketToSend> packet) {}

std::unique_ptr<RtpPacketToSend> PrioritizedPacketQueue::Pop() {}

int PrioritizedPacketQueue::SizeInPackets() const {}

DataSize PrioritizedPacketQueue::SizeInPayloadBytes() const {}

bool PrioritizedPacketQueue::Empty() const {}

const std::array<int, kNumMediaTypes>&
PrioritizedPacketQueue::SizeInPacketsPerRtpPacketMediaType() const {}

Timestamp PrioritizedPacketQueue::LeadingPacketEnqueueTime(
    RtpPacketMediaType type) const {}

Timestamp PrioritizedPacketQueue::LeadingPacketEnqueueTimeForRetransmission()
    const {}

Timestamp PrioritizedPacketQueue::OldestEnqueueTime() const {}

TimeDelta PrioritizedPacketQueue::AverageQueueTime() const {}

void PrioritizedPacketQueue::UpdateAverageQueueTime(Timestamp now) {}

void PrioritizedPacketQueue::SetPauseState(bool paused, Timestamp now) {}

void PrioritizedPacketQueue::RemovePacketsForSsrc(uint32_t ssrc) {}

bool PrioritizedPacketQueue::HasKeyframePackets(uint32_t ssrc) const {}

void PrioritizedPacketQueue::DequeuePacketInternal(QueuedPacket& packet) {}

void PrioritizedPacketQueue::MaybeUpdateTopPrioLevel() {}

void PrioritizedPacketQueue::PurgeOldPacketsAtPriorityLevel(int prio_level,
                                                            Timestamp now) {}

}  // namespace webrtc