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 "cast_audio_output_stream.h" | |
| 9 | |
| 10 namespace chromecast { | |
| 11 | |
| 12 class TaskRunner; | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 // This is an interface used to provide platform-specific audio streams. | |
| 17 // Implementations of this interface should survive for the duration of the | |
| 18 // process. | |
| 19 | |
| 20 // Note: This interface should be implemented by third parties seeking to | |
| 21 // provide an audio manager platform for Cast. CastAudioManager will call | |
| 22 // this interface. | |
| 23 | |
| 24 class CastAudioOutputDevice { | |
| 25 public: | |
| 26 virtual ~CastAudioOutputDevice() {} | |
| 27 | |
| 28 // Returns the maximum number of output streams allowed. | |
| 29 virtual int GetMaximumOutputStreamsAllowed() const = 0; | |
|
halliwell
2015/07/29 22:10:14
In general, don't we stay away from const on objec
slan
2015/07/30 21:00:42
Done.
| |
| 30 | |
| 31 // Returns the preferred output stream parameters. The caller may inject | |
| 32 // |suggested| parameters, but it is left to the implementation to decide | |
| 33 // which of these to return. | |
| 34 virtual AudioParameters GetPreferredOutputStreamParameters( | |
| 35 const AudioParameters& suggested) const = 0; | |
| 36 | |
| 37 // Creates the output stream with parameters described by |params|. The stream | |
| 38 // should be created on the thread on which this is called. Caller does not | |
| 39 // take ownership of the returned stream. All callbacks to | |
| 40 // CastAudioOutputStream::AudioSourceCallback objects should be made on the | |
| 41 // thread to which |task_runner| belongs. | |
| 42 virtual CastAudioOutputStream* MakeOutputStream(const AudioParameters& params, | |
| 43 TaskRunner* task_runner) = 0; | |
| 44 }; | |
| 45 | |
| 46 } // namespace media | |
| 47 } // namespace chromecast | |
| 48 | |
| 49 #endif // CHROMECAST_PUBLIC_CAST_AUDIO_OUTPUT_DEVICE_H_ | |
| OLD | NEW |