Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Side by Side Diff: webrtc/test/fake_voice_engine.h

Issue 1414743004: Implement AudioSendStream::GetStats(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: TODOs Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« webrtc/audio/audio_send_stream.cc ('K') | « webrtc/call/call.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #ifndef WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_ 11 #ifndef WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_
12 #define WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_ 12 #define WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 #include "webrtc/voice_engine/voice_engine_impl.h" 18 #include "webrtc/voice_engine/voice_engine_impl.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 namespace test { 21 namespace test {
22 22
23 // NOTE: This class inherits from VoiceEngineImpl so that its clients will be 23 // NOTE: This class inherits from VoiceEngineImpl so that its clients will be
24 // able to get the various interfaces as usual, via T::GetInterface(). 24 // able to get the various interfaces as usual, via T::GetInterface().
25 class FakeVoiceEngine final : public VoiceEngineImpl { 25 class FakeVoiceEngine final : public VoiceEngineImpl {
26 public: 26 public:
27 const int kSendChannelId = 1; 27 const int kSendChannelId = 1;
28 const int kReceiveChannelId = 2; 28 const int kRecvChannelId = 2;
tommi 2015/10/23 12:50:37 I think these should all be static and be referenc
the sun 2015/10/23 15:14:17 Ok, you get the .cc :)
29 29 const uint32_t kSendSsrc = 665;
30 const uint32_t kRecvSsrc = 667;
31 const int kSendEchoDelayMedian = 254;
32 const int kSendEchoDelayStdDev = -3;
33 const int kSendEchoReturnLoss = -65;
34 const int kSendEchoReturnLossEnhancement = 101;
30 const int kRecvJitterBufferDelay = -7; 35 const int kRecvJitterBufferDelay = -7;
31 const int kRecvPlayoutBufferDelay = 302; 36 const int kRecvPlayoutBufferDelay = 302;
37 const unsigned int kSendSpeechInputLevel = 96;
32 const unsigned int kRecvSpeechOutputLevel = 99; 38 const unsigned int kRecvSpeechOutputLevel = 99;
33 39
34 FakeVoiceEngine() : VoiceEngineImpl(new Config(), true) { 40 FakeVoiceEngine() : VoiceEngineImpl(new Config(), true) {
35 // Increase ref count so this object isn't automatically deleted whenever 41 // Increase ref count so this object isn't automatically deleted whenever
36 // interfaces are Release():d. 42 // interfaces are Release():d.
37 ++_ref_count; 43 ++_ref_count;
38 } 44 }
39 ~FakeVoiceEngine() override { 45 ~FakeVoiceEngine() override {
40 // Decrease ref count before base class d-tor is called; otherwise it will 46 // Decrease ref count before base class d-tor is called; otherwise it will
41 // trigger an assertion. 47 // trigger an assertion.
42 --_ref_count; 48 --_ref_count;
43 } 49 }
44 50
51 const CallStatistics& GetSendCallStats() const {
52 static const CallStatistics kStats = {
tommi 2015/10/23 12:50:37 I'm a bit on the fence whether using statics like
the sun 2015/10/23 15:14:17 I've made this static const structs and moved them
kwiberg-webrtc 2015/10/25 02:07:43 CallStatistics looks like a POD to me (if I'm look
the sun 2015/10/26 09:11:02 So now that the structs are static const members o
53 1345, 1678, 1901, 1234, 112, 13456, 17890, 1567, -1890, -1123
54 };
55 return kStats;
56 }
57
58 const CodecInst& GetSendCodecInst() const {
59 static const CodecInst kStats = {
60 -121, "codec_name_send", 48000, -231, -451, -671
61 };
62 return kStats;
63 }
64
65 const ReportBlock& GetSendReportBlock() const {
66 static const ReportBlock kBlock = {
67 456, 780, 123, 567, 890, 132, 143, 13354
68 };
69 return kBlock;
70 }
71
45 const CallStatistics& GetRecvCallStats() const { 72 const CallStatistics& GetRecvCallStats() const {
46 static const CallStatistics kStats = { 73 static const CallStatistics kStats = {
47 345, 678, 901, 234, -1, 0, 0, 567, 890, 123 74 345, 678, 901, 234, -12, 3456, 7890, 567, 890, 123
48 }; 75 };
49 return kStats; 76 return kStats;
50 } 77 }
51 78
52 const CodecInst& GetRecvRecCodecInst() const { 79 const CodecInst& GetRecvCodecInst() const {
53 static const CodecInst kStats = { 80 static const CodecInst kStats = {
54 123, "codec_name", 96000, -1, -1, -1 81 123, "codec_name_recv", 96000, -187, -198, -103
55 }; 82 };
56 return kStats; 83 return kStats;
57 } 84 }
58 85
59 const NetworkStatistics& GetRecvNetworkStats() const { 86 const NetworkStatistics& GetRecvNetworkStats() const {
60 static const NetworkStatistics kStats = { 87 static const NetworkStatistics kStats = {
61 123, 456, false, 0, 0, 789, 12, 345, 678, 901, -1, -1, -1, -1, -1, 0 88 123, 456, false, 0, 0, 789, 12, 345, 678, 901, -1, -1, -1, -1, -1, 0
62 }; 89 };
63 return kStats; 90 return kStats;
64 } 91 }
65 92
66 const AudioDecodingCallStats& GetRecvAudioDecodingCallStats() const { 93 const AudioDecodingCallStats& GetRecvAudioDecodingCallStats() const {
67 static AudioDecodingCallStats stats; 94 static AudioDecodingCallStats stats;
68 if (stats.calls_to_silence_generator == 0) { 95 if (stats.calls_to_silence_generator == 0) {
69 stats.calls_to_silence_generator = 234; 96 stats.calls_to_silence_generator = 234;
70 stats.calls_to_neteq = 567; 97 stats.calls_to_neteq = 567;
71 stats.decoded_normal = 890; 98 stats.decoded_normal = 890;
72 stats.decoded_plc = 123; 99 stats.decoded_plc = 123;
73 stats.decoded_cng = 456; 100 stats.decoded_cng = 456;
74 stats.decoded_plc_cng = 789; 101 stats.decoded_plc_cng = 789;
75 } 102 }
76 return stats; 103 return stats;
77 } 104 }
78 105
106 // VoEAudioProcessing
107 int SetNsStatus(bool enable, NsModes mode = kNsUnchanged) override {
108 return -1;
109 }
110 int GetNsStatus(bool& enabled, NsModes& mode) override { return -1; }
111 int SetAgcStatus(bool enable, AgcModes mode = kAgcUnchanged) override {
112 return -1;
113 }
114 int GetAgcStatus(bool& enabled, AgcModes& mode) override { return -1; }
115 int SetAgcConfig(AgcConfig config) override { return -1; }
116 int GetAgcConfig(AgcConfig& config) override { return -1; }
117 int SetEcStatus(bool enable, EcModes mode = kEcUnchanged) override {
118 return -1;
119 }
120 int GetEcStatus(bool& enabled, EcModes& mode) override { return -1; }
121 int EnableDriftCompensation(bool enable) override { return -1; }
122 bool DriftCompensationEnabled() override { return false; }
123 void SetDelayOffsetMs(int offset) override {}
124 int DelayOffsetMs() override { return -1; }
125 int SetAecmMode(AecmModes mode = kAecmSpeakerphone,
126 bool enableCNG = true) override { return -1; }
127 int GetAecmMode(AecmModes& mode, bool& enabledCNG) override { return -1; }
128 int EnableHighPassFilter(bool enable) override { return -1; }
129 bool IsHighPassFilterEnabled() override { return false; }
130 int SetRxNsStatus(int channel,
131 bool enable,
132 NsModes mode = kNsUnchanged) override { return -1; }
133 int GetRxNsStatus(int channel, bool& enabled, NsModes& mode) override {
134 return -1;
135 }
136 int SetRxAgcStatus(int channel,
137 bool enable,
138 AgcModes mode = kAgcUnchanged) override { return -1; }
139 int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode) override {
140 return -1;
141 }
142 int SetRxAgcConfig(int channel, AgcConfig config) override { return -1; }
143 int GetRxAgcConfig(int channel, AgcConfig& config) override { return -1; }
144 int RegisterRxVadObserver(int channel,
145 VoERxVadCallback& observer) override { return -1; }
146 int DeRegisterRxVadObserver(int channel) override { return -1; }
147 int VoiceActivityIndicator(int channel) override { return -1; }
148 int SetEcMetricsStatus(bool enable) override { return -1; }
149 int GetEcMetricsStatus(bool& enabled) override {
150 enabled = true;
151 return 0;
152 }
153 int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP) override {
154 ERL = kSendEchoReturnLoss;
155 ERLE = kSendEchoReturnLossEnhancement;
156 RERL = -123456789;
157 A_NLP = 123456789;
158 return 0;
159 }
160 int GetEcDelayMetrics(int& delay_median,
161 int& delay_std,
162 float& fraction_poor_delays) override {
163 delay_median = kSendEchoDelayMedian;
164 delay_std = kSendEchoDelayStdDev;
165 fraction_poor_delays = -12345.7890;
166 return 0;
167 }
168 int StartDebugRecording(const char* fileNameUTF8) override { return -1; }
169 int StartDebugRecording(FILE* file_handle) override { return -1; }
170 int StopDebugRecording() override { return -1; }
171 int SetTypingDetectionStatus(bool enable) override { return -1; }
172 int GetTypingDetectionStatus(bool& enabled) override { return -1; }
173 int TimeSinceLastTyping(int& seconds) override { return -1; }
174 int SetTypingDetectionParameters(int timeWindow,
175 int costPerTyping,
176 int reportingThreshold,
177 int penaltyDecay,
178 int typeEventDelay = 0) override {
179 return -1;
180 }
181 void EnableStereoChannelSwapping(bool enable) override {}
182 bool IsStereoChannelSwappingEnabled() override { return false; }
183
79 // VoEBase 184 // VoEBase
80 int RegisterVoiceEngineObserver(VoiceEngineObserver& observer) override { 185 int RegisterVoiceEngineObserver(VoiceEngineObserver& observer) override {
81 return -1; 186 return -1;
82 } 187 }
83 int DeRegisterVoiceEngineObserver() override { return -1; } 188 int DeRegisterVoiceEngineObserver() override { return -1; }
84 int Init(AudioDeviceModule* external_adm = NULL, 189 int Init(AudioDeviceModule* external_adm = NULL,
85 AudioProcessing* audioproc = NULL) override { return -1; } 190 AudioProcessing* audioproc = NULL) override { return -1; }
86 AudioProcessing* audio_processing() override { return nullptr; } 191 AudioProcessing* audio_processing() override { return nullptr; }
87 int Terminate() override { return -1; } 192 int Terminate() override { return -1; }
88 int CreateChannel() override { return -1; } 193 int CreateChannel() override { return -1; }
89 int CreateChannel(const Config& config) override { return -1; } 194 int CreateChannel(const Config& config) override { return -1; }
90 int DeleteChannel(int channel) override { return -1; } 195 int DeleteChannel(int channel) override { return -1; }
91 int StartReceive(int channel) override { return -1; } 196 int StartReceive(int channel) override { return -1; }
92 int StopReceive(int channel) override { return -1; } 197 int StopReceive(int channel) override { return -1; }
93 int StartPlayout(int channel) override { return -1; } 198 int StartPlayout(int channel) override { return -1; }
94 int StopPlayout(int channel) override { return -1; } 199 int StopPlayout(int channel) override { return -1; }
95 int StartSend(int channel) override { return -1; } 200 int StartSend(int channel) override { return -1; }
96 int StopSend(int channel) override { return -1; } 201 int StopSend(int channel) override { return -1; }
97 int GetVersion(char version[1024]) override { return -1; } 202 int GetVersion(char version[1024]) override { return -1; }
98 int LastError() override { return -1; } 203 int LastError() override { return -1; }
99 AudioTransport* audio_transport() { return nullptr; } 204 AudioTransport* audio_transport() { return nullptr; }
100 int AssociateSendChannel(int channel, int accociate_send_channel) override { 205 int AssociateSendChannel(int channel, int accociate_send_channel) override {
101 return -1; 206 return -1;
102 } 207 }
103 208
104 // VoECodec 209 // VoECodec
105 int NumOfCodecs() override { return -1; } 210 int NumOfCodecs() override { return -1; }
106 int GetCodec(int index, CodecInst& codec) override { return -1; } 211 int GetCodec(int index, CodecInst& codec) override { return -1; }
107 int SetSendCodec(int channel, const CodecInst& codec) override { return -1; } 212 int SetSendCodec(int channel, const CodecInst& codec) override { return -1; }
108 int GetSendCodec(int channel, CodecInst& codec) override { return -1; } 213 int GetSendCodec(int channel, CodecInst& codec) override {
214 EXPECT_EQ(channel, kSendChannelId);
215 codec = GetSendCodecInst();
216 return 0;
217 }
109 int SetBitRate(int channel, int bitrate_bps) override { return -1; } 218 int SetBitRate(int channel, int bitrate_bps) override { return -1; }
110 int GetRecCodec(int channel, CodecInst& codec) override { 219 int GetRecCodec(int channel, CodecInst& codec) override {
111 EXPECT_EQ(channel, kReceiveChannelId); 220 EXPECT_EQ(channel, kRecvChannelId);
112 codec = GetRecvRecCodecInst(); 221 codec = GetRecvCodecInst();
113 return 0; 222 return 0;
114 } 223 }
115 int SetRecPayloadType(int channel, const CodecInst& codec) override { 224 int SetRecPayloadType(int channel, const CodecInst& codec) override {
116 return -1; 225 return -1;
117 } 226 }
118 int GetRecPayloadType(int channel, CodecInst& codec) override { return -1; } 227 int GetRecPayloadType(int channel, CodecInst& codec) override { return -1; }
119 int SetSendCNPayloadType(int channel, int type, 228 int SetSendCNPayloadType(int channel, int type,
120 PayloadFrequencies frequency = kFreq16000Hz) override { return -1; } 229 PayloadFrequencies frequency = kFreq16000Hz) override { return -1; }
121 int SetVADStatus(int channel, 230 int SetVADStatus(int channel,
122 bool enable, 231 bool enable,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 int ReceivedRTPPacket(int channel, 397 int ReceivedRTPPacket(int channel,
289 const void* data, 398 const void* data,
290 size_t length, 399 size_t length,
291 const PacketTime& packet_time) override { return -1; } 400 const PacketTime& packet_time) override { return -1; }
292 int ReceivedRTCPPacket(int channel, 401 int ReceivedRTCPPacket(int channel,
293 const void* data, 402 const void* data,
294 size_t length) { return -1; } 403 size_t length) { return -1; }
295 404
296 // VoENetEqStats 405 // VoENetEqStats
297 int GetNetworkStatistics(int channel, NetworkStatistics& stats) override { 406 int GetNetworkStatistics(int channel, NetworkStatistics& stats) override {
298 EXPECT_EQ(channel, kReceiveChannelId); 407 EXPECT_EQ(channel, kRecvChannelId);
299 stats = GetRecvNetworkStats(); 408 stats = GetRecvNetworkStats();
300 return 0; 409 return 0;
301 } 410 }
302 int GetDecodingCallStatistics(int channel, 411 int GetDecodingCallStatistics(int channel,
303 AudioDecodingCallStats* stats) const override { 412 AudioDecodingCallStats* stats) const override {
304 EXPECT_EQ(channel, kReceiveChannelId); 413 EXPECT_EQ(channel, kRecvChannelId);
305 EXPECT_NE(nullptr, stats); 414 EXPECT_NE(nullptr, stats);
306 *stats = GetRecvAudioDecodingCallStats(); 415 *stats = GetRecvAudioDecodingCallStats();
307 return 0; 416 return 0;
308 } 417 }
309 418
310 // VoERTP_RTCP 419 // VoERTP_RTCP
311 int SetLocalSSRC(int channel, unsigned int ssrc) override { return -1; } 420 int SetLocalSSRC(int channel, unsigned int ssrc) override { return -1; }
312 int GetLocalSSRC(int channel, unsigned int& ssrc) override { return -1; } 421 int GetLocalSSRC(int channel, unsigned int& ssrc) override {
313 int GetRemoteSSRC(int channel, unsigned int& ssrc) override { 422 EXPECT_EQ(channel, kSendChannelId);
314 EXPECT_EQ(channel, kReceiveChannelId);
315 ssrc = 0; 423 ssrc = 0;
316 return 0; 424 return 0;
317 } 425 }
426 int GetRemoteSSRC(int channel, unsigned int& ssrc) override {
427 EXPECT_EQ(channel, kRecvChannelId);
428 ssrc = 0;
429 return 0;
430 }
318 int SetSendAudioLevelIndicationStatus(int channel, 431 int SetSendAudioLevelIndicationStatus(int channel,
319 bool enable, 432 bool enable,
320 unsigned char id = 1) override { 433 unsigned char id = 1) override {
321 return -1; 434 return -1;
322 } 435 }
323 int SetSendAbsoluteSenderTimeStatus(int channel, 436 int SetSendAbsoluteSenderTimeStatus(int channel,
324 bool enable, 437 bool enable,
325 unsigned char id) override { return -1; } 438 unsigned char id) override { return -1; }
326 int SetReceiveAbsoluteSenderTimeStatus(int channel, 439 int SetReceiveAbsoluteSenderTimeStatus(int channel,
327 bool enable, 440 bool enable,
(...skipping 12 matching lines...) Expand all
340 unsigned int& playoutTimestamp, 453 unsigned int& playoutTimestamp,
341 unsigned int* jitter = NULL, 454 unsigned int* jitter = NULL,
342 unsigned short* fractionLost = NULL) override { 455 unsigned short* fractionLost = NULL) override {
343 return -1; 456 return -1;
344 } 457 }
345 int GetRTPStatistics(int channel, 458 int GetRTPStatistics(int channel,
346 unsigned int& averageJitterMs, 459 unsigned int& averageJitterMs,
347 unsigned int& maxJitterMs, 460 unsigned int& maxJitterMs,
348 unsigned int& discardedPackets) override { return -1; } 461 unsigned int& discardedPackets) override { return -1; }
349 int GetRTCPStatistics(int channel, CallStatistics& stats) override { 462 int GetRTCPStatistics(int channel, CallStatistics& stats) override {
350 EXPECT_EQ(channel, kReceiveChannelId); 463 if (channel == kSendChannelId) {
351 stats = GetRecvCallStats(); 464 stats = GetSendCallStats();
465 } else {
466 EXPECT_EQ(channel, kRecvChannelId);
467 stats = GetRecvCallStats();
468 }
352 return 0; 469 return 0;
353 } 470 }
354 int GetRemoteRTCPReportBlocks( 471 int GetRemoteRTCPReportBlocks(
355 int channel, 472 int channel,
356 std::vector<ReportBlock>* receive_blocks) override { return -1; } 473 std::vector<ReportBlock>* receive_blocks) override {
474 EXPECT_EQ(channel, kSendChannelId);
475 EXPECT_NE(receive_blocks, nullptr);
476 EXPECT_EQ(receive_blocks->size(), 0u);
477 webrtc::ReportBlock block = GetSendReportBlock();
478 receive_blocks->push_back(block); // Has wrong SSRC.
479 block.source_SSRC = kSendSsrc;
480 receive_blocks->push_back(block); // Correct block.
481 block.fraction_lost = 0;
482 receive_blocks->push_back(block); // Duplicate SSRC, bad fraction_lost.
483 return 0;
484 }
357 int SetNACKStatus(int channel, bool enable, int maxNoPackets) override { 485 int SetNACKStatus(int channel, bool enable, int maxNoPackets) override {
358 return -1; 486 return -1;
359 } 487 }
360 488
361 // VoEVideoSync 489 // VoEVideoSync
362 int GetPlayoutBufferSize(int& buffer_ms) override { return -1; } 490 int GetPlayoutBufferSize(int& buffer_ms) override { return -1; }
363 int SetMinimumPlayoutDelay(int channel, int delay_ms) override { return -1; } 491 int SetMinimumPlayoutDelay(int channel, int delay_ms) override { return -1; }
364 int SetInitialPlayoutDelay(int channel, int delay_ms) override { return -1; } 492 int SetInitialPlayoutDelay(int channel, int delay_ms) override { return -1; }
365 int GetDelayEstimate(int channel, 493 int GetDelayEstimate(int channel,
366 int* jitter_buffer_delay_ms, 494 int* jitter_buffer_delay_ms,
367 int* playout_buffer_delay_ms) override { 495 int* playout_buffer_delay_ms) override {
368 EXPECT_EQ(channel, kReceiveChannelId); 496 EXPECT_EQ(channel, kRecvChannelId);
369 *jitter_buffer_delay_ms = kRecvJitterBufferDelay; 497 *jitter_buffer_delay_ms = kRecvJitterBufferDelay;
370 *playout_buffer_delay_ms = kRecvPlayoutBufferDelay; 498 *playout_buffer_delay_ms = kRecvPlayoutBufferDelay;
371 return 0; 499 return 0;
372 } 500 }
373 int GetLeastRequiredDelayMs(int channel) const override { return -1; } 501 int GetLeastRequiredDelayMs(int channel) const override { return -1; }
374 int SetInitTimestamp(int channel, unsigned int timestamp) override { 502 int SetInitTimestamp(int channel, unsigned int timestamp) override {
375 return -1; 503 return -1;
376 } 504 }
377 int SetInitSequenceNumber(int channel, short sequenceNumber) override { 505 int SetInitSequenceNumber(int channel, short sequenceNumber) override {
378 return -1; 506 return -1;
379 } 507 }
380 int GetPlayoutTimestamp(int channel, unsigned int& timestamp) override { 508 int GetPlayoutTimestamp(int channel, unsigned int& timestamp) override {
381 return -1; 509 return -1;
382 } 510 }
383 int GetRtpRtcp(int channel, 511 int GetRtpRtcp(int channel,
384 RtpRtcp** rtpRtcpModule, 512 RtpRtcp** rtpRtcpModule,
385 RtpReceiver** rtp_receiver) override { return -1; } 513 RtpReceiver** rtp_receiver) override { return -1; }
386 514
387 // VoEVolumeControl 515 // VoEVolumeControl
388 int SetSpeakerVolume(unsigned int volume) override { return -1; } 516 int SetSpeakerVolume(unsigned int volume) override { return -1; }
389 int GetSpeakerVolume(unsigned int& volume) override { return -1; } 517 int GetSpeakerVolume(unsigned int& volume) override { return -1; }
390 int SetMicVolume(unsigned int volume) override { return -1; } 518 int SetMicVolume(unsigned int volume) override { return -1; }
391 int GetMicVolume(unsigned int& volume) override { return -1; } 519 int GetMicVolume(unsigned int& volume) override { return -1; }
392 int SetInputMute(int channel, bool enable) override { return -1; } 520 int SetInputMute(int channel, bool enable) override { return -1; }
393 int GetInputMute(int channel, bool& enabled) override { return -1; } 521 int GetInputMute(int channel, bool& enabled) override { return -1; }
394 int GetSpeechInputLevel(unsigned int& level) override { return -1; } 522 int GetSpeechInputLevel(unsigned int& level) override { return -1; }
395 int GetSpeechOutputLevel(int channel, unsigned int& level) override { 523 int GetSpeechOutputLevel(int channel, unsigned int& level) override {
396 return -1; 524 return -1;
397 } 525 }
398 int GetSpeechInputLevelFullRange(unsigned int& level) override { return -1; } 526 int GetSpeechInputLevelFullRange(unsigned int& level) override {
527 level = kSendSpeechInputLevel;
528 return 0;
529 }
399 int GetSpeechOutputLevelFullRange(int channel, 530 int GetSpeechOutputLevelFullRange(int channel,
400 unsigned int& level) override { 531 unsigned int& level) override {
401 EXPECT_EQ(channel, kReceiveChannelId); 532 EXPECT_EQ(channel, kRecvChannelId);
402 level = kRecvSpeechOutputLevel; 533 level = kRecvSpeechOutputLevel;
403 return 0; 534 return 0;
404 } 535 }
405 int SetChannelOutputVolumeScaling(int channel, float scaling) override { 536 int SetChannelOutputVolumeScaling(int channel, float scaling) override {
406 return -1; 537 return -1;
407 } 538 }
408 int GetChannelOutputVolumeScaling(int channel, float& scaling) override { 539 int GetChannelOutputVolumeScaling(int channel, float& scaling) override {
409 return -1; 540 return -1;
410 } 541 }
411 int SetOutputVolumePan(int channel, float left, float right) override { 542 int SetOutputVolumePan(int channel, float left, float right) override {
412 return -1; 543 return -1;
413 } 544 }
414 int GetOutputVolumePan(int channel, float& left, float& right) override { 545 int GetOutputVolumePan(int channel, float& left, float& right) override {
415 return -1; 546 return -1;
416 } 547 }
417 }; 548 };
418 } // namespace test 549 } // namespace test
419 } // namespace webrtc 550 } // namespace webrtc
420 551
421 #endif // WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_ 552 #endif // WEBRTC_AUDIO_FAKE_VOICE_ENGINE_H_
OLDNEW
« webrtc/audio/audio_send_stream.cc ('K') | « webrtc/call/call.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698