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

Side by Side Diff: content/renderer/media/audio_device_factory.h

Issue 2067863003: Mixing audio with different latency requirements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android test fix Created 4 years, 5 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
« no previous file with comments | « no previous file | content/renderer/media/audio_device_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 25
26 namespace content { 26 namespace content {
27 27
28 // A factory for creating AudioRendererSinks and AudioCapturerSources. There is 28 // A factory for creating AudioRendererSinks and AudioCapturerSources. There is
29 // a global factory function that can be installed for the purposes of testing 29 // a global factory function that can be installed for the purposes of testing
30 // to provide specialized implementations. 30 // to provide specialized implementations.
31 // TODO(olka): rename it, probably split it into AudioRendererSinkFactory and 31 // TODO(olka): rename it, probably split it into AudioRendererSinkFactory and
32 // AudioCapturerSourceFactory. 32 // AudioCapturerSourceFactory.
33 class CONTENT_EXPORT AudioDeviceFactory { 33 class CONTENT_EXPORT AudioDeviceFactory {
34 public: 34 public:
35 // Types of audio sources. 35 // Types of audio sources. Each source can have individual mixing and/or
36 // latency requirements for output. The source is specified by the client when
37 // requesting output sink from the factory, and the factory creates the output
38 // sink basing on those requirements.
36 enum SourceType { 39 enum SourceType {
37 kSourceNone = 0, 40 kSourceNone = 0,
38 kSourceMediaElement, 41 kSourceMediaElement,
39 kSourceWebRtc, 42 kSourceWebRtc,
40 kSourceNonRtcAudioTrack, 43 kSourceNonRtcAudioTrack,
41 kSourceWebAudio, 44 kSourceWebAudioInteractive,
42 kSourceLast = kSourceWebAudio // Only used for validation of format. 45 kSourceWebAudioBalanced,
46 kSourceWebAudioPlayback,
47 kSourceWebAudioExact,
48 kSourceLast = kSourceWebAudioExact // Only used for validation of format.
43 }; 49 };
44 50
45 // Creates a sink for AudioRendererMixer. 51 // Creates a sink for AudioRendererMixer.
46 // |render_frame_id| refers to the RenderFrame containing the entity 52 // |render_frame_id| refers to the RenderFrame containing the entity
47 // producing the audio. If |session_id| is nonzero, it is used by the browser 53 // producing the audio. If |session_id| is nonzero, it is used by the browser
48 // to select the correct input device ID and its associated output device, if 54 // to select the correct input device ID and its associated output device, if
49 // it exists. If |session_id| is zero, |device_id| and |security_origin| 55 // it exists. If |session_id| is zero, |device_id| and |security_origin|
50 // identify the output device to use. 56 // identify the output device to use.
51 // If |session_id| is zero and |device_id| and |security_origin| are empty, 57 // If |session_id| is zero and |device_id| and |security_origin| are empty,
52 // the default output device will be selected. 58 // the default output device will be selected.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 int session_id, 141 int session_id,
136 const std::string& device_id, 142 const std::string& device_id,
137 const url::Origin& security_origin); 143 const url::Origin& security_origin);
138 144
139 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); 145 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory);
140 }; 146 };
141 147
142 } // namespace content 148 } // namespace content
143 149
144 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ 150 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_device_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698