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

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: bad test 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
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.h ('k') | webrtc/media/engine/fakewebrtcvoiceengine.h » ('j') | 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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void FakeAudioSendStream::SetMuted(bool muted) { 50 void FakeAudioSendStream::SetMuted(bool muted) {
51 muted_ = muted; 51 muted_ = muted;
52 } 52 }
53 53
54 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { 54 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const {
55 return stats_; 55 return stats_;
56 } 56 }
57 57
58 FakeAudioReceiveStream::FakeAudioReceiveStream( 58 FakeAudioReceiveStream::FakeAudioReceiveStream(
59 const webrtc::AudioReceiveStream::Config& config) 59 const webrtc::AudioReceiveStream::Config& config)
60 : config_(config), received_packets_(0) { 60 : config_(config) {
61 RTC_DCHECK(config.voe_channel_id != -1); 61 RTC_DCHECK(config.voe_channel_id != -1);
62 } 62 }
63 63
64 const webrtc::AudioReceiveStream::Config& 64 const webrtc::AudioReceiveStream::Config&
65 FakeAudioReceiveStream::GetConfig() const { 65 FakeAudioReceiveStream::GetConfig() const {
66 return config_; 66 return config_;
67 } 67 }
68 68
69 void FakeAudioReceiveStream::SetStats( 69 void FakeAudioReceiveStream::SetStats(
70 const webrtc::AudioReceiveStream::Stats& stats) { 70 const webrtc::AudioReceiveStream::Stats& stats) {
(...skipping 15 matching lines...) Expand all
86 86
87 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const { 87 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const {
88 return stats_; 88 return stats_;
89 } 89 }
90 90
91 void FakeAudioReceiveStream::SetSink( 91 void FakeAudioReceiveStream::SetSink(
92 std::unique_ptr<webrtc::AudioSinkInterface> sink) { 92 std::unique_ptr<webrtc::AudioSinkInterface> sink) {
93 sink_ = std::move(sink); 93 sink_ = std::move(sink);
94 } 94 }
95 95
96 void FakeAudioReceiveStream::SetGain(float gain) {
97 gain_ = gain;
98 }
99
96 FakeVideoSendStream::FakeVideoSendStream( 100 FakeVideoSendStream::FakeVideoSendStream(
97 const webrtc::VideoSendStream::Config& config, 101 const webrtc::VideoSendStream::Config& config,
98 const webrtc::VideoEncoderConfig& encoder_config) 102 const webrtc::VideoEncoderConfig& encoder_config)
99 : sending_(false), 103 : sending_(false),
100 config_(config), 104 config_(config),
101 codec_settings_set_(false), 105 codec_settings_set_(false),
102 num_swapped_frames_(0) { 106 num_swapped_frames_(0) {
103 RTC_DCHECK(config.encoder_settings.encoder != NULL); 107 RTC_DCHECK(config.encoder_settings.encoder != NULL);
104 ReconfigureVideoEncoder(encoder_config); 108 ReconfigureVideoEncoder(encoder_config);
105 } 109 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 472 }
469 473
470 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { 474 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) {
471 last_sent_packet_ = sent_packet; 475 last_sent_packet_ = sent_packet;
472 if (sent_packet.packet_id >= 0) { 476 if (sent_packet.packet_id >= 0) {
473 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; 477 last_sent_nonnegative_packet_id_ = sent_packet.packet_id;
474 } 478 }
475 } 479 }
476 480
477 } // namespace cricket 481 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.h ('k') | webrtc/media/engine/fakewebrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698