Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_ | |
| 6 #define CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include "cast_audio_stream.h" | |
| 10 #include "chromecast_export.h" | |
| 11 | |
| 12 namespace chromecast { | |
| 13 | |
| 14 // This is an interface used to provide platform-specific audio streams. | |
| 15 // Implementations of this interface should survive for the duration of the | |
| 16 // process. | |
| 17 | |
| 18 // Note: This interface should be implemented by third parties seeking to | |
| 19 // provide an audio manager platform for Cast. CastAudioManager will call | |
| 20 // this interface. | |
| 21 | |
| 22 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.
| |
| 23 public: | |
| 24 virtual ~CastAudioStreamProvider() {} | |
| 25 | |
| 26 // Returns the maximum number of output streams allowed. | |
| 27 virtual int GetMaximumOutputStreamsAllowed() const = 0; | |
| 28 | |
| 29 // Returns the preferred output stream parameters. The caller may inject | |
| 30 // |suggested| parameters, but it is left to the implementation to decide | |
| 31 // which of these to return. | |
| 32 virtual AudioParameters GetPreferredOutputStreamParameters( | |
| 33 const AudioParameters& suggested) const = 0; | |
| 34 | |
| 35 // Creates the output stream with parameters described by |params|. Caller | |
| 36 // does not take ownership of the returned stream. | |
| 37 virtual AudioOutputStream* MakeOutputStream( | |
| 38 const AudioParameters& params) = 0; | |
| 39 }; | |
| 40 | |
| 41 } // namespace chromecast | |
| 42 | |
| 43 #endif // CHROMECAST_PUBLIC_CAST_AUDIO_STREAM_PROVIDER_H_ | |
| OLD | NEW |