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

Unified Diff: content/renderer/media/media_stream_audio_processor.h

Issue 2219933003: Use LocalMediaStreamAudioSource for screen-casting use cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments on patch set 1 (mostly rewrote comments). Created 4 years, 4 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/media_stream_audio_processor.h
diff --git a/content/renderer/media/media_stream_audio_processor.h b/content/renderer/media/media_stream_audio_processor.h
index 8b0c0943a464be3020aef98f2a7ff0a6fdfbecd6..28cccdb4908af6fb4e93d5d75a27e2d7ab1bf5d5 100644
--- a/content/renderer/media/media_stream_audio_processor.h
+++ b/content/renderer/media/media_stream_audio_processor.h
@@ -110,6 +110,17 @@ class CONTENT_EXPORT MediaStreamAudioProcessor :
void OnDisableAecDump() override;
void OnIpcClosing() override;
+ // Returns true if MediaStreamAudioProcessor would modify the audio signal,
+ // based on the |constraints| and |effects_flags| parsed from a user media
+ // request. If the audio signal would not be modified, there is no need to
+ // instantiate a MediaStreamAudioProcessor and feed audio through it. Doing so
+ // would waste a non-trivial amount of memory and CPU resources.
+ //
+ // See media::AudioParameters::PlatformEffectsMask for interpretation of
+ // |effects_flags|.
+ static bool WouldModifyAudio(const blink::WebMediaConstraints& constraints,
+ int effects_flags);
+
protected:
~MediaStreamAudioProcessor() override;

Powered by Google App Engine
This is Rietveld 408576698