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