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

Side by Side Diff: content/browser/media/capture/web_contents_audio_input_stream.cc

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Debug Code Created 4 years, 3 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/media/capture/web_contents_audio_input_stream.h" 5 #include "content/browser/media/capture/web_contents_audio_input_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 StartMirroring(); 342 StartMirroring();
343 } 343 }
344 } 344 }
345 } 345 }
346 346
347 // static 347 // static
348 WebContentsAudioInputStream* WebContentsAudioInputStream::Create( 348 WebContentsAudioInputStream* WebContentsAudioInputStream::Create(
349 const std::string& device_id, 349 const std::string& device_id,
350 const media::AudioParameters& params, 350 const media::AudioParameters& params,
351 const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner, 351 const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner,
352 AudioMirroringManager* audio_mirroring_manager, 352 AudioMirroringManager* audio_mirroring_manager) {
353 bool is_duplication) {
354 int render_process_id; 353 int render_process_id;
355 int main_render_frame_id; 354 int main_render_frame_id;
356 if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget( 355 if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget(
357 device_id, &render_process_id, &main_render_frame_id)) { 356 device_id, &render_process_id, &main_render_frame_id)) {
358 return NULL; 357 return NULL;
359 } 358 }
360 359
360 bool mute_source;
361 WebContentsMediaCaptureId::ExtractOptions(device_id, nullptr, &mute_source);
362
361 return new WebContentsAudioInputStream( 363 return new WebContentsAudioInputStream(
362 render_process_id, main_render_frame_id, audio_mirroring_manager, 364 render_process_id, main_render_frame_id, audio_mirroring_manager,
363 new WebContentsTracker(false), 365 new WebContentsTracker(false),
364 new media::VirtualAudioInputStream( 366 new media::VirtualAudioInputStream(
365 params, worker_task_runner, 367 params, worker_task_runner,
366 media::VirtualAudioInputStream::AfterCloseCallback()), 368 media::VirtualAudioInputStream::AfterCloseCallback()),
367 is_duplication); 369 !mute_source);
368 } 370 }
369 371
370 WebContentsAudioInputStream::WebContentsAudioInputStream( 372 WebContentsAudioInputStream::WebContentsAudioInputStream(
371 int render_process_id, 373 int render_process_id,
372 int main_render_frame_id, 374 int main_render_frame_id,
373 AudioMirroringManager* mirroring_manager, 375 AudioMirroringManager* mirroring_manager,
374 const scoped_refptr<WebContentsTracker>& tracker, 376 const scoped_refptr<WebContentsTracker>& tracker,
375 media::VirtualAudioInputStream* mixer_stream, 377 media::VirtualAudioInputStream* mixer_stream,
376 bool is_duplication) 378 bool is_duplication)
377 : impl_(new Impl(render_process_id, 379 : impl_(new Impl(render_process_id,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 420
419 bool WebContentsAudioInputStream::GetAutomaticGainControl() { 421 bool WebContentsAudioInputStream::GetAutomaticGainControl() {
420 return impl_->mixer_stream()->GetAutomaticGainControl(); 422 return impl_->mixer_stream()->GetAutomaticGainControl();
421 } 423 }
422 424
423 bool WebContentsAudioInputStream::IsMuted() { 425 bool WebContentsAudioInputStream::IsMuted() {
424 return false; 426 return false;
425 } 427 }
426 428
427 } // namespace content 429 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698