Index: chromecast/public/cast_audio_output_device.h |
diff --git a/chromecast/public/cast_audio_output_device.h b/chromecast/public/cast_audio_output_device.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9b148a10483a268d30d8d53e20b9d49a79e6d2b8 |
--- /dev/null |
+++ b/chromecast/public/cast_audio_output_device.h |
@@ -0,0 +1,51 @@ |
+// 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_OUTPUT_DEVICE_H_ |
+#define CHROMECAST_PUBLIC_CAST_AUDIO_OUTPUT_DEVICE_H_ |
+ |
+#include "cast_audio_output_stream.h" |
+#include "chromecast_export.h" |
+ |
+namespace chromecast { |
+ |
+class TaskRunner; |
+ |
+namespace media { |
halliwell
2015/07/29 15:06:57
we've been putting the other chromecast::media int
slan
2015/07/29 19:51:55
Done.
|
+ |
+// 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 CastAudioOutputDevice { |
+ public: |
+ virtual ~CastAudioOutputDevice() {} |
+ |
+ // 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. All callbacks to |
+ // CastAudioOutputStream::AudioSourceCallback objects should be made on the |
+ // same thread on which this message is called. |task_runner| may be used as |
+ // as a media rendering thread and should be non-null. |
halliwell
2015/07/29 15:06:57
The task_runner part seems very vague/unclear to m
slan
2015/07/29 19:51:55
Clarified, based on our offline conversation.
|
+ virtual CastAudioOutputStream* MakeOutputStream( |
+ const AudioParameters& params, |
+ chromecast::TaskRunner* task_runner) = 0; |
gunsch
2015/07/29 17:22:36
chromecast:: not necessary
slan
2015/07/29 19:51:55
Done.
|
+}; |
+ |
+} // namespace media |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_PUBLIC_CAST_AUDIO_OUTPUT_DEVICE_H_ |