2022-06-08 11:25:46 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright 2018 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_ENCODER_SELECTOR_H_
|
|
|
|
|
#define API_TEST_MOCK_ENCODER_SELECTOR_H_
|
|
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
#include <optional>
|
|
|
|
|
|
2024-08-13 05:43:47 -07:00
|
|
|
#include "api/units/data_rate.h"
|
|
|
|
|
#include "api/video/render_resolution.h"
|
|
|
|
|
#include "api/video_codecs/sdp_video_format.h"
|
2022-06-08 11:25:46 +02:00
|
|
|
#include "api/video_codecs/video_encoder_factory.h"
|
|
|
|
|
#include "test/gmock.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class MockEncoderSelector
|
|
|
|
|
: public VideoEncoderFactory::EncoderSelectorInterface {
|
|
|
|
|
public:
|
|
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
OnCurrentEncoder,
|
|
|
|
|
(const SdpVideoFormat& format),
|
|
|
|
|
(override));
|
|
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
MOCK_METHOD(std::optional<SdpVideoFormat>,
|
2022-06-08 11:25:46 +02:00
|
|
|
OnAvailableBitrate,
|
|
|
|
|
(const DataRate& rate),
|
|
|
|
|
(override));
|
|
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
MOCK_METHOD(std::optional<SdpVideoFormat>,
|
2022-06-08 11:25:46 +02:00
|
|
|
OnResolutionChange,
|
|
|
|
|
(const RenderResolution& resolution),
|
|
|
|
|
(override));
|
|
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
MOCK_METHOD(std::optional<SdpVideoFormat>, OnEncoderBroken, (), (override));
|
2022-06-08 11:25:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // API_TEST_MOCK_ENCODER_SELECTOR_H_
|