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

Unified Diff: content/renderer/media/webrtc_local_audio_track.cc

Issue 185413009: Implements the GetSignalLevel and GetStats interface for the local audio track. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_local_audio_track.cc
diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc
index b10c6782d40dab712fd893b3418aa71288a2bb63..d5e337279b6c20b70aae14c77875b30b2d774764 100644
--- a/content/renderer/media/webrtc_local_audio_track.cc
+++ b/content/renderer/media/webrtc_local_audio_track.cc
@@ -5,6 +5,7 @@
#include "content/renderer/media/webrtc_local_audio_track.h"
#include "content/public/renderer/media_stream_audio_sink.h"
+#include "content/renderer/media/media_stream_audio_processor.h"
#include "content/renderer/media/media_stream_audio_sink_owner.h"
#include "content/renderer/media/media_stream_audio_track_sink.h"
#include "content/renderer/media/peer_connection_audio_sink_owner.h"
@@ -104,6 +105,18 @@ void WebRtcLocalAudioTrack::OnSetFormat(
sinks_.TagAll();
}
+void WebRtcLocalAudioTrack::SetAudioProcessor(
+ const scoped_refptr<MediaStreamAudioProcessor>& processor) {
+ // if the |processor| does not have the audio processing, which can happen if
tommi (sloooow) - chröme 2014/03/03 15:25:18 does not have audio processing
no longer working on chromium 2014/03/04 15:48:59 Done.
+ // the kEnableAudioTrackProcessing is not set or all the constraints in
tommi (sloooow) - chröme 2014/03/03 15:25:18 s/the kEnableAudioTrackProcessing/kEnableAudioTrac
no longer working on chromium 2014/03/04 15:48:59 Done.
+ // the |processor| are turned off. In such case, we pass a NULL to the
tommi (sloooow) - chröme 2014/03/03 15:25:18 In such a case, we pass NULL to the
no longer working on chromium 2014/03/04 15:48:59 Done.
+ // adapter to indicate that no stats can be got from the processor.
tommi (sloooow) - chröme 2014/03/03 15:25:18 can be gotten
no longer working on chromium 2014/03/04 15:48:59 Done.
+ if (processor->has_audio_processing())
+ adapter_->SetAudioProcessor(processor.get());
+ else
+ adapter_->SetAudioProcessor(NULL);
+}
+
void WebRtcLocalAudioTrack::AddSink(MediaStreamAudioSink* sink) {
DCHECK(main_render_thread_checker_.CalledOnValidThread());
DVLOG(1) << "WebRtcLocalAudioTrack::AddSink()";

Powered by Google App Engine
This is Rietveld 408576698