andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 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 <gmock/gmock.h> |
| 15 | |
| 16 | #include "modules/interface/module.h" |
| 17 | #include "modules/rtp_rtcp/interface/rtp_rtcp.h" |
| 18 | #include "modules/rtp_rtcp/interface/rtp_rtcp_defines.h" |
| 19 | |
| 20 | namespace webrtc { |
| 21 | |
| 22 | class MockRtpRtcp : public RtpRtcp { |
| 23 | public: |
| 24 | MOCK_METHOD1(ChangeUniqueId, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 25 | int32_t(const int32_t id)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 26 | MOCK_METHOD1(RegisterDefaultModule, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 27 | int32_t(RtpRtcp* module)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 28 | MOCK_METHOD0(DeRegisterDefaultModule, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 29 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 30 | MOCK_METHOD0(DefaultModuleRegistered, |
| 31 | bool()); |
| 32 | MOCK_METHOD0(NumberChildModules, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 33 | uint32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 34 | MOCK_METHOD1(RegisterSyncModule, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 35 | int32_t(RtpRtcp* module)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 36 | MOCK_METHOD0(DeRegisterSyncModule, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 37 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 38 | MOCK_METHOD0(InitReceiver, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 39 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 40 | MOCK_METHOD1(RegisterIncomingDataCallback, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 41 | int32_t(RtpData* incomingDataCallback)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 42 | MOCK_METHOD1(RegisterIncomingRTPCallback, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 43 | int32_t(RtpFeedback* incomingMessagesCallback)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 44 | MOCK_METHOD2(SetPacketTimeout, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 45 | int32_t(const uint32_t RTPtimeoutMS, const uint32_t RTCPtimeoutMS)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 46 | MOCK_METHOD2(SetPeriodicDeadOrAliveStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 47 | int32_t(const bool enable, const uint8_t sampleTimeSeconds)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 48 | MOCK_METHOD2(PeriodicDeadOrAliveStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 49 | int32_t(bool &enable, uint8_t &sampleTimeSeconds)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 50 | MOCK_METHOD1(RegisterReceivePayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 51 | int32_t(const CodecInst& voiceCodec)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 52 | MOCK_METHOD1(RegisterReceivePayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 53 | int32_t(const VideoCodec& videoCodec)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 54 | MOCK_METHOD2(ReceivePayloadType, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 55 | int32_t(const CodecInst& voiceCodec, int8_t* plType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 56 | MOCK_METHOD2(ReceivePayloadType, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 57 | int32_t(const VideoCodec& videoCodec, int8_t* plType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 58 | MOCK_METHOD1(DeRegisterReceivePayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 59 | int32_t(const int8_t payloadType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 60 | MOCK_METHOD2(RegisterReceiveRtpHeaderExtension, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 61 | int32_t(const RTPExtensionType type, const uint8_t id)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 62 | MOCK_METHOD1(DeregisterReceiveRtpHeaderExtension, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 63 | int32_t(const RTPExtensionType type)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 64 | MOCK_CONST_METHOD0(RemoteTimestamp, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 65 | uint32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 66 | MOCK_CONST_METHOD0(LocalTimeOfRemoteTimeStamp, |
| 67 | int64_t()); |
| 68 | MOCK_CONST_METHOD1(EstimatedRemoteTimeStamp, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 69 | int32_t(uint32_t& timestamp)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 70 | MOCK_CONST_METHOD0(RemoteSSRC, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 71 | uint32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 72 | MOCK_CONST_METHOD1(RemoteCSRCs, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 73 | int32_t(uint32_t arrOfCSRC[kRtpCsrcSize])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 74 | MOCK_CONST_METHOD1(SSRCFilter, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 75 | int32_t(uint32_t& allowedSSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 76 | MOCK_METHOD2(SetSSRCFilter, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 77 | int32_t(const bool enable, const uint32_t allowedSSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 78 | MOCK_METHOD2(SetRTXReceiveStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 79 | int32_t(const bool enable, const uint32_t SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 80 | MOCK_CONST_METHOD2(RTXReceiveStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 81 | int32_t(bool* enable, uint32_t* SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 82 | MOCK_METHOD2(IncomingPacket, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 83 | int32_t(const uint8_t* incomingPacket, const uint16_t packetLength)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 84 | MOCK_METHOD4(IncomingAudioNTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 85 | int32_t(const uint32_t audioReceivedNTPsecs, |
| 86 | const uint32_t audioReceivedNTPfrac, |
| 87 | const uint32_t audioRTCPArrivalTimeSecs, |
| 88 | const uint32_t audioRTCPArrivalTimeFrac)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 89 | MOCK_METHOD0(InitSender, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 90 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 91 | MOCK_METHOD1(RegisterSendTransport, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 92 | int32_t(Transport* outgoingTransport)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 93 | MOCK_METHOD1(SetMaxTransferUnit, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 94 | int32_t(const uint16_t size)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 95 | MOCK_METHOD3(SetTransportOverhead, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 96 | int32_t(const bool TCP, const bool IPV6, |
| 97 | const uint8_t authenticationOverhead)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 98 | MOCK_CONST_METHOD0(MaxPayloadLength, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 99 | uint16_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 100 | MOCK_CONST_METHOD0(MaxDataPayloadLength, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 101 | uint16_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 102 | MOCK_METHOD1(RegisterSendPayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 103 | int32_t(const CodecInst& voiceCodec)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 104 | MOCK_METHOD1(RegisterSendPayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 105 | int32_t(const VideoCodec& videoCodec)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 106 | MOCK_METHOD1(DeRegisterSendPayload, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 107 | int32_t(const int8_t payloadType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 108 | MOCK_METHOD2(RegisterSendRtpHeaderExtension, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 109 | int32_t(const RTPExtensionType type, const uint8_t id)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 110 | MOCK_METHOD1(DeregisterSendRtpHeaderExtension, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 111 | int32_t(const RTPExtensionType type)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 112 | MOCK_CONST_METHOD0(StartTimestamp, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 113 | uint32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 114 | MOCK_METHOD1(SetStartTimestamp, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 115 | int32_t(const uint32_t timestamp)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 116 | MOCK_CONST_METHOD0(SequenceNumber, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 117 | uint16_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 118 | MOCK_METHOD1(SetSequenceNumber, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 119 | int32_t(const uint16_t seq)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 120 | MOCK_CONST_METHOD0(SSRC, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 121 | uint32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 122 | MOCK_METHOD1(SetSSRC, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 123 | int32_t(const uint32_t ssrc)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 124 | MOCK_CONST_METHOD1(CSRCs, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 125 | int32_t(uint32_t arrOfCSRC[kRtpCsrcSize])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 126 | MOCK_METHOD2(SetCSRCs, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 127 | int32_t(const uint32_t arrOfCSRC[kRtpCsrcSize], const uint8_t arrLength)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 128 | MOCK_METHOD1(SetCSRCStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 129 | int32_t(const bool include)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 130 | MOCK_METHOD3(SetRTXSendStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 131 | int32_t(const RtxMode mode, const bool setSSRC, |
| 132 | const uint32_t SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 133 | MOCK_CONST_METHOD2(RTXSendStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 134 | int32_t(RtxMode* mode, uint32_t* SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 135 | MOCK_METHOD1(SetSendingStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 136 | int32_t(const bool sending)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 137 | MOCK_CONST_METHOD0(Sending, |
| 138 | bool()); |
| 139 | MOCK_METHOD1(SetSendingMediaStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 140 | int32_t(const bool sending)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 141 | MOCK_CONST_METHOD0(SendingMedia, |
| 142 | bool()); |
| 143 | MOCK_CONST_METHOD4(BitrateSent, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 144 | void(uint32_t* totalRate, uint32_t* videoRate, uint32_t* fecRate, uint32_t* nackRate)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 145 | MOCK_CONST_METHOD1(EstimatedReceiveBandwidth, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 146 | int(uint32_t* available_bandwidth)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 147 | MOCK_METHOD8(SendOutgoingData, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 148 | int32_t(const FrameType frameType, |
| 149 | const int8_t payloadType, |
| 150 | const uint32_t timeStamp, |
| 151 | int64_t capture_time_ms, |
| 152 | const uint8_t* payloadData, |
| 153 | const uint32_t payloadSize, |
| 154 | const RTPFragmentationHeader* fragmentation, |
| 155 | const RTPVideoHeader* rtpVideoHdr)); |
pwestin@webrtc.org | 32f05a7 | 2012-11-13 21:12:39 +0000 | [diff] [blame] | 156 | MOCK_METHOD3(TimeToSendPacket, |
| 157 | void(uint32_t ssrc, uint16_t sequence_number, int64_t capture_time_ms)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 158 | MOCK_METHOD3(RegisterRtcpObservers, |
| 159 | void(RtcpIntraFrameObserver* intraFrameCallback, |
| 160 | RtcpBandwidthObserver* bandwidthCallback, |
| 161 | RtcpFeedback* callback)); |
| 162 | MOCK_CONST_METHOD0(RTCP, |
| 163 | RTCPMethod()); |
| 164 | MOCK_METHOD1(SetRTCPStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 165 | int32_t(const RTCPMethod method)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 166 | MOCK_METHOD1(SetCNAME, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 167 | int32_t(const char cName[RTCP_CNAME_SIZE])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 168 | MOCK_METHOD1(CNAME, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 169 | int32_t(char cName[RTCP_CNAME_SIZE])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 170 | MOCK_CONST_METHOD2(RemoteCNAME, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 171 | int32_t(const uint32_t remoteSSRC, |
| 172 | char cName[RTCP_CNAME_SIZE])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 173 | MOCK_CONST_METHOD5(RemoteNTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 174 | int32_t(uint32_t *ReceivedNTPsecs, |
| 175 | uint32_t *ReceivedNTPfrac, |
| 176 | uint32_t *RTCPArrivalTimeSecs, |
| 177 | uint32_t *RTCPArrivalTimeFrac, |
| 178 | uint32_t *rtcp_timestamp)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 179 | MOCK_METHOD2(AddMixedCNAME, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 180 | int32_t(const uint32_t SSRC, |
| 181 | const char cName[RTCP_CNAME_SIZE])); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 182 | MOCK_METHOD1(RemoveMixedCNAME, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 183 | int32_t(const uint32_t SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 184 | MOCK_CONST_METHOD5(RTT, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 185 | int32_t(const uint32_t remoteSSRC, uint16_t* RTT, uint16_t* avgRTT, uint16_t* minRTT, uint16_t* maxRTT)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 186 | MOCK_METHOD1(ResetRTT, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 187 | int32_t(const uint32_t remoteSSRC)); |
mflodman@webrtc.org | 6318790 | 2012-11-26 12:40:15 +0000 | [diff] [blame] | 188 | MOCK_METHOD1(SetRtt, void(uint32_t rtt)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 189 | MOCK_METHOD1(SendRTCP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 190 | int32_t(uint32_t rtcpPacketType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 191 | MOCK_METHOD1(SendRTCPReferencePictureSelection, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 192 | int32_t(const uint64_t pictureID)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 193 | MOCK_METHOD1(SendRTCPSliceLossIndication, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 194 | int32_t(const uint8_t pictureID)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 195 | MOCK_METHOD0(ResetStatisticsRTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 196 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 197 | MOCK_CONST_METHOD5(StatisticsRTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 198 | int32_t(uint8_t *fraction_lost, uint32_t *cum_lost, uint32_t *ext_max, uint32_t *jitter, uint32_t *max_jitter)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 199 | MOCK_METHOD0(ResetReceiveDataCountersRTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 200 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 201 | MOCK_METHOD0(ResetSendDataCountersRTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 202 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 203 | MOCK_CONST_METHOD4(DataCountersRTP, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 204 | int32_t(uint32_t *bytesSent, uint32_t *packetsSent, uint32_t *bytesReceived, uint32_t *packetsReceived)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 205 | MOCK_METHOD1(RemoteRTCPStat, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 206 | int32_t(RTCPSenderInfo* senderInfo)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 207 | MOCK_CONST_METHOD1(RemoteRTCPStat, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 208 | int32_t(std::vector<RTCPReportBlock>* receiveBlocks)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 209 | MOCK_METHOD2(AddRTCPReportBlock, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 210 | int32_t(const uint32_t SSRC, const RTCPReportBlock* receiveBlock)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 211 | MOCK_METHOD1(RemoveRTCPReportBlock, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 212 | int32_t(const uint32_t SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 213 | MOCK_METHOD4(SetRTCPApplicationSpecificData, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 214 | int32_t(const uint8_t subType, const uint32_t name, const uint8_t* data, const uint16_t length)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 215 | MOCK_METHOD1(SetRTCPVoIPMetrics, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 216 | int32_t(const RTCPVoIPMetric* VoIPMetric)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 217 | MOCK_CONST_METHOD0(REMB, |
| 218 | bool()); |
| 219 | MOCK_METHOD1(SetREMBStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 220 | int32_t(const bool enable)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 221 | MOCK_METHOD3(SetREMBData, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 222 | int32_t(const uint32_t bitrate, const uint8_t numberOfSSRC, const uint32_t* SSRC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 223 | MOCK_METHOD1(SetRemoteBitrateObserver, |
| 224 | bool(RemoteBitrateObserver*)); |
| 225 | MOCK_CONST_METHOD0(IJ, |
| 226 | bool()); |
| 227 | MOCK_METHOD1(SetIJStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 228 | int32_t(const bool)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 229 | MOCK_CONST_METHOD0(TMMBR, |
| 230 | bool()); |
| 231 | MOCK_METHOD1(SetTMMBRStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 232 | int32_t(const bool enable)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 233 | MOCK_METHOD1(OnBandwidthEstimateUpdate, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 234 | void(uint16_t bandWidthKbit)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 235 | MOCK_CONST_METHOD0(NACK, |
| 236 | NACKMethod()); |
stefan@webrtc.org | a7761c7 | 2013-02-01 15:09:57 +0000 | [diff] [blame] | 237 | MOCK_METHOD2(SetNACKStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 238 | int32_t(const NACKMethod method, int oldestSequenceNumberToNack)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 239 | MOCK_CONST_METHOD0(SelectiveRetransmissions, |
| 240 | int()); |
| 241 | MOCK_METHOD1(SetSelectiveRetransmissions, |
| 242 | int(uint8_t settings)); |
| 243 | MOCK_METHOD2(SendNACK, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 244 | int32_t(const uint16_t* nackList, const uint16_t size)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 245 | MOCK_METHOD2(SetStorePacketsStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 246 | int32_t(const bool enable, const uint16_t numberToStore)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 247 | MOCK_METHOD1(RegisterAudioCallback, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 248 | int32_t(RtpAudioFeedback* messagesCallback)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 249 | MOCK_METHOD1(SetAudioPacketSize, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 250 | int32_t(const uint16_t packetSizeSamples)); |
turaj@webrtc.org | d4caede | 2013-03-12 22:27:27 +0000 | [diff] [blame] | 251 | MOCK_METHOD1(SetTelephoneEventForwardToDecoder, int(bool forwardToDecoder)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 252 | MOCK_CONST_METHOD0(TelephoneEventForwardToDecoder, |
| 253 | bool()); |
| 254 | MOCK_CONST_METHOD1(SendTelephoneEventActive, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 255 | bool(int8_t& telephoneEvent)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 256 | MOCK_METHOD3(SendTelephoneEventOutband, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 257 | int32_t(const uint8_t key, const uint16_t time_ms, const uint8_t level)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 258 | MOCK_METHOD1(SetSendREDPayloadType, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 259 | int32_t(const int8_t payloadType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 260 | MOCK_CONST_METHOD1(SendREDPayloadType, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 261 | int32_t(int8_t& payloadType)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 262 | MOCK_METHOD2(SetRTPAudioLevelIndicationStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 263 | int32_t(const bool enable, const uint8_t ID)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 264 | MOCK_CONST_METHOD2(GetRTPAudioLevelIndicationStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 265 | int32_t(bool& enable, uint8_t& ID)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 266 | MOCK_METHOD1(SetAudioLevel, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 267 | int32_t(const uint8_t level_dBov)); |
stefan@webrtc.org | 41e3677 | 2013-04-09 14:56:29 +0000 | [diff] [blame^] | 268 | MOCK_METHOD1(SetCameraDelay, |
| 269 | int32_t(const int32_t delayMS)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 270 | MOCK_METHOD1(SetTargetSendBitrate, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 271 | void(const uint32_t bitrate)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 272 | MOCK_METHOD3(SetGenericFECStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 273 | int32_t(const bool enable, const uint8_t payloadTypeRED, const uint8_t payloadTypeFEC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 274 | MOCK_METHOD3(GenericFECStatus, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 275 | int32_t(bool& enable, uint8_t& payloadTypeRED, uint8_t& payloadTypeFEC)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 276 | MOCK_METHOD2(SetFecParameters, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 277 | int32_t(const FecProtectionParams* delta_params, |
| 278 | const FecProtectionParams* key_params)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 279 | MOCK_METHOD1(SetKeyFrameRequestMethod, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 280 | int32_t(const KeyFrameRequestMethod method)); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 281 | MOCK_METHOD0(RequestKeyFrame, |
pbos@webrtc.org | 771774f | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 282 | int32_t()); |
andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 283 | MOCK_CONST_METHOD3(Version, |
| 284 | int32_t(char* version, uint32_t& remaining_buffer_in_bytes, uint32_t& position)); |
| 285 | MOCK_METHOD0(TimeUntilNextProcess, |
| 286 | int32_t()); |
| 287 | MOCK_METHOD0(Process, |
| 288 | int32_t()); |
| 289 | |
| 290 | // Members. |
| 291 | unsigned int remote_ssrc_; |
| 292 | }; |
| 293 | |
| 294 | } // namespace webrtc |
| 295 | |
| 296 | #endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ |