#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 {
constexpr int kMaximumDecodersToCollectStats = …;
constexpr base::TimeDelta kCheckSimultaneousDecodersInterval = …;
std::atomic_int* GetDecoderCounter() { … }
}
StatsCollectingDecoder::StatsCollectingDecoder(
const webrtc::SdpVideoFormat& format,
std::unique_ptr<webrtc::VideoDecoder> decoder,
StatsCollectingDecoder::StoreProcessingStatsCB stats_callback)
: … { … }
StatsCollectingDecoder::~StatsCollectingDecoder() { … }
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 { … }
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) { … }
}