From 62cee88e4b02527385ef89397601fb9649f3bcd5 Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Mon, 29 Jan 2024 18:38:21 +0100 Subject: [PATCH] Propagate Environment through QualityAnalyzingVideoDecoderFactory Bug: webrtc:15791 Change-Id: I9eddf7bf9fb66ee70495e9bc3c810126e2015287 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336800 Commit-Queue: Danil Chapovalov Reviewed-by: Jeremy Leconte Auto-Submit: Danil Chapovalov Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#41630} --- test/pc/e2e/analyzer/video/BUILD.gn | 1 + .../e2e/analyzer/video/quality_analyzing_video_decoder.cc | 6 +++--- .../pc/e2e/analyzer/video/quality_analyzing_video_decoder.h | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/pc/e2e/analyzer/video/BUILD.gn b/test/pc/e2e/analyzer/video/BUILD.gn index 17876e54be..6adfc50049 100644 --- a/test/pc/e2e/analyzer/video/BUILD.gn +++ b/test/pc/e2e/analyzer/video/BUILD.gn @@ -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", diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc index e17b5d5d83..3cd179370f 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc @@ -259,10 +259,10 @@ QualityAnalyzingVideoDecoderFactory::GetSupportedFormats() const { return delegate_->GetSupportedFormats(); } -std::unique_ptr -QualityAnalyzingVideoDecoderFactory::CreateVideoDecoder( +std::unique_ptr QualityAnalyzingVideoDecoderFactory::Create( + const Environment& env, const SdpVideoFormat& format) { - std::unique_ptr decoder = delegate_->CreateVideoDecoder(format); + std::unique_ptr decoder = delegate_->Create(env, format); return std::make_unique( peer_name_, std::move(decoder), extractor_, analyzer_); } diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h index 2f0c2b9d5d..daa919d7e4 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h @@ -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 GetSupportedFormats() const override; - std::unique_ptr CreateVideoDecoder( - const SdpVideoFormat& format) override; + std::unique_ptr Create(const Environment& env, + const SdpVideoFormat& format) override; private: const std::string peer_name_;