diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/api/video_codecs/test | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/api/video_codecs/test')
-rw-r--r-- | third_party/libwebrtc/api/video_codecs/test/BUILD.gn | 3 | ||||
-rw-r--r-- | third_party/libwebrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc | 15 |
2 files changed, 13 insertions, 5 deletions
diff --git a/third_party/libwebrtc/api/video_codecs/test/BUILD.gn b/third_party/libwebrtc/api/video_codecs/test/BUILD.gn index 7bfe86e9f4..be897ae124 100644 --- a/third_party/libwebrtc/api/video_codecs/test/BUILD.gn +++ b/third_party/libwebrtc/api/video_codecs/test/BUILD.gn @@ -39,10 +39,13 @@ if (rtc_include_tests) { "../../../modules/video_coding:webrtc_vp8", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_tests_utils", + "../../../test:explicit_key_value_config", "../../../test:fake_video_codecs", "../../../test:field_trial", "../../../test:test_support", "../../../test:video_test_common", + "../../environment", + "../../environment:environment_factory", "../../video:encoded_image", "../../video:video_bitrate_allocation", "../../video:video_frame", diff --git a/third_party/libwebrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc b/third_party/libwebrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc index 97be6250db..bd837605b0 100644 --- a/third_party/libwebrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc +++ b/third_party/libwebrtc/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc @@ -13,6 +13,8 @@ #include <stdint.h> #include "absl/types/optional.h" +#include "api/environment/environment.h" +#include "api/environment/environment_factory.h" #include "api/video/encoded_image.h" #include "api/video/video_frame.h" #include "api/video_codecs/video_decoder.h" @@ -20,7 +22,7 @@ #include "modules/video_coding/include/video_codec_interface.h" #include "modules/video_coding/include/video_error_codes.h" #include "rtc_base/checks.h" -#include "test/field_trial.h" +#include "test/explicit_key_value_config.h" #include "test/gtest.h" namespace webrtc { @@ -31,10 +33,12 @@ class VideoDecoderSoftwareFallbackWrapperTest : public ::testing::Test { : VideoDecoderSoftwareFallbackWrapperTest("") {} explicit VideoDecoderSoftwareFallbackWrapperTest( const std::string& field_trials) - : override_field_trials_(field_trials), + : field_trials_(field_trials), + env_(CreateEnvironment(&field_trials_)), fake_decoder_(new CountingFakeDecoder()), fallback_wrapper_(CreateVideoDecoderSoftwareFallbackWrapper( - std::unique_ptr<VideoDecoder>(VP8Decoder::Create()), + env_, + CreateVp8Decoder(env_), std::unique_ptr<VideoDecoder>(fake_decoder_))) {} class CountingFakeDecoder : public VideoDecoder { @@ -71,7 +75,8 @@ class VideoDecoderSoftwareFallbackWrapperTest : public ::testing::Test { int release_count_ = 0; int reset_count_ = 0; }; - test::ScopedFieldTrials override_field_trials_; + test::ExplicitKeyValueConfig field_trials_; + const Environment env_; // `fake_decoder_` is owned and released by `fallback_wrapper_`. CountingFakeDecoder* fake_decoder_; std::unique_ptr<VideoDecoder> fallback_wrapper_; @@ -275,7 +280,7 @@ class ForcedSoftwareDecoderFallbackTest fake_decoder_ = new CountingFakeDecoder(); sw_fallback_decoder_ = new CountingFakeDecoder(); fallback_wrapper_ = CreateVideoDecoderSoftwareFallbackWrapper( - std::unique_ptr<VideoDecoder>(sw_fallback_decoder_), + env_, std::unique_ptr<VideoDecoder>(sw_fallback_decoder_), std::unique_ptr<VideoDecoder>(fake_decoder_)); } |