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

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: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webrtc_local_audio_track.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0b06c11c2907dcb38bdb7f4032f8846450fa1580..d1b22234978b0da62a213448d0441989aede39a6 100644
--- a/content/renderer/media/webrtc_local_audio_track.cc
+++ b/content/renderer/media/webrtc_local_audio_track.cc
@@ -6,6 +6,7 @@
#include "content/public/renderer/media_stream_audio_sink.h"
#include "content/renderer/media/media_stream_audio_level_calculator.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"
@@ -113,6 +114,16 @@ void WebRtcLocalAudioTrack::OnSetFormat(
sinks_.TagAll();
}
+void WebRtcLocalAudioTrack::SetAudioProcessor(
+ const scoped_refptr<MediaStreamAudioProcessor>& processor) {
+ // if the |processor| does not have audio processing, which can happen if
+ // kEnableAudioTrackProcessing is not set or all the constraints in
+ // the |processor| are turned off. In such case, we pass NULL to the
+ // adapter to indicate that no stats can be gotten from the processor.
+ adapter_->SetAudioProcessor(processor->has_audio_processing() ?
+ processor : NULL);
+}
+
void WebRtcLocalAudioTrack::AddSink(MediaStreamAudioSink* sink) {
DCHECK(main_render_thread_checker_.CalledOnValidThread());
DVLOG(1) << "WebRtcLocalAudioTrack::AddSink()";
« no previous file with comments | « content/renderer/media/webrtc_local_audio_track.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698