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

Side by Side Diff: content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc

Issue 178223013: Calculate the signal level on the media stream local audio track (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased and all the try jobs passed Created 6 years, 9 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" 5 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/renderer/media/webrtc/webrtc_audio_sink_adapter.h" 8 #include "content/renderer/media/webrtc/webrtc_audio_sink_adapter.h"
9 #include "content/renderer/media/webrtc_local_audio_track.h" 9 #include "content/renderer/media/webrtc_local_audio_track.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return; 73 return;
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 std::vector<int> WebRtcLocalAudioTrackAdapter::VoeChannels() const { 78 std::vector<int> WebRtcLocalAudioTrackAdapter::VoeChannels() const {
79 base::AutoLock auto_lock(lock_); 79 base::AutoLock auto_lock(lock_);
80 return voe_channels_; 80 return voe_channels_;
81 } 81 }
82 82
83 void WebRtcLocalAudioTrackAdapter::SetSignalLevel(int signal_level) {
84 // TODO(xians): Implements this.
85 }
86
83 void WebRtcLocalAudioTrackAdapter::AddChannel(int channel_id) { 87 void WebRtcLocalAudioTrackAdapter::AddChannel(int channel_id) {
84 DVLOG(1) << "WebRtcLocalAudioTrack::AddChannel(channel_id=" 88 DVLOG(1) << "WebRtcLocalAudioTrack::AddChannel(channel_id="
85 << channel_id << ")"; 89 << channel_id << ")";
86 base::AutoLock auto_lock(lock_); 90 base::AutoLock auto_lock(lock_);
87 if (std::find(voe_channels_.begin(), voe_channels_.end(), channel_id) != 91 if (std::find(voe_channels_.begin(), voe_channels_.end(), channel_id) !=
88 voe_channels_.end()) { 92 voe_channels_.end()) {
89 // We need to handle the case when the same channel is connected to the 93 // We need to handle the case when the same channel is connected to the
90 // track more than once. 94 // track more than once.
91 return; 95 return;
92 } 96 }
(...skipping 13 matching lines...) Expand all
106 110
107 webrtc::AudioSourceInterface* WebRtcLocalAudioTrackAdapter::GetSource() const { 111 webrtc::AudioSourceInterface* WebRtcLocalAudioTrackAdapter::GetSource() const {
108 return track_source_; 112 return track_source_;
109 } 113 }
110 114
111 cricket::AudioRenderer* WebRtcLocalAudioTrackAdapter::GetRenderer() { 115 cricket::AudioRenderer* WebRtcLocalAudioTrackAdapter::GetRenderer() {
112 return this; 116 return this;
113 } 117 }
114 118
115 } // namespace content 119 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698