OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 private: | 66 private: |
67 friend class WebContentsAudioInputStreamTest; | 67 friend class WebContentsAudioInputStreamTest; |
68 | 68 |
69 // Maintain most state and functionality in an internal ref-counted | 69 // Maintain most state and functionality in an internal ref-counted |
70 // implementation class. This object must outlive a call to Close(), until | 70 // implementation class. This object must outlive a call to Close(), until |
71 // the shutdown tasks running on other threads complete: The | 71 // the shutdown tasks running on other threads complete: The |
72 // AudioMirroringManager on the IO thread, the WebContentsTracker on the UI | 72 // AudioMirroringManager on the IO thread, the WebContentsTracker on the UI |
73 // thread, and the VirtualAudioOuputStreams on the audio thread. | 73 // thread, and the VirtualAudioOuputStreams on the audio thread. |
74 class Impl; | 74 class Impl; |
75 | 75 |
76 WebContentsAudioInputStream( | 76 WebContentsAudioInputStream(int render_process_id, |
77 int render_process_id, int main_render_frame_id, | 77 int main_render_frame_id, |
78 AudioMirroringManager* mirroring_manager, | 78 AudioMirroringManager* mirroring_manager, |
79 const scoped_refptr<WebContentsTracker>& tracker, | 79 const scoped_refptr<WebContentsTracker>& tracker, |
80 media::VirtualAudioInputStream* mixer_stream); | 80 media::VirtualAudioInputStream* mixer_stream, |
| 81 bool is_duplication); |
81 | 82 |
82 ~WebContentsAudioInputStream() override; | 83 ~WebContentsAudioInputStream() override; |
83 | 84 |
84 scoped_refptr<Impl> impl_; | 85 scoped_refptr<Impl> impl_; |
85 | 86 |
86 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream); | 87 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream); |
87 }; | 88 }; |
88 | 89 |
89 } // namespace content | 90 } // namespace content |
90 | 91 |
91 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_ | 92 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_ |
OLD | NEW |