#include "test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <utility>
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/logging.h"
#include "test/pc/e2e/analyzer/video/simulcast_dummy_buffer_helper.h"
namespace webrtc {
namespace webrtc_pc_e2e {
QualityAnalyzingVideoDecoder::QualityAnalyzingVideoDecoder(
absl::string_view peer_name,
std::unique_ptr<VideoDecoder> delegate,
EncodedImageDataExtractor* extractor,
VideoQualityAnalyzerInterface* analyzer)
: … { … }
QualityAnalyzingVideoDecoder::~QualityAnalyzingVideoDecoder() = default;
bool QualityAnalyzingVideoDecoder::Configure(const Settings& settings) { … }
int32_t QualityAnalyzingVideoDecoder::Decode(const EncodedImage& input_image,
int64_t render_time_ms) { … }
int32_t QualityAnalyzingVideoDecoder::RegisterDecodeCompleteCallback(
DecodedImageCallback* callback) { … }
int32_t QualityAnalyzingVideoDecoder::Release() { … }
VideoDecoder::DecoderInfo QualityAnalyzingVideoDecoder::GetDecoderInfo() const { … }
const char* QualityAnalyzingVideoDecoder::ImplementationName() const { … }
QualityAnalyzingVideoDecoder::DecoderCallback::DecoderCallback(
QualityAnalyzingVideoDecoder* decoder)
: … { … }
QualityAnalyzingVideoDecoder::DecoderCallback::~DecoderCallback() = default;
void QualityAnalyzingVideoDecoder::DecoderCallback::SetDelegateCallback(
DecodedImageCallback* delegate) { … }
int32_t QualityAnalyzingVideoDecoder::DecoderCallback::Decoded(
VideoFrame& decodedImage) { … }
int32_t QualityAnalyzingVideoDecoder::DecoderCallback::Decoded(
VideoFrame& decodedImage,
int64_t decode_time_ms) { … }
void QualityAnalyzingVideoDecoder::DecoderCallback::Decoded(
VideoFrame& decodedImage,
absl::optional<int32_t> decode_time_ms,
absl::optional<uint8_t> qp) { … }
int32_t
QualityAnalyzingVideoDecoder::DecoderCallback::IrrelevantSimulcastStreamDecoded(
uint16_t frame_id,
uint32_t timestamp_ms) { … }
rtc::scoped_refptr<webrtc::VideoFrameBuffer>
QualityAnalyzingVideoDecoder::DecoderCallback::GetDummyFrameBuffer() { … }
void QualityAnalyzingVideoDecoder::OnFrameDecoded(
VideoFrame* frame,
absl::optional<int32_t> decode_time_ms,
absl::optional<uint8_t> qp) { … }
QualityAnalyzingVideoDecoderFactory::QualityAnalyzingVideoDecoderFactory(
absl::string_view peer_name,
std::unique_ptr<VideoDecoderFactory> delegate,
EncodedImageDataExtractor* extractor,
VideoQualityAnalyzerInterface* analyzer)
: … { … }
QualityAnalyzingVideoDecoderFactory::~QualityAnalyzingVideoDecoderFactory() =
default;
std::vector<SdpVideoFormat>
QualityAnalyzingVideoDecoderFactory::GetSupportedFormats() const { … }
std::unique_ptr<VideoDecoder> QualityAnalyzingVideoDecoderFactory::Create(
const Environment& env,
const SdpVideoFormat& format) { … }
}
}