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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 1576073003: Support Audio for Desktop Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Same as patch 1 Created 4 years, 11 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 | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 49c828b00ecebe32dbbb583c936f87e3dcc45c8d..8f7839cc190c7f276388597ebb585fc4e8471f70 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -99,6 +99,9 @@ void ParseStreamType(const StreamControls& controls,
MediaStreamType* video_type) {
*audio_type = MEDIA_NO_SERVICE;
*video_type = MEDIA_NO_SERVICE;
+ const bool audio_support_flag_for_desktop_share =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAudioSupportForDesktopShare);
if (controls.audio.requested) {
if (!controls.audio.stream_source.empty()) {
// This is tab or screen capture.
@@ -106,6 +109,9 @@ void ParseStreamType(const StreamControls& controls,
*audio_type = content::MEDIA_TAB_AUDIO_CAPTURE;
} else if (controls.audio.stream_source == kMediaStreamSourceSystem) {
*audio_type = content::MEDIA_DESKTOP_AUDIO_CAPTURE;
+ } else if (audio_support_flag_for_desktop_share &&
+ controls.audio.stream_source == kMediaStreamSourceDesktop) {
+ *audio_type = content::MEDIA_DESKTOP_AUDIO_CAPTURE;
}
} else {
// This is normal audio device capture.
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698