summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/api/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/api/test
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-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/test')
-rw-r--r--third_party/libwebrtc/api/test/mock_frame_transformer.h45
-rw-r--r--third_party/libwebrtc/api/test/mock_peerconnectioninterface.h4
-rw-r--r--third_party/libwebrtc/api/test/mock_video_decoder_factory.h13
-rw-r--r--third_party/libwebrtc/api/test/pclf/BUILD.gn2
-rw-r--r--third_party/libwebrtc/api/test/video/BUILD.gn1
-rw-r--r--third_party/libwebrtc/api/test/video/function_video_decoder_factory.h19
6 files changed, 73 insertions, 11 deletions
diff --git a/third_party/libwebrtc/api/test/mock_frame_transformer.h b/third_party/libwebrtc/api/test/mock_frame_transformer.h
new file mode 100644
index 0000000000..8f438bdf9e
--- /dev/null
+++ b/third_party/libwebrtc/api/test/mock_frame_transformer.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef API_TEST_MOCK_FRAME_TRANSFORMER_H_
+#define API_TEST_MOCK_FRAME_TRANSFORMER_H_
+
+#include <memory>
+#include <vector>
+
+#include "api/frame_transformer_interface.h"
+#include "test/gmock.h"
+
+namespace webrtc {
+
+class MockFrameTransformer : public FrameTransformerInterface {
+ public:
+ MOCK_METHOD(void,
+ Transform,
+ (std::unique_ptr<TransformableFrameInterface>),
+ (override));
+ MOCK_METHOD(void,
+ RegisterTransformedFrameCallback,
+ (rtc::scoped_refptr<TransformedFrameCallback>),
+ (override));
+ MOCK_METHOD(void,
+ RegisterTransformedFrameSinkCallback,
+ (rtc::scoped_refptr<TransformedFrameCallback>, uint32_t),
+ (override));
+ MOCK_METHOD(void, UnregisterTransformedFrameCallback, (), (override));
+ MOCK_METHOD(void,
+ UnregisterTransformedFrameSinkCallback,
+ (uint32_t),
+ (override));
+};
+
+} // namespace webrtc
+
+#endif // API_TEST_MOCK_FRAME_TRANSFORMER_H_
diff --git a/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h b/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h
index ccc6ce46b1..22a77d7dfe 100644
--- a/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h
+++ b/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h
@@ -177,6 +177,10 @@ class MockPeerConnectionInterface : public webrtc::PeerConnectionInterface {
(const std::vector<cricket::Candidate>&),
(override));
MOCK_METHOD(RTCError, SetBitrate, (const BitrateSettings&), (override));
+ MOCK_METHOD(void,
+ ReconfigureBandwidthEstimation,
+ (const BandwidthEstimationSettings&),
+ (override));
MOCK_METHOD(void, SetAudioPlayout, (bool), (override));
MOCK_METHOD(void, SetAudioRecording, (bool), (override));
MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
diff --git a/third_party/libwebrtc/api/test/mock_video_decoder_factory.h b/third_party/libwebrtc/api/test/mock_video_decoder_factory.h
index 6150d9f8b5..48d96ea58b 100644
--- a/third_party/libwebrtc/api/test/mock_video_decoder_factory.h
+++ b/third_party/libwebrtc/api/test/mock_video_decoder_factory.h
@@ -14,6 +14,7 @@
#include <memory>
#include <vector>
+#include "api/environment/environment.h"
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
@@ -21,17 +22,21 @@
namespace webrtc {
-class MockVideoDecoderFactory : public webrtc::VideoDecoderFactory {
+class MockVideoDecoderFactory : public VideoDecoderFactory {
public:
~MockVideoDecoderFactory() override { Die(); }
- MOCK_METHOD(std::vector<webrtc::SdpVideoFormat>,
+ MOCK_METHOD(std::vector<SdpVideoFormat>,
GetSupportedFormats,
(),
(const, override));
- MOCK_METHOD(std::unique_ptr<webrtc::VideoDecoder>,
+ MOCK_METHOD(std::unique_ptr<VideoDecoder>,
+ Create,
+ (const Environment&, const SdpVideoFormat&),
+ (override));
+ MOCK_METHOD(std::unique_ptr<VideoDecoder>,
CreateVideoDecoder,
- (const webrtc::SdpVideoFormat&),
+ (const SdpVideoFormat&),
(override));
MOCK_METHOD(void, Die, ());
};
diff --git a/third_party/libwebrtc/api/test/pclf/BUILD.gn b/third_party/libwebrtc/api/test/pclf/BUILD.gn
index 4f62984e83..68f1688556 100644
--- a/third_party/libwebrtc/api/test/pclf/BUILD.gn
+++ b/third_party/libwebrtc/api/test/pclf/BUILD.gn
@@ -74,6 +74,8 @@ rtc_library("media_quality_test_params") {
"../../../api/transport:network_control",
"../../../api/video_codecs:video_codecs_api",
"../../../modules/audio_processing:api",
+ "../../../p2p:connection",
+ "../../../p2p:port_allocator",
"../../../p2p:rtc_p2p",
"../../../rtc_base:network",
"../../../rtc_base:rtc_certificate_generator",
diff --git a/third_party/libwebrtc/api/test/video/BUILD.gn b/third_party/libwebrtc/api/test/video/BUILD.gn
index 0eae85aef3..cf6dd599c9 100644
--- a/third_party/libwebrtc/api/test/video/BUILD.gn
+++ b/third_party/libwebrtc/api/test/video/BUILD.gn
@@ -18,6 +18,7 @@ rtc_library("function_video_factory") {
deps = [
"../../../rtc_base:checks",
+ "../../environment",
"../../video_codecs:video_codecs_api",
]
}
diff --git a/third_party/libwebrtc/api/test/video/function_video_decoder_factory.h b/third_party/libwebrtc/api/test/video/function_video_decoder_factory.h
index 2145c71bff..2f2eeb5886 100644
--- a/third_party/libwebrtc/api/test/video/function_video_decoder_factory.h
+++ b/third_party/libwebrtc/api/test/video/function_video_decoder_factory.h
@@ -16,6 +16,7 @@
#include <utility>
#include <vector>
+#include "api/environment/environment.h"
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
@@ -29,17 +30,20 @@ class FunctionVideoDecoderFactory final : public VideoDecoderFactory {
public:
explicit FunctionVideoDecoderFactory(
std::function<std::unique_ptr<VideoDecoder>()> create)
- : create_([create = std::move(create)](const SdpVideoFormat&) {
+ : create_([create = std::move(create)](const Environment&,
+ const SdpVideoFormat&) {
return create();
}) {}
explicit FunctionVideoDecoderFactory(
- std::function<std::unique_ptr<VideoDecoder>(const SdpVideoFormat&)>
+ std::function<std::unique_ptr<VideoDecoder>(const Environment&,
+ const SdpVideoFormat&)>
create)
: create_(std::move(create)) {}
FunctionVideoDecoderFactory(
std::function<std::unique_ptr<VideoDecoder>()> create,
std::vector<SdpVideoFormat> sdp_video_formats)
- : create_([create = std::move(create)](const SdpVideoFormat&) {
+ : create_([create = std::move(create)](const Environment&,
+ const SdpVideoFormat&) {
return create();
}),
sdp_video_formats_(std::move(sdp_video_formats)) {}
@@ -48,13 +52,14 @@ class FunctionVideoDecoderFactory final : public VideoDecoderFactory {
return sdp_video_formats_;
}
- std::unique_ptr<VideoDecoder> CreateVideoDecoder(
- const SdpVideoFormat& format) override {
- return create_(format);
+ std::unique_ptr<VideoDecoder> Create(const Environment& env,
+ const SdpVideoFormat& format) override {
+ return create_(env, format);
}
private:
- const std::function<std::unique_ptr<VideoDecoder>(const SdpVideoFormat&)>
+ const std::function<std::unique_ptr<VideoDecoder>(const Environment& env,
+ const SdpVideoFormat&)>
create_;
const std::vector<SdpVideoFormat> sdp_video_formats_;
};