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

Unified Diff: chromecast/public/cast_audio_stream_provider.h

Issue 1105803002: Exposes a shlib interface for media/audio path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: chromecast/public/cast_audio_stream_provider.h
diff --git a/chromecast/public/cast_audio_stream_provider.h b/chromecast/public/cast_audio_stream_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ecc872de5fb31ee063f934a14f42ed46e75e3c5
--- /dev/null
+++ b/chromecast/public/cast_audio_stream_provider.h
@@ -0,0 +1,43 @@
+// Copyright 2015 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 CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_
+#define CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_
+
+#include <string>
+#include "cast_audio_stream.h"
+#include "chromecast_export.h"
+
+namespace chromecast {
+
+// This is an interface used to provide platform-specific audio streams.
+// Implementations of this interface should survive for the duration of the
+// process.
+
+// Note: This interface should be implemented by third parties seeking to
+// provide an audio manager platform for Cast. CastAudioManager will call
+// this interface.
+
+class CHROMECAST_EXPORT CastAudioStreamProvider {
lcwu1 2015/04/24 02:18:24 This name is actually a bit misleading as it seems
slan 2015/04/24 05:34:26 I like the second one. Done.
+ public:
+ virtual ~CastAudioStreamProvider() {}
+
+ // Returns the maximum number of output streams allowed.
+ virtual int GetMaximumOutputStreamsAllowed() const = 0;
+
+ // Returns the preferred output stream parameters. The caller may inject
+ // |suggested| parameters, but it is left to the implementation to decide
+ // which of these to return.
+ virtual AudioParameters GetPreferredOutputStreamParameters(
+ const AudioParameters& suggested) const = 0;
+
+ // Creates the output stream with parameters described by |params|. Caller
+ // does not take ownership of the returned stream.
+ virtual AudioOutputStream* MakeOutputStream(
+ const AudioParameters& params) = 0;
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_
« chromecast/media/audio/cast_audio_manager.cc ('K') | « chromecast/public/cast_audio_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698