Add MockTransformableVideoFrame to api/test/.
Define MockTransformableVideoFrame in api/test to be use in Blink tests. Bug: chromium:1069295 Change-Id: I960d8228eddbdf8263b731814a00fd02d0a6c54e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175136 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31272}
This commit is contained in:
parent
e7864f5894
commit
bb13f38a9e
11
api/BUILD.gn
11
api/BUILD.gn
@ -876,6 +876,16 @@ if (rtc_include_tests) {
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("mock_transformable_video_frame") {
|
||||
testonly = true
|
||||
sources = [ "test/mock_transformable_video_frame.h" ]
|
||||
|
||||
deps = [
|
||||
":frame_transformer_interface",
|
||||
"../test:test_support",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("mock_video_bitrate_allocator") {
|
||||
testonly = true
|
||||
sources = [ "test/mock_video_bitrate_allocator.h" ]
|
||||
@ -1042,6 +1052,7 @@ if (rtc_include_tests) {
|
||||
":mock_frame_encryptor",
|
||||
":mock_peerconnectioninterface",
|
||||
":mock_rtp",
|
||||
":mock_transformable_video_frame",
|
||||
":mock_video_bitrate_allocator",
|
||||
":mock_video_bitrate_allocator_factory",
|
||||
":mock_video_codec_factory",
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
#include "api/test/mock_peerconnectioninterface.h"
|
||||
#include "api/test/mock_rtpreceiver.h"
|
||||
#include "api/test/mock_rtpsender.h"
|
||||
#include "api/test/mock_transformable_video_frame.h"
|
||||
#include "api/test/mock_video_bitrate_allocator.h"
|
||||
#include "api/test/mock_video_bitrate_allocator_factory.h"
|
||||
#include "api/test/mock_video_decoder.h"
|
||||
|
||||
38
api/test/mock_transformable_video_frame.h
Normal file
38
api/test/mock_transformable_video_frame.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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_TRANSFORMABLE_VIDEO_FRAME_H_
|
||||
#define API_TEST_MOCK_TRANSFORMABLE_VIDEO_FRAME_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "api/frame_transformer_interface.h"
|
||||
#include "test/gmock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class MockTransformableVideoFrame
|
||||
: public webrtc::TransformableVideoFrameInterface {
|
||||
public:
|
||||
MOCK_METHOD(rtc::ArrayView<const uint8_t>, GetData, (), (const override));
|
||||
MOCK_METHOD(void, SetData, (rtc::ArrayView<const uint8_t> data), (override));
|
||||
MOCK_METHOD(uint32_t, GetTimestamp, (), (const override));
|
||||
MOCK_METHOD(uint32_t, GetSsrc, (), (const, override));
|
||||
MOCK_METHOD(bool, IsKeyFrame, (), (const, override));
|
||||
MOCK_METHOD(std::vector<uint8_t>, GetAdditionalData, (), (const, override));
|
||||
MOCK_METHOD(const webrtc::VideoFrameMetadata&,
|
||||
GetMetadata,
|
||||
(),
|
||||
(const, override));
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_TEST_MOCK_TRANSFORMABLE_VIDEO_FRAME_H_
|
||||
Loading…
x
Reference in New Issue
Block a user