Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: webrtc/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @ 0:4bda6873e34c

pub_scrub_3792 tip
Last change on this file since 0:4bda6873e34c was 0:4bda6873e34c, checked in by Michael Prittie <mprittie@…>, 6 years ago

Scrubbed password for publication.

File size: 10.1 KB
Line 
1/*
2 *  Copyright (c) 2012 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 WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_
12#define WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_
13
14#include "testing/gmock/include/gmock/gmock.h"
15
16#include "webrtc/modules/interface/module.h"
17#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
18#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
19
20namespace webrtc {
21
22class MockRtpRtcp : public RtpRtcp {
23 public:
24  MOCK_METHOD1(ChangeUniqueId,
25      int32_t(const int32_t id));
26  MOCK_METHOD1(RegisterDefaultModule,
27      int32_t(RtpRtcp* module));
28  MOCK_METHOD0(DeRegisterDefaultModule,
29      int32_t());
30  MOCK_METHOD0(DefaultModuleRegistered,
31      bool());
32  MOCK_METHOD0(NumberChildModules,
33      uint32_t());
34  MOCK_METHOD1(RegisterSyncModule,
35      int32_t(RtpRtcp* module));
36  MOCK_METHOD0(DeRegisterSyncModule,
37      int32_t());
38  MOCK_METHOD2(IncomingRtcpPacket,
39      int32_t(const uint8_t* incomingPacket, uint16_t packetLength));
40  MOCK_METHOD1(SetRemoteSSRC, void(const uint32_t ssrc));
41  MOCK_METHOD4(IncomingAudioNTP,
42      int32_t(const uint32_t audioReceivedNTPsecs,
43              const uint32_t audioReceivedNTPfrac,
44              const uint32_t audioRTCPArrivalTimeSecs,
45              const uint32_t audioRTCPArrivalTimeFrac));
46  MOCK_METHOD0(InitSender,
47      int32_t());
48  MOCK_METHOD1(RegisterSendTransport,
49      int32_t(Transport* outgoingTransport));
50  MOCK_METHOD1(SetMaxTransferUnit,
51      int32_t(const uint16_t size));
52  MOCK_METHOD3(SetTransportOverhead,
53      int32_t(const bool TCP, const bool IPV6,
54              const uint8_t authenticationOverhead));
55  MOCK_CONST_METHOD0(MaxPayloadLength,
56      uint16_t());
57  MOCK_CONST_METHOD0(MaxDataPayloadLength,
58      uint16_t());
59  MOCK_METHOD1(RegisterSendPayload,
60      int32_t(const CodecInst& voiceCodec));
61  MOCK_METHOD1(RegisterSendPayload,
62      int32_t(const VideoCodec& videoCodec));
63  MOCK_METHOD1(DeRegisterSendPayload,
64      int32_t(const int8_t payloadType));
65  MOCK_METHOD2(RegisterSendRtpHeaderExtension,
66      int32_t(const RTPExtensionType type, const uint8_t id));
67  MOCK_METHOD1(DeregisterSendRtpHeaderExtension,
68      int32_t(const RTPExtensionType type));
69  MOCK_CONST_METHOD0(StartTimestamp,
70      uint32_t());
71  MOCK_METHOD1(SetStartTimestamp,
72      int32_t(const uint32_t timestamp));
73  MOCK_CONST_METHOD0(SequenceNumber,
74      uint16_t());
75  MOCK_METHOD1(SetSequenceNumber,
76      int32_t(const uint16_t seq));
77  MOCK_CONST_METHOD0(SSRC,
78      uint32_t());
79  MOCK_METHOD1(SetSSRC,
80      int32_t(const uint32_t ssrc));
81  MOCK_CONST_METHOD1(CSRCs,
82      int32_t(uint32_t arrOfCSRC[kRtpCsrcSize]));
83  MOCK_METHOD2(SetCSRCs,
84      int32_t(const uint32_t arrOfCSRC[kRtpCsrcSize], const uint8_t arrLength));
85  MOCK_METHOD1(SetCSRCStatus,
86      int32_t(const bool include));
87  MOCK_METHOD3(SetRTXSendStatus,
88      int32_t(int modes, bool setSSRC, uint32_t ssrc));
89  MOCK_CONST_METHOD3(RTXSendStatus,
90      int32_t(int* modes, uint32_t* ssrc, int* payload_type));
91  MOCK_METHOD1(SetRtxSendPayloadType,
92      void(int));
93  MOCK_METHOD1(SetSendingStatus,
94      int32_t(const bool sending));
95  MOCK_CONST_METHOD0(Sending,
96      bool());
97  MOCK_METHOD1(SetSendingMediaStatus,
98      int32_t(const bool sending));
99  MOCK_CONST_METHOD0(SendingMedia,
100      bool());
101  MOCK_CONST_METHOD4(BitrateSent,
102      void(uint32_t* totalRate, uint32_t* videoRate, uint32_t* fecRate, uint32_t* nackRate));
103  MOCK_CONST_METHOD1(EstimatedReceiveBandwidth,
104      int(uint32_t* available_bandwidth));
105  MOCK_METHOD8(SendOutgoingData,
106      int32_t(const FrameType frameType,
107              const int8_t payloadType,
108              const uint32_t timeStamp,
109              int64_t capture_time_ms,
110              const uint8_t* payloadData,
111              const uint32_t payloadSize,
112              const RTPFragmentationHeader* fragmentation,
113              const RTPVideoHeader* rtpVideoHdr));
114  MOCK_METHOD4(TimeToSendPacket,
115      bool(uint32_t ssrc, uint16_t sequence_number, int64_t capture_time_ms,
116           bool retransmission));
117  MOCK_METHOD1(TimeToSendPadding,
118      int(int bytes));
119  MOCK_CONST_METHOD2(GetSendSideDelay,
120      bool(int* avg_send_delay_ms, int* max_send_delay_ms));
121  MOCK_METHOD3(RegisterRtcpObservers,
122      void(RtcpIntraFrameObserver* intraFrameCallback,
123           RtcpBandwidthObserver* bandwidthCallback,
124           RtcpFeedback* callback));
125  MOCK_CONST_METHOD0(RTCP,
126      RTCPMethod());
127  MOCK_METHOD1(SetRTCPStatus,
128      int32_t(const RTCPMethod method));
129  MOCK_METHOD1(SetCNAME,
130      int32_t(const char cName[RTCP_CNAME_SIZE]));
131  MOCK_METHOD1(CNAME,
132      int32_t(char cName[RTCP_CNAME_SIZE]));
133  MOCK_CONST_METHOD2(RemoteCNAME,
134      int32_t(const uint32_t remoteSSRC,
135              char cName[RTCP_CNAME_SIZE]));
136  MOCK_CONST_METHOD5(RemoteNTP,
137      int32_t(uint32_t *ReceivedNTPsecs,
138              uint32_t *ReceivedNTPfrac,
139              uint32_t *RTCPArrivalTimeSecs,
140              uint32_t *RTCPArrivalTimeFrac,
141              uint32_t *rtcp_timestamp));
142  MOCK_METHOD2(AddMixedCNAME,
143      int32_t(const uint32_t SSRC,
144              const char cName[RTCP_CNAME_SIZE]));
145  MOCK_METHOD1(RemoveMixedCNAME,
146      int32_t(const uint32_t SSRC));
147  MOCK_CONST_METHOD5(RTT,
148      int32_t(const uint32_t remoteSSRC, uint16_t* RTT, uint16_t* avgRTT, uint16_t* minRTT, uint16_t* maxRTT));
149  MOCK_METHOD1(ResetRTT,
150      int32_t(const uint32_t remoteSSRC));
151  MOCK_METHOD1(SendRTCP,
152      int32_t(uint32_t rtcpPacketType));
153  MOCK_METHOD1(SendRTCPReferencePictureSelection,
154      int32_t(const uint64_t pictureID));
155  MOCK_METHOD1(SendRTCPSliceLossIndication,
156      int32_t(const uint8_t pictureID));
157  MOCK_METHOD0(ResetSendDataCountersRTP,
158      int32_t());
159  MOCK_CONST_METHOD2(DataCountersRTP,
160      int32_t(uint32_t *bytesSent, uint32_t *packetsSent));
161  MOCK_METHOD1(RemoteRTCPStat,
162      int32_t(RTCPSenderInfo* senderInfo));
163  MOCK_CONST_METHOD1(RemoteRTCPStat,
164      int32_t(std::vector<RTCPReportBlock>* receiveBlocks));
165  MOCK_METHOD2(AddRTCPReportBlock,
166      int32_t(const uint32_t SSRC, const RTCPReportBlock* receiveBlock));
167  MOCK_METHOD1(RemoveRTCPReportBlock,
168      int32_t(const uint32_t SSRC));
169  MOCK_METHOD4(SetRTCPApplicationSpecificData,
170      int32_t(const uint8_t subType, const uint32_t name, const uint8_t* data, const uint16_t length));
171  MOCK_METHOD1(SetRTCPVoIPMetrics,
172      int32_t(const RTCPVoIPMetric* VoIPMetric));
173  MOCK_METHOD1(SetRtcpXrRrtrStatus,
174      void(bool enable));
175  MOCK_CONST_METHOD0(RtcpXrRrtrStatus,
176      bool());
177  MOCK_CONST_METHOD0(REMB,
178      bool());
179  MOCK_METHOD1(SetREMBStatus,
180      int32_t(const bool enable));
181  MOCK_METHOD3(SetREMBData,
182      int32_t(const uint32_t bitrate, const uint8_t numberOfSSRC, const uint32_t* SSRC));
183  MOCK_CONST_METHOD0(IJ,
184      bool());
185  MOCK_METHOD1(SetIJStatus,
186      int32_t(const bool));
187  MOCK_CONST_METHOD0(TMMBR,
188      bool());
189  MOCK_METHOD1(SetTMMBRStatus,
190      int32_t(const bool enable));
191  MOCK_METHOD1(OnBandwidthEstimateUpdate,
192      void(uint16_t bandWidthKbit));
193  MOCK_CONST_METHOD0(NACK,
194      NACKMethod());
195  MOCK_METHOD2(SetNACKStatus,
196      int32_t(const NACKMethod method, int oldestSequenceNumberToNack));
197  MOCK_CONST_METHOD0(SelectiveRetransmissions,
198      int());
199  MOCK_METHOD1(SetSelectiveRetransmissions,
200      int(uint8_t settings));
201  MOCK_METHOD2(SendNACK,
202      int32_t(const uint16_t* nackList, const uint16_t size));
203  MOCK_METHOD2(SetStorePacketsStatus,
204      int32_t(const bool enable, const uint16_t numberToStore));
205  MOCK_CONST_METHOD0(StorePackets, bool());
206  MOCK_METHOD1(RegisterSendChannelRtcpStatisticsCallback,
207               void(RtcpStatisticsCallback*));
208  MOCK_METHOD0(GetSendChannelRtcpStatisticsCallback,
209               RtcpStatisticsCallback*());
210  MOCK_METHOD1(RegisterAudioCallback,
211      int32_t(RtpAudioFeedback* messagesCallback));
212  MOCK_METHOD1(SetAudioPacketSize,
213      int32_t(const uint16_t packetSizeSamples));
214  MOCK_CONST_METHOD1(SendTelephoneEventActive,
215      bool(int8_t& telephoneEvent));
216  MOCK_METHOD3(SendTelephoneEventOutband,
217      int32_t(const uint8_t key, const uint16_t time_ms, const uint8_t level));
218  MOCK_METHOD1(SetSendREDPayloadType,
219      int32_t(const int8_t payloadType));
220  MOCK_CONST_METHOD1(SendREDPayloadType,
221      int32_t(int8_t& payloadType));
222  MOCK_METHOD2(SetRTPAudioLevelIndicationStatus,
223      int32_t(const bool enable, const uint8_t ID));
224  MOCK_CONST_METHOD2(GetRTPAudioLevelIndicationStatus,
225      int32_t(bool& enable, uint8_t& ID));
226  MOCK_METHOD1(SetAudioLevel,
227      int32_t(const uint8_t level_dBov));
228  MOCK_METHOD1(SetCameraDelay,
229      int32_t(const int32_t delayMS));
230  MOCK_METHOD1(SetTargetSendBitrate,
231      void(const std::vector<uint32_t>& stream_bitrates));
232  MOCK_METHOD3(SetGenericFECStatus,
233      int32_t(const bool enable, const uint8_t payloadTypeRED, const uint8_t payloadTypeFEC));
234  MOCK_METHOD3(GenericFECStatus,
235      int32_t(bool& enable, uint8_t& payloadTypeRED, uint8_t& payloadTypeFEC));
236  MOCK_METHOD2(SetFecParameters,
237      int32_t(const FecProtectionParams* delta_params,
238              const FecProtectionParams* key_params));
239  MOCK_METHOD1(SetKeyFrameRequestMethod,
240      int32_t(const KeyFrameRequestMethod method));
241  MOCK_METHOD0(RequestKeyFrame,
242      int32_t());
243  MOCK_CONST_METHOD3(Version,
244      int32_t(char* version, uint32_t& remaining_buffer_in_bytes, uint32_t& position));
245  MOCK_METHOD0(TimeUntilNextProcess,
246        int32_t());
247  MOCK_METHOD0(Process,
248        int32_t());
249  MOCK_METHOD1(RegisterSendFrameCountObserver,
250      void(FrameCountObserver*));
251  MOCK_CONST_METHOD0(GetSendFrameCountObserver,
252      FrameCountObserver*(void));
253  MOCK_METHOD1(RegisterSendChannelRtpStatisticsCallback,
254      void(StreamDataCountersCallback*));
255  MOCK_CONST_METHOD0(GetSendChannelRtpStatisticsCallback,
256      StreamDataCountersCallback*(void));
257  // Members.
258  unsigned int remote_ssrc_;
259};
260
261}  // namespace webrtc
262
263#endif  // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_
Note: See TracBrowser for help on using the repository browser.