OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // Basing on |source_type| and build configuration, audio played out through | 78 // Basing on |source_type| and build configuration, audio played out through |
79 // the sink goes to AOD directly or can be mixed with other audio before that. | 79 // the sink goes to AOD directly or can be mixed with other audio before that. |
80 static scoped_refptr<media::SwitchableAudioRendererSink> | 80 static scoped_refptr<media::SwitchableAudioRendererSink> |
81 NewSwitchableAudioRendererSink(SourceType source_type, | 81 NewSwitchableAudioRendererSink(SourceType source_type, |
82 int render_frame_id, | 82 int render_frame_id, |
83 int session_id, | 83 int session_id, |
84 const std::string& device_id, | 84 const std::string& device_id, |
85 const url::Origin& security_origin); | 85 const url::Origin& security_origin); |
86 | 86 |
87 // A helper to get device info in the absence of AudioOutputDevice. | 87 // A helper to get device info in the absence of AudioOutputDevice. |
| 88 // Must be called on renderer thread only. |
88 static media::OutputDeviceInfo GetOutputDeviceInfo( | 89 static media::OutputDeviceInfo GetOutputDeviceInfo( |
89 int render_frame_id, | 90 int render_frame_id, |
90 int session_id, | 91 int session_id, |
91 const std::string& device_id, | 92 const std::string& device_id, |
92 const url::Origin& security_origin); | 93 const url::Origin& security_origin); |
93 | 94 |
94 // Creates an AudioCapturerSource using the currently registered factory. | 95 // Creates an AudioCapturerSource using the currently registered factory. |
95 // |render_frame_id| refers to the RenderFrame containing the entity | 96 // |render_frame_id| refers to the RenderFrame containing the entity |
96 // consuming the audio. | 97 // consuming the audio. |
97 static scoped_refptr<media::AudioCapturerSource> NewAudioCapturerSource( | 98 static scoped_refptr<media::AudioCapturerSource> NewAudioCapturerSource( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 int session_id, | 142 int session_id, |
142 const std::string& device_id, | 143 const std::string& device_id, |
143 const url::Origin& security_origin); | 144 const url::Origin& security_origin); |
144 | 145 |
145 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); | 146 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); |
146 }; | 147 }; |
147 | 148 |
148 } // namespace content | 149 } // namespace content |
149 | 150 |
150 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ | 151 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
OLD | NEW |