chromium/third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/peerconnection/stats_collecting_decoder.h"

#include <algorithm>
#include <atomic>

#include "base/check.h"
#include "base/logging.h"
#include "media/base/video_codecs.h"
#include "third_party/blink/renderer/platform/webrtc/webrtc_video_utils.h"
#include "third_party/webrtc/modules/video_coding/include/video_error_codes.h"

namespace blink {
namespace {
// Limit data collection to when only a single decoder is active. This gives an
// optimistic estimate of the performance.
constexpr int kMaximumDecodersToCollectStats =;
constexpr base::TimeDelta kCheckSimultaneousDecodersInterval =;

// Number of StatsCollectingDecoder instances right now that have started
// decoding.
std::atomic_int* GetDecoderCounter() {}
}  // namespace

StatsCollectingDecoder::StatsCollectingDecoder(
    const webrtc::SdpVideoFormat& format,
    std::unique_ptr<webrtc::VideoDecoder> decoder,
    StatsCollectingDecoder::StoreProcessingStatsCB stats_callback)
    :{}

StatsCollectingDecoder::~StatsCollectingDecoder() {}

// Implementation of webrtc::VideoDecoder.
bool StatsCollectingDecoder::Configure(const Settings& settings) {}

int32_t StatsCollectingDecoder::Decode(const webrtc::EncodedImage& input_image,
                                       bool missing_frames,
                                       int64_t render_time_ms) {}

int32_t StatsCollectingDecoder::RegisterDecodeCompleteCallback(
    DecodedImageCallback* callback) {}

int32_t StatsCollectingDecoder::Release() {}

webrtc::VideoDecoder::DecoderInfo StatsCollectingDecoder::GetDecoderInfo()
    const {}

// Implementation of webrtc::DecodedImageCallback.
int32_t StatsCollectingDecoder::Decoded(webrtc::VideoFrame& decodedImage) {}

void StatsCollectingDecoder::Decoded(webrtc::VideoFrame& decodedImage,
                                     std::optional<int32_t> decode_time_ms,
                                     std::optional<uint8_t> qp) {}

}  // namespace blink