OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 MOCK_METHOD3(ReceivedRTPPacket, | 120 MOCK_METHOD3(ReceivedRTPPacket, |
121 int(int channel, const void* data, size_t length)); | 121 int(int channel, const void* data, size_t length)); |
122 MOCK_METHOD4(ReceivedRTPPacket, | 122 MOCK_METHOD4(ReceivedRTPPacket, |
123 int(int channel, | 123 int(int channel, |
124 const void* data, | 124 const void* data, |
125 size_t length, | 125 size_t length, |
126 const PacketTime& packet_time)); | 126 const PacketTime& packet_time)); |
127 MOCK_METHOD3(ReceivedRTCPPacket, | 127 MOCK_METHOD3(ReceivedRTCPPacket, |
128 int(int channel, const void* data, size_t length)); | 128 int(int channel, const void* data, size_t length)); |
129 | 129 |
130 // VoERTP_RTCP | |
131 MOCK_METHOD2(SetLocalSSRC, int(int channel, unsigned int ssrc)); | |
132 MOCK_METHOD2(GetLocalSSRC, int(int channel, unsigned int& ssrc)); | |
133 MOCK_METHOD2(GetRemoteSSRC, int(int channel, unsigned int& ssrc)); | |
134 MOCK_METHOD3(SetSendAudioLevelIndicationStatus, | |
135 int(int channel, bool enable, unsigned char id)); | |
136 MOCK_METHOD3(SetReceiveAudioLevelIndicationStatus, | |
137 int(int channel, bool enable, unsigned char id)); | |
138 MOCK_METHOD3(SetSendAbsoluteSenderTimeStatus, | |
139 int(int channel, bool enable, unsigned char id)); | |
140 MOCK_METHOD3(SetReceiveAbsoluteSenderTimeStatus, | |
141 int(int channel, bool enable, unsigned char id)); | |
142 MOCK_METHOD2(SetRTCPStatus, int(int channel, bool enable)); | |
143 MOCK_METHOD2(GetRTCPStatus, int(int channel, bool& enabled)); | |
144 MOCK_METHOD2(SetRTCP_CNAME, int(int channel, const char cName[256])); | |
145 MOCK_METHOD2(GetRTCP_CNAME, int(int channel, char cName[256])); | |
146 MOCK_METHOD2(GetRemoteRTCP_CNAME, int(int channel, char cName[256])); | |
147 MOCK_METHOD7(GetRemoteRTCPData, | |
148 int(int channel, | |
149 unsigned int& NTPHigh, | |
150 unsigned int& NTPLow, | |
151 unsigned int& timestamp, | |
152 unsigned int& playoutTimestamp, | |
153 unsigned int* jitter, | |
154 unsigned short* fraction_lost)); | |
155 MOCK_METHOD4(GetRTPStatistics, | |
156 int(int channel, | |
157 unsigned int& averageJitterMs, | |
158 unsigned int& maxJitterMs, | |
159 unsigned int& discardedPackets)); | |
160 MOCK_METHOD2(GetRTCPStatistics, int(int channel, CallStatistics& stats)); | |
161 MOCK_METHOD2(GetRemoteRTCPReportBlocks, | |
162 int(int channel, std::vector<ReportBlock>* receive_blocks)); | |
163 MOCK_METHOD3(SetREDStatus, int(int channel, bool enable, int redPayloadtype)); | |
164 MOCK_METHOD3(GetREDStatus, | |
165 int(int channel, bool& enable, int& redPayloadtype)); | |
166 MOCK_METHOD3(SetNACKStatus, int(int channel, bool enable, int maxNoPackets)); | |
167 | |
168 private: | 130 private: |
169 // TODO(ossu): I'm not particularly happy about keeping the decoder factory | 131 // TODO(ossu): I'm not particularly happy about keeping the decoder factory |
170 // here, but due to how gmock is implemented, I cannot just keep it in the | 132 // here, but due to how gmock is implemented, I cannot just keep it in the |
171 // functor implementing the default version of ChannelProxyFactory, above. | 133 // functor implementing the default version of ChannelProxyFactory, above. |
172 // GMock creates an unfortunate copy of the functor, which would cause us to | 134 // GMock creates an unfortunate copy of the functor, which would cause us to |
173 // return a dangling reference. Fortunately, this should go away once | 135 // return a dangling reference. Fortunately, this should go away once |
174 // voe::Channel does. | 136 // voe::Channel does. |
175 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 137 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
176 | 138 |
177 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_; | 139 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_; |
178 | 140 |
179 MockAudioDeviceModule mock_audio_device_; | 141 MockAudioDeviceModule mock_audio_device_; |
180 MockAudioTransport mock_audio_transport_; | 142 MockAudioTransport mock_audio_transport_; |
181 }; | 143 }; |
182 } // namespace test | 144 } // namespace test |
183 } // namespace webrtc | 145 } // namespace webrtc |
184 | 146 |
185 #endif // AUDIO_MOCK_VOICE_ENGINE_H_ | 147 #endif // AUDIO_MOCK_VOICE_ENGINE_H_ |
OLD | NEW |