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

Side by Side Diff: media/base/audio_renderer_mixer_pool.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "media/base/audio_latency.h"
10 #include "media/base/output_device_info.h" 11 #include "media/base/output_device_info.h"
11 12
12 namespace url { 13 namespace url {
13 class Origin; 14 class Origin;
14 } 15 }
15 16
16 namespace media { 17 namespace media {
17 class AudioParameters; 18 class AudioParameters;
18 class AudioRendererMixer; 19 class AudioRendererMixer;
19 20
20 // Provides AudioRendererMixer instances for shared usage. 21 // Provides AudioRendererMixer instances for shared usage.
21 // Thread safe. 22 // Thread safe.
22 class MEDIA_EXPORT AudioRendererMixerPool { 23 class MEDIA_EXPORT AudioRendererMixerPool {
23 public: 24 public:
24 AudioRendererMixerPool() {} 25 AudioRendererMixerPool() {}
25 virtual ~AudioRendererMixerPool() {} 26 virtual ~AudioRendererMixerPool() {}
26 27
27 // Obtains a pointer to mixer instance based on AudioParameters. The pointer 28 // Obtains a pointer to mixer instance based on AudioParameters. The pointer
28 // is guaranteed to be valid (at least) until it's rereleased by a call to 29 // is guaranteed to be valid (at least) until it's rereleased by a call to
29 // ReturnMixer(). 30 // ReturnMixer().
30 virtual AudioRendererMixer* GetMixer(int owner_id, 31 virtual AudioRendererMixer* GetMixer(int owner_id,
31 const AudioParameters& params, 32 const AudioParameters& params,
33 AudioLatency::LatencyType latency,
32 const std::string& device_id, 34 const std::string& device_id,
33 const url::Origin& security_origin, 35 const url::Origin& security_origin,
34 OutputDeviceStatus* device_status) = 0; 36 OutputDeviceStatus* device_status) = 0;
35 37
36 // Returns mixer back to the pool, must be called when the mixer is not needed 38 // Returns mixer back to the pool, must be called when the mixer is not needed
37 // any more to avoid memory leakage. 39 // any more to avoid memory leakage.
38 virtual void ReturnMixer(int owner_id, 40 virtual void ReturnMixer(AudioRendererMixer* mixer) = 0;
39 const AudioParameters& params,
40 const std::string& device_id,
41 const url::Origin& security_origin) = 0;
42 41
43 // Returns output device information 42 // Returns output device information
44 virtual OutputDeviceInfo GetOutputDeviceInfo( 43 virtual OutputDeviceInfo GetOutputDeviceInfo(
45 int owner_id, 44 int owner_id,
46 int session_id, 45 int session_id,
47 const std::string& device_id, 46 const std::string& device_id,
48 const url::Origin& security_origin) = 0; 47 const url::Origin& security_origin) = 0;
49 48
50 private: 49 private:
51 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerPool); 50 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerPool);
52 }; 51 };
53 52
54 } // namespace media 53 } // namespace media
55 54
56 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ 55 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input_unittest.cc ('k') | media/base/audio_renderer_mixer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698