blob: 22113678b98585bfbefdaffa6600001bd488bd92 [file] [log] [blame]
hbos1f8239c2017-01-16 04:24:10 -08001/*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef API_TEST_MOCK_RTPSENDER_H_
12#define API_TEST_MOCK_RTPSENDER_H_
hbos1f8239c2017-01-16 04:24:10 -080013
Andrey Logvin24c10792022-08-31 08:55:33 +000014#include <memory>
hbos1f8239c2017-01-16 04:24:10 -080015#include <string>
16#include <vector>
17
Steve Anton10542f22019-01-11 09:11:00 -080018#include "api/rtp_sender_interface.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020019#include "test/gmock.h"
hbos1f8239c2017-01-16 04:24:10 -080020
21namespace webrtc {
22
Tomas Gunnarssonaf3406e2022-03-21 17:27:03 +010023class MockRtpSender : public RtpSenderInterface {
hbos1f8239c2017-01-16 04:24:10 -080024 public:
Tomas Gunnarssonaf3406e2022-03-21 17:27:03 +010025 static rtc::scoped_refptr<MockRtpSender> Create() {
26 return rtc::make_ref_counted<MockRtpSender>();
27 }
28
Danil Chapovalovfc115192020-05-08 15:03:03 +020029 MOCK_METHOD(bool, SetTrack, (MediaStreamTrackInterface*), (override));
30 MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
31 track,
32 (),
Ali Tofighc98687a2022-01-25 14:06:33 +010033 (const, override));
Andrey Logvin24c10792022-08-31 08:55:33 +000034 MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
35 dtls_transport,
36 (),
37 (const override));
Ali Tofighc98687a2022-01-25 14:06:33 +010038 MOCK_METHOD(uint32_t, ssrc, (), (const, override));
39 MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
40 MOCK_METHOD(std::string, id, (), (const, override));
41 MOCK_METHOD(std::vector<std::string>, stream_ids, (), (const, override));
Andrey Logvin24c10792022-08-31 08:55:33 +000042 MOCK_METHOD(void, SetStreams, (const std::vector<std::string>&), (override));
Danil Chapovalovfc115192020-05-08 15:03:03 +020043 MOCK_METHOD(std::vector<RtpEncodingParameters>,
44 init_send_encodings,
45 (),
Ali Tofighc98687a2022-01-25 14:06:33 +010046 (const, override));
47 MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
Danil Chapovalovfc115192020-05-08 15:03:03 +020048 MOCK_METHOD(RTCError, SetParameters, (const RtpParameters&), (override));
Florent Castelliacabb362022-10-18 17:05:16 +020049 MOCK_METHOD(void,
50 SetParametersAsync,
51 (const RtpParameters&, SetParametersCallback),
52 (override));
Danil Chapovalovfc115192020-05-08 15:03:03 +020053 MOCK_METHOD(rtc::scoped_refptr<DtmfSenderInterface>,
54 GetDtmfSender,
55 (),
Ali Tofighc98687a2022-01-25 14:06:33 +010056 (const, override));
Andrey Logvin24c10792022-08-31 08:55:33 +000057 MOCK_METHOD(void,
58 SetFrameEncryptor,
59 (rtc::scoped_refptr<FrameEncryptorInterface>),
60 (override));
61 MOCK_METHOD(rtc::scoped_refptr<FrameEncryptorInterface>,
62 GetFrameEncryptor,
63 (),
64 (const, override));
65 MOCK_METHOD(void,
66 SetEncoderToPacketizerFrameTransformer,
67 (rtc::scoped_refptr<FrameTransformerInterface>),
68 (override));
69 MOCK_METHOD(void,
70 SetEncoderSelector,
71 (std::unique_ptr<VideoEncoderFactory::EncoderSelectorInterface>),
72 (override));
hbos1f8239c2017-01-16 04:24:10 -080073};
74
Florent Castelli123a0ed2022-11-10 13:28:42 +000075static_assert(!std::is_abstract_v<rtc::RefCountedObject<MockRtpSender>>, "");
hbos1f8239c2017-01-16 04:24:10 -080076} // namespace webrtc
77
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020078#endif // API_TEST_MOCK_RTPSENDER_H_