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

Side by Side Diff: media/base/audio_renderer_mixer_pool.h

Issue 1942803002: Caching AudioOutputDevice instances in mixer manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make WebAudioSourceProvider to always return real sink info reguardless the client - to avoid behavior change. Created 4 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_
7
8 #include <string>
9
10 #include "media/base/output_device_info.h"
11
12 namespace url {
13 class Origin;
14 }
15
16 namespace media {
17 class AudioParameters;
18 class AudioRendererMixer;
19
20 // Provides AudioRendererMixer instances for shared usage.
21 // Thread safe.
22 class MEDIA_EXPORT AudioRendererMixerPool {
23 public:
24 AudioRendererMixerPool() {}
25 virtual ~AudioRendererMixerPool() {}
26
27 // 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 // ReturnMixer().
30 virtual AudioRendererMixer* GetMixer(int owner_id,
31 const AudioParameters& params,
32 const std::string& device_id,
33 const url::Origin& security_origin,
34 OutputDeviceStatus* device_status) = 0;
35
36 // Returns mixer back to the pool, must be called when the mixer is not needed
37 // any more to avoid memory leakage.
38 virtual void ReturnMixer(int owner_id,
39 const AudioParameters& params,
40 const std::string& device_id,
41 const url::Origin& security_origin) = 0;
42
43 // Returns output device information
44 virtual OutputDeviceInfo GetOutputDeviceInfo(
45 int owner_id,
46 int session_id,
47 const std::string& device_id,
48 const url::Origin& security_origin) = 0;
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerPool);
52 };
53
54 } // namespace media
55
56 #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