chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic.cc

/*
 *  Copyright (c) 2013 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/audio_coding/neteq/decision_logic.h"

#include <stdio.h>

#include <cstdint>
#include <memory>

#include "absl/types/optional.h"
#include "api/neteq/neteq.h"
#include "api/neteq/neteq_controller.h"
#include "modules/audio_coding/neteq/packet_arrival_history.h"
#include "modules/audio_coding/neteq/packet_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"

namespace webrtc {

namespace {

constexpr int kPostponeDecodingLevel =;
constexpr int kTargetLevelWindowMs =;
// The granularity of delay adjustments (accelerate/preemptive expand) is 15ms,
// but round up since the clock has a granularity of 10ms.
constexpr int kDelayAdjustmentGranularityMs =;
constexpr int kPacketHistorySizeMs =;
constexpr size_t kCngTimeoutMs =;

std::unique_ptr<DelayManager> CreateDelayManager(
    const Environment& env,
    const NetEqController::Config& neteq_config) {}

bool IsTimestretch(NetEq::Mode mode) {}

bool IsCng(NetEq::Mode mode) {}

bool IsExpand(NetEq::Mode mode) {}

}  // namespace

DecisionLogic::DecisionLogic(const Environment& env,
                             NetEqController::Config config)
    :{}

DecisionLogic::DecisionLogic(
    NetEqController::Config config,
    std::unique_ptr<DelayManager> delay_manager,
    std::unique_ptr<BufferLevelFilter> buffer_level_filter,
    std::unique_ptr<PacketArrivalHistory> packet_arrival_history)
    :{}

DecisionLogic::~DecisionLogic() = default;

void DecisionLogic::SoftReset() {}

void DecisionLogic::SetSampleRate(int fs_hz, size_t output_size_samples) {}

NetEq::Operation DecisionLogic::GetDecision(const NetEqStatus& status,
                                            bool* reset_decoder) {}

int DecisionLogic::TargetLevelMs() const {}

int DecisionLogic::UnlimitedTargetLevelMs() const {}

int DecisionLogic::GetFilteredBufferLevel() const {}

absl::optional<int> DecisionLogic::PacketArrived(
    int fs_hz,
    bool should_update_stats,
    const PacketArrivedInfo& info) {}

void DecisionLogic::FilterBufferLevel(size_t buffer_size_samples) {}

NetEq::Operation DecisionLogic::CngOperation(
    NetEqController::NetEqStatus status) {}

NetEq::Operation DecisionLogic::NoPacket(NetEqController::NetEqStatus status) {}

NetEq::Operation DecisionLogic::ExpectedPacketAvailable(
    NetEqController::NetEqStatus status) {}

NetEq::Operation DecisionLogic::FuturePacketAvailable(
    NetEqController::NetEqStatus status) {}

bool DecisionLogic::UnderTargetLevel() const {}

bool DecisionLogic::PostponeDecode(NetEqController::NetEqStatus status) const {}

bool DecisionLogic::PacketTooEarly(NetEqController::NetEqStatus status) const {}

int DecisionLogic::GetPlayoutDelayMs(
    NetEqController::NetEqStatus status) const {}

}  // namespace webrtc