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}
diff --git a/test/pc/e2e/analyzer/video/BUILD.gn b/test/pc/e2e/analyzer/video/BUILD.gn
index 17876e5..6adfc50 100644
--- a/test/pc/e2e/analyzer/video/BUILD.gn
+++ b/test/pc/e2e/analyzer/video/BUILD.gn
@@ -130,6 +130,7 @@
     ":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 e17b5d5..3cd1793 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 @@
   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_);
 }
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 2f0c2b9..daa919d 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 @@
 
   // 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_;