2020-05-15 08:24:17 +02:00
|
|
|
/*
|
|
|
|
|
* 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_
|
|
|
|
|
|
2024-08-13 05:43:47 -07:00
|
|
|
#include <cstdint>
|
2024-08-29 13:00:40 +00:00
|
|
|
#include <optional>
|
2023-10-23 11:57:43 +02:00
|
|
|
#include <string>
|
2024-08-13 05:43:47 -07:00
|
|
|
#include <type_traits>
|
2020-05-15 08:24:17 +02:00
|
|
|
|
2024-08-13 05:43:47 -07:00
|
|
|
#include "api/array_view.h"
|
2020-05-15 08:24:17 +02:00
|
|
|
#include "api/frame_transformer_interface.h"
|
2024-08-13 05:43:47 -07:00
|
|
|
#include "api/units/timestamp.h"
|
|
|
|
|
#include "api/video/video_frame_metadata.h"
|
2020-05-15 08:24:17 +02:00
|
|
|
#include "test/gmock.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2022-11-10 13:28:42 +00:00
|
|
|
class MockTransformableVideoFrame
|
|
|
|
|
: public webrtc::TransformableVideoFrameInterface {
|
2020-05-15 08:24:17 +02:00
|
|
|
public:
|
2024-05-16 13:38:25 +02:00
|
|
|
MockTransformableVideoFrame() : TransformableVideoFrameInterface(Passkey()) {}
|
2022-01-25 14:06:33 +01:00
|
|
|
MOCK_METHOD(rtc::ArrayView<const uint8_t>, GetData, (), (const, override));
|
2020-05-15 08:24:17 +02:00
|
|
|
MOCK_METHOD(void, SetData, (rtc::ArrayView<const uint8_t> data), (override));
|
2022-05-14 00:57:25 +02:00
|
|
|
MOCK_METHOD(uint32_t, GetTimestamp, (), (const, override));
|
2023-06-29 09:02:22 +00:00
|
|
|
MOCK_METHOD(void, SetRTPTimestamp, (uint32_t), (override));
|
2022-11-10 13:28:42 +00:00
|
|
|
MOCK_METHOD(uint32_t, GetSsrc, (), (const, override));
|
2020-05-15 08:24:17 +02:00
|
|
|
MOCK_METHOD(bool, IsKeyFrame, (), (const, override));
|
2023-01-16 10:41:28 +01:00
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
SetMetadata,
|
|
|
|
|
(const webrtc::VideoFrameMetadata&),
|
|
|
|
|
(override));
|
2023-02-09 15:39:19 +01:00
|
|
|
MOCK_METHOD(uint8_t, GetPayloadType, (), (const, override));
|
2023-02-16 12:30:13 +01:00
|
|
|
MOCK_METHOD(TransformableFrameInterface::Direction,
|
|
|
|
|
GetDirection,
|
|
|
|
|
(),
|
|
|
|
|
(const, override));
|
2023-10-23 11:57:43 +02:00
|
|
|
MOCK_METHOD(std::string, GetMimeType, (), (const, override));
|
2023-02-24 11:20:28 +00:00
|
|
|
MOCK_METHOD(VideoFrameMetadata, Metadata, (), (const, override));
|
2024-08-29 13:00:40 +00:00
|
|
|
MOCK_METHOD(std::optional<Timestamp>,
|
2023-08-18 13:11:23 +02:00
|
|
|
GetCaptureTimeIdentifier,
|
|
|
|
|
(),
|
|
|
|
|
(const, override));
|
2020-05-15 08:24:17 +02:00
|
|
|
};
|
|
|
|
|
|
2023-02-09 15:39:19 +01:00
|
|
|
static_assert(!std::is_abstract_v<MockTransformableVideoFrame>, "");
|
|
|
|
|
|
2020-05-15 08:24:17 +02:00
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // API_TEST_MOCK_TRANSFORMABLE_VIDEO_FRAME_H_
|