Chromium Code Reviews| Index: media/base/audio_renderer_mixer_pool.h |
| diff --git a/media/base/audio_renderer_mixer_pool.h b/media/base/audio_renderer_mixer_pool.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..894124547155373f243307ee3039acdb5856129c |
| --- /dev/null |
| +++ b/media/base/audio_renderer_mixer_pool.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ |
| +#define MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ |
| + |
| +#include <string> |
| + |
| +#include "media/base/output_device_info.h" |
| + |
| +namespace url { |
| +class Origin; |
| +} |
| + |
| +namespace media { |
| +class AudioParameters; |
| +class AudioRendererMixer; |
| + |
| +class MEDIA_EXPORT AudioRendererMixerPool { |
| + public: |
| + AudioRendererMixerPool() {} |
| + virtual ~AudioRendererMixerPool() {} |
| + |
| + // Obtains a pointer to mixer instance based on AudioParameters. The pointer |
| + // is guaranteed to be valid (at least) until it's rereleased by a call to |
| + // ReturnMixer() |
| + virtual AudioRendererMixer* GetMixer(int source_render_frame_id, |
| + const AudioParameters& params, |
| + const std::string& device_id, |
| + const url::Origin& security_origin, |
| + OutputDeviceStatus* device_status) = 0; |
| + |
| + // Returns mixer back to the pool. |
| + virtual void ReturnMixer(int source_render_frame_id, |
|
miu
2016/05/19 22:27:16
Are all these arguments necessary to return a mixe
o1ka
2016/05/20 10:40:32
Those are the key used to look-up the mixer. Just
|
| + const AudioParameters& params, |
| + const std::string& device_id, |
| + const url::Origin& security_origin) = 0; |
| + |
| + // Returns output device information |
| + virtual OutputDeviceInfo GetOutputDeviceInfo( |
| + int source_render_frame_id, |
| + int session_id, |
| + const std::string& device_id, |
| + const url::Origin& security_origin) = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerPool); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_POOL_H_ |