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

Unified 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: First round of comments addressed Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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..66848e63d65fea3ee67d9b2f10525f8eeed987db
--- /dev/null
+++ b/media/base/audio_renderer_mixer_pool.h
@@ -0,0 +1,54 @@
+// 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 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 media::AudioRendererMixer* GetMixer(
+ int source_render_frame_id,
+ const media::AudioParameters& params,
+ const std::string& device_id,
+ const url::Origin& security_origin,
+ media::OutputDeviceStatus* device_status) = 0;
+
+ // Returns mixer back to the pool.
+ virtual void ReturnMixer(int source_render_frame_id,
+ const media::AudioParameters& params,
+ const std::string& device_id,
+ const url::Origin& security_origin) = 0;
+
+ // Returns output device information
+ virtual media::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_

Powered by Google App Engine
This is Rietveld 408576698