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

Side by Side Diff: webrtc/media/engine/fakewebrtccall.cc

Issue 2062193002: Add AudioReceiveStream::SetGain() method and use that in WVoMC::SetOutputVolume(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: misc Created 4 years, 6 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
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
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 latest_telephone_event_.duration_ms = duration_ms; 46 latest_telephone_event_.duration_ms = duration_ms;
47 return true; 47 return true;
48 } 48 }
49 49
50 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { 50 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const {
51 return stats_; 51 return stats_;
52 } 52 }
53 53
54 FakeAudioReceiveStream::FakeAudioReceiveStream( 54 FakeAudioReceiveStream::FakeAudioReceiveStream(
55 const webrtc::AudioReceiveStream::Config& config) 55 const webrtc::AudioReceiveStream::Config& config)
56 : config_(config), received_packets_(0) { 56 : config_(config) {
57 RTC_DCHECK(config.voe_channel_id != -1); 57 RTC_DCHECK(config.voe_channel_id != -1);
58 } 58 }
59 59
60 const webrtc::AudioReceiveStream::Config& 60 const webrtc::AudioReceiveStream::Config&
61 FakeAudioReceiveStream::GetConfig() const { 61 FakeAudioReceiveStream::GetConfig() const {
62 return config_; 62 return config_;
63 } 63 }
64 64
65 void FakeAudioReceiveStream::SetStats( 65 void FakeAudioReceiveStream::SetStats(
66 const webrtc::AudioReceiveStream::Stats& stats) { 66 const webrtc::AudioReceiveStream::Stats& stats) {
(...skipping 15 matching lines...) Expand all
82 82
83 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const { 83 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const {
84 return stats_; 84 return stats_;
85 } 85 }
86 86
87 void FakeAudioReceiveStream::SetSink( 87 void FakeAudioReceiveStream::SetSink(
88 std::unique_ptr<webrtc::AudioSinkInterface> sink) { 88 std::unique_ptr<webrtc::AudioSinkInterface> sink) {
89 sink_ = std::move(sink); 89 sink_ = std::move(sink);
90 } 90 }
91 91
92 void FakeAudioReceiveStream::SetGain(float gain) {
93 gain_ = gain;
94 }
95
92 FakeVideoSendStream::FakeVideoSendStream( 96 FakeVideoSendStream::FakeVideoSendStream(
93 const webrtc::VideoSendStream::Config& config, 97 const webrtc::VideoSendStream::Config& config,
94 const webrtc::VideoEncoderConfig& encoder_config) 98 const webrtc::VideoEncoderConfig& encoder_config)
95 : sending_(false), 99 : sending_(false),
96 config_(config), 100 config_(config),
97 codec_settings_set_(false), 101 codec_settings_set_(false),
98 num_swapped_frames_(0) { 102 num_swapped_frames_(0) {
99 RTC_DCHECK(config.encoder_settings.encoder != NULL); 103 RTC_DCHECK(config.encoder_settings.encoder != NULL);
100 ReconfigureVideoEncoder(encoder_config); 104 ReconfigureVideoEncoder(encoder_config);
101 } 105 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 case webrtc::MediaType::ANY: 464 case webrtc::MediaType::ANY:
461 ADD_FAILURE() 465 ADD_FAILURE()
462 << "SignalChannelNetworkState called with unknown parameter."; 466 << "SignalChannelNetworkState called with unknown parameter.";
463 } 467 }
464 } 468 }
465 469
466 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { 470 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) {
467 last_sent_packet_ = sent_packet; 471 last_sent_packet_ = sent_packet;
468 } 472 }
469 } // namespace cricket 473 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698