Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CHROMECAST_PUBLIC_AVSETTINGS_H_ | 5 #ifndef CHROMECAST_PUBLIC_AVSETTINGS_H_ |
| 6 #define CHROMECAST_PUBLIC_AVSETTINGS_H_ | 6 #define CHROMECAST_PUBLIC_AVSETTINGS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "output_restrictions.h" | 10 #include "output_restrictions.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 enum Event { | 66 enum Event { |
| 67 // This event shall be fired whenever the active state is changed including | 67 // This event shall be fired whenever the active state is changed including |
| 68 // when the screen turned on, when the cast receiver (or the device where | 68 // when the screen turned on, when the cast receiver (or the device where |
| 69 // cast receiver is running on) became the active input source, or after a | 69 // cast receiver is running on) became the active input source, or after a |
| 70 // call to TurnActive() or TurnStandby(). | 70 // call to TurnActive() or TurnStandby(). |
| 71 // WakeSystem() may change the active state depending on implementation. | 71 // WakeSystem() may change the active state depending on implementation. |
| 72 // On this event, GetActiveState() will be called on the thread where | 72 // On this event, GetActiveState() will be called on the thread where |
| 73 // Initialize() was called. | 73 // Initialize() was called. |
| 74 ACTIVE_STATE_CHANGED = 0, | 74 ACTIVE_STATE_CHANGED = 0, |
| 75 | 75 |
| 76 // DEPRECATED - Prefer to implement volume control in CastMediaShlib. | |
|
halliwell
2017/02/24 21:37:21
What is OEM supposed to do with this info? What i
kmackay
2017/02/24 23:53:29
Well... we haven't really figured out what the pla
halliwell
2017/02/25 00:43:46
Ok. So can an OEM assume that if they implement t
kmackay
2017/02/25 02:01:08
Yes, if they implement the new API, the code will
| |
| 76 // This event shall be fired whenever the system volume level or muted state | 77 // This event shall be fired whenever the system volume level or muted state |
| 77 // are changed including when user changed volume via a remote controller, | 78 // are changed including when user changed volume via a remote controller, |
| 78 // or after a call to SetAudioVolume() or SetAudioMuted(). | 79 // or after a call to SetAudioVolume() or SetAudioMuted(). |
| 79 // On this event, GetAudioVolume() and IsAudioMuted() will be called on | 80 // On this event, GetAudioVolume() and IsAudioMuted() will be called on |
| 80 // the thread where Initialize() was called. | 81 // the thread where Initialize() was called. |
| 81 AUDIO_VOLUME_CHANGED = 1, | 82 AUDIO_VOLUME_CHANGED = 1, |
| 82 | 83 |
| 83 // This event shall be fired whenever the audio codecs supported by the | 84 // This event shall be fired whenever the audio codecs supported by the |
| 84 // device (or HDMI sinks connected to the device) are changed. | 85 // device (or HDMI sinks connected to the device) are changed. |
| 85 // On this event, GetAudioCodecsSupported() and GetMaxAudioChannels() will | 86 // On this event, GetAudioCodecsSupported() and GetMaxAudioChannels() will |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 // interval is specified by platform; returns false if interval should defer | 197 // interval is specified by platform; returns false if interval should defer |
| 197 // to default values. | 198 // to default values. |
| 198 // | 199 // |
| 199 // Current default volume step intervals per control type are as follows: | 200 // Current default volume step intervals per control type are as follows: |
| 200 // - MASTER_VOLUME: 0.05 (5%) | 201 // - MASTER_VOLUME: 0.05 (5%) |
| 201 // - ATTENUATION_VOLUME: 0.02 (2%) | 202 // - ATTENUATION_VOLUME: 0.02 (2%) |
| 202 // - FIXED_VOLUME: 0.01 (1%) | 203 // - FIXED_VOLUME: 0.01 (1%) |
| 203 // - UNKNOWN_VOLUME: 0.01 (1%) | 204 // - UNKNOWN_VOLUME: 0.01 (1%) |
| 204 virtual bool GetAudioVolumeStepInterval(float* step_inteval) = 0; | 205 virtual bool GetAudioVolumeStepInterval(float* step_inteval) = 0; |
| 205 | 206 |
| 207 // DEPRECATED - Prefer to implement volume control in CastMediaShlib. | |
| 206 // Returns the current volume level, which must be from 0.0 (inclusive) to | 208 // Returns the current volume level, which must be from 0.0 (inclusive) to |
| 207 // 1.0 (inclusive). | 209 // 1.0 (inclusive). |
| 208 virtual float GetAudioVolume() = 0; | 210 virtual float GetAudioVolume() = 0; |
| 209 | 211 |
| 212 // DEPRECATED - Prefer to implement volume control in CastMediaShlib. | |
| 210 // Sets new volume level of the device (or HDMI sinks). |level| is from 0.0 | 213 // Sets new volume level of the device (or HDMI sinks). |level| is from 0.0 |
| 211 // (inclusive) to 1.0 (inclusive). | 214 // (inclusive) to 1.0 (inclusive). |
| 212 // If successful and the level has changed, it must return true and fire | 215 // If successful and the level has changed, it must return true and fire |
| 213 // AUDIO_VOLUME_CHANGED. | 216 // AUDIO_VOLUME_CHANGED. |
| 214 virtual bool SetAudioVolume(float level) = 0; | 217 virtual bool SetAudioVolume(float level) = 0; |
| 215 | 218 |
| 219 // DEPRECATED - Prefer to implement volume control in CastMediaShlib. | |
| 216 // Whether or not the device (or HDMI sinks) is muted. | 220 // Whether or not the device (or HDMI sinks) is muted. |
| 217 virtual bool IsAudioMuted() = 0; | 221 virtual bool IsAudioMuted() = 0; |
| 218 | 222 |
| 223 // DEPRECATED - Prefer to implement volume control in CastMediaShlib. | |
| 219 // Sets the device (or HDMI sinks) muted. | 224 // Sets the device (or HDMI sinks) muted. |
| 220 // If successful and the muted state has changed, it must return true and fire | 225 // If successful and the muted state has changed, it must return true and fire |
| 221 // AUDIO_VOLUME_CHANGED. | 226 // AUDIO_VOLUME_CHANGED. |
| 222 virtual bool SetAudioMuted(bool muted) = 0; | 227 virtual bool SetAudioMuted(bool muted) = 0; |
| 223 | 228 |
| 224 // Gets audio codecs supported by the device (or HDMI sinks). | 229 // Gets audio codecs supported by the device (or HDMI sinks). |
| 225 // The result is an integer of OR'ed AudioCodec values. | 230 // The result is an integer of OR'ed AudioCodec values. |
| 226 virtual int GetAudioCodecsSupported() = 0; | 231 virtual int GetAudioCodecsSupported() = 0; |
| 227 | 232 |
| 228 // Gets maximum number of channels for given audio codec, |codec|. | 233 // Gets maximum number of channels for given audio codec, |codec|. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 // the current HDMI mode. Returns false otherwise. | 328 // the current HDMI mode. Returns false otherwise. |
| 324 // | 329 // |
| 325 // Non-HDMI devices should return false. | 330 // Non-HDMI devices should return false. |
| 326 virtual bool IsHdrOutputSupportedByCurrentHdmiVideoMode( | 331 virtual bool IsHdrOutputSupportedByCurrentHdmiVideoMode( |
| 327 HdrOutputType output_type) = 0; | 332 HdrOutputType output_type) = 0; |
| 328 }; | 333 }; |
| 329 | 334 |
| 330 } // namespace chromecast | 335 } // namespace chromecast |
| 331 | 336 |
| 332 #endif // CHROMECAST_PUBLIC_AVSETTINGS_H_ | 337 #endif // CHROMECAST_PUBLIC_AVSETTINGS_H_ |
| OLD | NEW |