• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2018 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 
11 #ifndef CALL_TEST_MOCK_RTP_TRANSPORT_CONTROLLER_SEND_H_
12 #define CALL_TEST_MOCK_RTP_TRANSPORT_CONTROLLER_SEND_H_
13 
14 #include <map>
15 #include <memory>
16 #include <string>
17 #include <vector>
18 
19 #include "api/crypto/crypto_options.h"
20 #include "api/crypto/frame_encryptor_interface.h"
21 #include "api/frame_transformer_interface.h"
22 #include "api/transport/bitrate_settings.h"
23 #include "call/rtp_transport_controller_send_interface.h"
24 #include "modules/pacing/packet_router.h"
25 #include "rtc_base/network/sent_packet.h"
26 #include "rtc_base/network_route.h"
27 #include "rtc_base/rate_limiter.h"
28 #include "test/gmock.h"
29 
30 namespace webrtc {
31 
32 class MockRtpTransportControllerSend
33     : public RtpTransportControllerSendInterface {
34  public:
35   MOCK_METHOD(RtpVideoSenderInterface*,
36               CreateRtpVideoSender,
37               ((std::map<uint32_t, RtpState>),
38                (const std::map<uint32_t, RtpPayloadState>&),
39                const RtpConfig&,
40                int rtcp_report_interval_ms,
41                Transport*,
42                const RtpSenderObservers&,
43                RtcEventLog*,
44                std::unique_ptr<FecController>,
45                const RtpSenderFrameEncryptionConfig&,
46                rtc::scoped_refptr<FrameTransformerInterface>),
47               (override));
48   MOCK_METHOD(void,
49               DestroyRtpVideoSender,
50               (RtpVideoSenderInterface*),
51               (override));
52   MOCK_METHOD(rtc::TaskQueue*, GetWorkerQueue, (), (override));
53   MOCK_METHOD(PacketRouter*, packet_router, (), (override));
54   MOCK_METHOD(NetworkStateEstimateObserver*,
55               network_state_estimate_observer,
56               (),
57               (override));
58   MOCK_METHOD(TransportFeedbackObserver*,
59               transport_feedback_observer,
60               (),
61               (override));
62   MOCK_METHOD(RtpPacketSender*, packet_sender, (), (override));
63   MOCK_METHOD(void,
64               SetAllocatedSendBitrateLimits,
65               (BitrateAllocationLimits),
66               (override));
67   MOCK_METHOD(void, SetPacingFactor, (float), (override));
68   MOCK_METHOD(void, SetQueueTimeLimit, (int), (override));
69   MOCK_METHOD(StreamFeedbackProvider*,
70               GetStreamFeedbackProvider,
71               (),
72               (override));
73   MOCK_METHOD(void,
74               RegisterTargetTransferRateObserver,
75               (TargetTransferRateObserver*),
76               (override));
77   MOCK_METHOD(void,
78               OnNetworkRouteChanged,
79               (const std::string&, const rtc::NetworkRoute&),
80               (override));
81   MOCK_METHOD(void, OnNetworkAvailability, (bool), (override));
82   MOCK_METHOD(RtcpBandwidthObserver*, GetBandwidthObserver, (), (override));
83   MOCK_METHOD(int64_t, GetPacerQueuingDelayMs, (), (const, override));
84   MOCK_METHOD(absl::optional<Timestamp>,
85               GetFirstPacketTime,
86               (),
87               (const, override));
88   MOCK_METHOD(void, EnablePeriodicAlrProbing, (bool), (override));
89   MOCK_METHOD(void, OnSentPacket, (const rtc::SentPacket&), (override));
90   MOCK_METHOD(void,
91               SetSdpBitrateParameters,
92               (const BitrateConstraints&),
93               (override));
94   MOCK_METHOD(void,
95               SetClientBitratePreferences,
96               (const BitrateSettings&),
97               (override));
98   MOCK_METHOD(void, OnTransportOverheadChanged, (size_t), (override));
99   MOCK_METHOD(void, AccountForAudioPacketsInPacedSender, (bool), (override));
100   MOCK_METHOD(void, IncludeOverheadInPacedSender, (), (override));
101   MOCK_METHOD(void, OnReceivedPacket, (const ReceivedPacket&), (override));
102 };
103 }  // namespace webrtc
104 #endif  // CALL_TEST_MOCK_RTP_TRANSPORT_CONTROLLER_SEND_H_
105