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_OUTPUT_DEVICE_H_ | |
| 6 #define CHROMECAST_PUBLIC_CAST_AUDIO_OUTPUT_DEVICE_H_ | |
| 7 | |
| 8 #include <string> | |
|
halliwell
2015/04/24 15:04:48
Is <string> used?
slan
2015/04/24 16:19:39
Nope. Artifact of re-factoring. Removed.
| |
| 9 | |
| 10 #include "cast_audio_stream.h" | |
| 11 #include "chromecast_export.h" | |
| 12 | |
| 13 namespace chromecast { | |
| 14 | |
| 15 // This is an interface used to provide platform-specific audio streams. | |
| 16 // Implementations of this interface should survive for the duration of the | |
| 17 // process. | |
| 18 | |
| 19 // Note: This interface should be implemented by third parties seeking to | |
| 20 // provide an audio manager platform for Cast. CastAudioManager will call | |
| 21 // this interface. | |
| 22 | |
|
halliwell
2015/04/24 15:04:48
How do implementations get instantiated ... is tha
slan
2015/04/24 16:19:39
Yes, follow-up CL. This merits a discussion about
| |
| 23 class CHROMECAST_EXPORT CastAudioOutputDevice { | |
| 24 public: | |
| 25 virtual ~CastAudioOutputDevice() {} | |
| 26 | |
| 27 // Returns the maximum number of output streams allowed. | |
| 28 virtual int GetMaximumOutputStreamsAllowed() const = 0; | |
| 29 | |
| 30 // Returns the preferred output stream parameters. The caller may inject | |
| 31 // |suggested| parameters, but it is left to the implementation to decide | |
| 32 // which of these to return. | |
| 33 virtual AudioParameters GetPreferredOutputStreamParameters( | |
| 34 const AudioParameters& suggested) const = 0; | |
| 35 | |
| 36 // Creates the output stream with parameters described by |params|. Caller | |
| 37 // does not take ownership of the returned stream. | |
|
halliwell
2015/04/24 15:04:48
So what's the lifetime of these streams ... they l
slan
2015/04/24 16:19:39
Good question. For now, that is left up to the imp
halliwell
2015/04/25 01:34:10
I'm not familiar with practical usage of these cla
| |
| 38 virtual CastAudioOutputStream* MakeOutputStream( | |
| 39 const AudioParameters& params) = 0; | |
| 40 }; | |
| 41 | |
| 42 } // namespace chromecast | |
| 43 | |
| 44 #endif // CHROMECAST_PUBLIC_CAST_AUDIO_OUTPUT_DEVICE_H_ | |
| OLD | NEW |