Chromium Code Reviews| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 64 |
| 65 // Sets the playback volume, with range [0.0, 1.0] inclusive. | 65 // Sets the playback volume, with range [0.0, 1.0] inclusive. |
| 66 // Returns |true| on success. | 66 // Returns |true| on success. |
| 67 virtual bool SetVolume(double volume) = 0; | 67 virtual bool SetVolume(double volume) = 0; |
| 68 | 68 |
| 69 // Returns current output device information. If the information is not | 69 // Returns current output device information. If the information is not |
| 70 // available yet, this method may block until it becomes available. | 70 // available yet, this method may block until it becomes available. |
| 71 // If the sink is not associated with any output device, |device_status| of | 71 // If the sink is not associated with any output device, |device_status| of |
| 72 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL. | 72 // OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL. |
| 73 // Must never be called on the IO thread. | 73 // Must never be called on the IO thread. |
| 74 virtual OutputDeviceInfo GetOutputDeviceInfo() = 0; | 74 virtual OutputDeviceInfo GetOutputDeviceInfo( |
| 75 const AudioParameters& preferred_params = AudioParameters()) = 0; | |
|
o1ka
2017/04/26 14:27:54
I understand why you are doing this for https://co
flim-chromium
2017/04/26 16:24:09
|preferred_params| would be the native parameters
o1ka
2017/04/26 17:40:29
This does not quite make sense to me in the contex
DaleCurtis
2017/04/26 18:25:59
That should be okay, we'll just end using the brow
| |
| 75 | 76 |
| 76 // If DCHECKs are enabled, this function returns true if called on rendering | 77 // If DCHECKs are enabled, this function returns true if called on rendering |
| 77 // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it | 78 // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it |
| 78 // is intended to be used for DCHECKing. | 79 // is intended to be used for DCHECKing. |
| 79 virtual bool CurrentThreadIsRenderingThread() = 0; | 80 virtual bool CurrentThreadIsRenderingThread() = 0; |
| 80 | 81 |
| 81 protected: | 82 protected: |
| 82 friend class base::RefCountedThreadSafe<AudioRendererSink>; | 83 friend class base::RefCountedThreadSafe<AudioRendererSink>; |
| 83 virtual ~AudioRendererSink() {} | 84 virtual ~AudioRendererSink() {} |
| 84 }; | 85 }; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 104 const url::Origin& security_origin, | 105 const url::Origin& security_origin, |
| 105 const OutputDeviceStatusCB& callback) = 0; | 106 const OutputDeviceStatusCB& callback) = 0; |
| 106 | 107 |
| 107 protected: | 108 protected: |
| 108 ~SwitchableAudioRendererSink() override {} | 109 ~SwitchableAudioRendererSink() override {} |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace media | 112 } // namespace media |
| 112 | 113 |
| 113 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 114 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
| OLD | NEW |