OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 // Returns |true| on success. | 63 // Returns |true| on success. |
64 virtual bool SetVolume(double volume) = 0; | 64 virtual bool SetVolume(double volume) = 0; |
65 | 65 |
66 // Returns current output device information. If the information is not | 66 // Returns current output device information. If the information is not |
67 // available yet, this method may block until it becomes available. | 67 // available yet, this method may block until it becomes available. |
68 // If the sink is not associated with any output device, |device_status| of | 68 // If the sink is not associated with any output device, |device_status| of |
69 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL. | 69 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL. |
70 // Must never be called on the IO thread. | 70 // Must never be called on the IO thread. |
71 virtual OutputDeviceInfo GetOutputDeviceInfo() = 0; | 71 virtual OutputDeviceInfo GetOutputDeviceInfo() = 0; |
72 | 72 |
73 // If DCHECKs are enabled, this function returns true if called on rendering | |
74 // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it | |
75 // is intended to be used for DCHECKing. | |
tommi (sloooow) - chröme
2016/06/15 19:29:11
should we make this method only available in build
Henrik Grunell
2016/06/16 12:19:16
Same here, I slightly prefer not to clutter with i
| |
76 virtual bool CurrentThreadIsRenderingThread() = 0; | |
77 | |
73 protected: | 78 protected: |
74 friend class base::RefCountedThreadSafe<AudioRendererSink>; | 79 friend class base::RefCountedThreadSafe<AudioRendererSink>; |
75 virtual ~AudioRendererSink() {} | 80 virtual ~AudioRendererSink() {} |
76 }; | 81 }; |
77 | 82 |
78 // Same as AudioRendererSink except that Initialize() and Start() can be called | 83 // Same as AudioRendererSink except that Initialize() and Start() can be called |
79 // again after Stop(). | 84 // again after Stop(). |
80 // TODO(sandersd): Fold back into AudioRendererSink once all subclasses support | 85 // TODO(sandersd): Fold back into AudioRendererSink once all subclasses support |
81 // this. | 86 // this. |
82 | 87 |
(...skipping 13 matching lines...) Expand all Loading... | |
96 const url::Origin& security_origin, | 101 const url::Origin& security_origin, |
97 const OutputDeviceStatusCB& callback) = 0; | 102 const OutputDeviceStatusCB& callback) = 0; |
98 | 103 |
99 protected: | 104 protected: |
100 ~SwitchableAudioRendererSink() override {} | 105 ~SwitchableAudioRendererSink() override {} |
101 }; | 106 }; |
102 | 107 |
103 } // namespace media | 108 } // namespace media |
104 | 109 |
105 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 110 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
OLD | NEW |