Propagate Environment through QualityAnalyzingVideoDecoderFactory

Bug: webrtc:15791
Change-Id: I9eddf7bf9fb66ee70495e9bc3c810126e2015287
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336800
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41630}
This commit is contained in:
Danil Chapovalov 2024-01-29 18:38:21 +01:00 committed by WebRTC LUCI CQ
parent 7aa797244d
commit 62cee88e4b
3 changed files with 7 additions and 5 deletions

View File

@ -130,6 +130,7 @@ rtc_library("quality_analyzing_video_decoder") {
":encoded_image_data_injector_api",
":simulcast_dummy_buffer_helper",
"../../../../../api:video_quality_analyzer_api",
"../../../../../api/environment",
"../../../../../api/video:encoded_image",
"../../../../../api/video:video_frame",
"../../../../../api/video_codecs:video_codecs_api",

View File

@ -259,10 +259,10 @@ QualityAnalyzingVideoDecoderFactory::GetSupportedFormats() const {
return delegate_->GetSupportedFormats();
}
std::unique_ptr<VideoDecoder>
QualityAnalyzingVideoDecoderFactory::CreateVideoDecoder(
std::unique_ptr<VideoDecoder> QualityAnalyzingVideoDecoderFactory::Create(
const Environment& env,
const SdpVideoFormat& format) {
std::unique_ptr<VideoDecoder> decoder = delegate_->CreateVideoDecoder(format);
std::unique_ptr<VideoDecoder> decoder = delegate_->Create(env, format);
return std::make_unique<QualityAnalyzingVideoDecoder>(
peer_name_, std::move(decoder), extractor_, analyzer_);
}

View File

@ -18,6 +18,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/environment/environment.h"
#include "api/test/video_quality_analyzer_interface.h"
#include "api/video/encoded_image.h"
#include "api/video/video_frame.h"
@ -136,8 +137,8 @@ class QualityAnalyzingVideoDecoderFactory : public VideoDecoderFactory {
// Methods of VideoDecoderFactory interface.
std::vector<SdpVideoFormat> GetSupportedFormats() const override;
std::unique_ptr<VideoDecoder> CreateVideoDecoder(
const SdpVideoFormat& format) override;
std::unique_ptr<VideoDecoder> Create(const Environment& env,
const SdpVideoFormat& format) override;
private:
const std::string peer_name_;