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

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

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 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 // An AudioInputStream which provides a loop-back of all audio output generated 5 // An AudioInputStream which provides a loop-back of all audio output generated
6 // by the entire RenderFrame tree associated with a WebContents instance. The 6 // by the entire RenderFrame tree associated with a WebContents instance. The
7 // single stream of data is produced by format-converting and mixing all audio 7 // single stream of data is produced by format-converting and mixing all audio
8 // output streams. As the RenderFrameHost tree mutates (e.g., due to page 8 // output streams. As the RenderFrameHost tree mutates (e.g., due to page
9 // navigations, or crashes/reloads), the stream will continue without 9 // navigations, or crashes/reloads), the stream will continue without
10 // interruption. In other words, WebContentsAudioInputStream provides tab-level 10 // interruption. In other words, WebContentsAudioInputStream provides tab-level
(...skipping 28 matching lines...) Expand all
39 // media::AudioInputStream implementation 39 // media::AudioInputStream implementation
40 virtual bool Open() override; 40 virtual bool Open() override;
41 virtual void Start(AudioInputCallback* callback) override; 41 virtual void Start(AudioInputCallback* callback) override;
42 virtual void Stop() override; 42 virtual void Stop() override;
43 virtual void Close() override; 43 virtual void Close() override;
44 virtual double GetMaxVolume() override; 44 virtual double GetMaxVolume() override;
45 virtual void SetVolume(double volume) override; 45 virtual void SetVolume(double volume) override;
46 virtual double GetVolume() override; 46 virtual double GetVolume() override;
47 virtual void SetAutomaticGainControl(bool enabled) override; 47 virtual void SetAutomaticGainControl(bool enabled) override;
48 virtual bool GetAutomaticGainControl() override; 48 virtual bool GetAutomaticGainControl() override;
49 virtual bool IsMuted() override;
49 50
50 // Create a new audio mirroring session, or return NULL on error. |device_id| 51 // Create a new audio mirroring session, or return NULL on error. |device_id|
51 // should be in the format accepted by 52 // should be in the format accepted by
52 // WebContentsCaptureUtil::ExtractTabCaptureTarget(). The caller must 53 // WebContentsCaptureUtil::ExtractTabCaptureTarget(). The caller must
53 // guarantee Close() is called on the returned object so that it may 54 // guarantee Close() is called on the returned object so that it may
54 // self-destruct. 55 // self-destruct.
55 // |worker_task_runner| is the task runner on which AudioInputCallback methods 56 // |worker_task_runner| is the task runner on which AudioInputCallback methods
56 // are called and may or may not be the single thread that invokes the 57 // are called and may or may not be the single thread that invokes the
57 // AudioInputStream methods. 58 // AudioInputStream methods.
58 static WebContentsAudioInputStream* Create( 59 static WebContentsAudioInputStream* Create(
(...skipping 21 matching lines...) Expand all
80 virtual ~WebContentsAudioInputStream(); 81 virtual ~WebContentsAudioInputStream();
81 82
82 scoped_refptr<Impl> impl_; 83 scoped_refptr<Impl> impl_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream); 85 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream);
85 }; 86 };
86 87
87 } // namespace content 88 } // namespace content
88 89
89 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_ 90 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698