| 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" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "media/base/audio_latency.h" |
| 14 #include "media/base/output_device_info.h" | 15 #include "media/base/output_device_info.h" |
| 15 | 16 |
| 16 namespace media { | 17 namespace media { |
| 17 class AudioRendererSink; | 18 class AudioRendererSink; |
| 18 class SwitchableAudioRendererSink; | 19 class SwitchableAudioRendererSink; |
| 19 class AudioCapturerSource; | 20 class AudioCapturerSource; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace url { | 23 namespace url { |
| 23 class Origin; | 24 class Origin; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 41 kSourceMediaElement, | 42 kSourceMediaElement, |
| 42 kSourceWebRtc, | 43 kSourceWebRtc, |
| 43 kSourceNonRtcAudioTrack, | 44 kSourceNonRtcAudioTrack, |
| 44 kSourceWebAudioInteractive, | 45 kSourceWebAudioInteractive, |
| 45 kSourceWebAudioBalanced, | 46 kSourceWebAudioBalanced, |
| 46 kSourceWebAudioPlayback, | 47 kSourceWebAudioPlayback, |
| 47 kSourceWebAudioExact, | 48 kSourceWebAudioExact, |
| 48 kSourceLast = kSourceWebAudioExact // Only used for validation of format. | 49 kSourceLast = kSourceWebAudioExact // Only used for validation of format. |
| 49 }; | 50 }; |
| 50 | 51 |
| 52 static media::AudioLatency::LatencyType GetSourceLatencyType( |
| 53 SourceType source); |
| 54 |
| 51 // Creates a sink for AudioRendererMixer. | 55 // Creates a sink for AudioRendererMixer. |
| 52 // |render_frame_id| refers to the RenderFrame containing the entity | 56 // |render_frame_id| refers to the RenderFrame containing the entity |
| 53 // producing the audio. If |session_id| is nonzero, it is used by the browser | 57 // producing the audio. If |session_id| is nonzero, it is used by the browser |
| 54 // to select the correct input device ID and its associated output device, if | 58 // to select the correct input device ID and its associated output device, if |
| 55 // it exists. If |session_id| is zero, |device_id| and |security_origin| | 59 // it exists. If |session_id| is zero, |device_id| and |security_origin| |
| 56 // identify the output device to use. | 60 // identify the output device to use. |
| 57 // If |session_id| is zero and |device_id| and |security_origin| are empty, | 61 // If |session_id| is zero and |device_id| and |security_origin| are empty, |
| 58 // the default output device will be selected. | 62 // the default output device will be selected. |
| 59 static scoped_refptr<media::AudioRendererSink> NewAudioRendererMixerSink( | 63 static scoped_refptr<media::AudioRendererSink> NewAudioRendererMixerSink( |
| 60 int render_frame_id, | 64 int render_frame_id, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int session_id, | 146 int session_id, |
| 143 const std::string& device_id, | 147 const std::string& device_id, |
| 144 const url::Origin& security_origin); | 148 const url::Origin& security_origin); |
| 145 | 149 |
| 146 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); | 150 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); |
| 147 }; | 151 }; |
| 148 | 152 |
| 149 } // namespace content | 153 } // namespace content |
| 150 | 154 |
| 151 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ | 155 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
| OLD | NEW |