Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: chromecast/public/avsettings.h

Issue 2712883006: [Chromecast] Add new volume control API to CastMediaShlib (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/public/BUILD.gn ('k') | chromecast/public/media/media_pipeline_device_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 the media shlib using
77 // the VolumeControl API (see chromecast/public/volume_control.h).
76 // This event shall be fired whenever the system volume level or muted state 78 // 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, 79 // are changed including when user changed volume via a remote controller,
78 // or after a call to SetAudioVolume() or SetAudioMuted(). 80 // or after a call to SetAudioVolume() or SetAudioMuted().
79 // On this event, GetAudioVolume() and IsAudioMuted() will be called on 81 // On this event, GetAudioVolume() and IsAudioMuted() will be called on
80 // the thread where Initialize() was called. 82 // the thread where Initialize() was called.
81 AUDIO_VOLUME_CHANGED = 1, 83 AUDIO_VOLUME_CHANGED = 1,
82 84
83 // This event shall be fired whenever the audio codecs supported by the 85 // This event shall be fired whenever the audio codecs supported by the
84 // device (or HDMI sinks connected to the device) are changed. 86 // device (or HDMI sinks connected to the device) are changed.
85 // On this event, GetAudioCodecsSupported() and GetMaxAudioChannels() will 87 // On this event, GetAudioCodecsSupported() and GetMaxAudioChannels() will
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // interval is specified by platform; returns false if interval should defer 198 // interval is specified by platform; returns false if interval should defer
197 // to default values. 199 // to default values.
198 // 200 //
199 // Current default volume step intervals per control type are as follows: 201 // Current default volume step intervals per control type are as follows:
200 // - MASTER_VOLUME: 0.05 (5%) 202 // - MASTER_VOLUME: 0.05 (5%)
201 // - ATTENUATION_VOLUME: 0.02 (2%) 203 // - ATTENUATION_VOLUME: 0.02 (2%)
202 // - FIXED_VOLUME: 0.01 (1%) 204 // - FIXED_VOLUME: 0.01 (1%)
203 // - UNKNOWN_VOLUME: 0.01 (1%) 205 // - UNKNOWN_VOLUME: 0.01 (1%)
204 virtual bool GetAudioVolumeStepInterval(float* step_inteval) = 0; 206 virtual bool GetAudioVolumeStepInterval(float* step_inteval) = 0;
205 207
208 // DEPRECATED - Prefer to implement volume control in the media shlib using
209 // the VolumeControl API (see chromecast/public/volume_control.h).
206 // Returns the current volume level, which must be from 0.0 (inclusive) to 210 // Returns the current volume level, which must be from 0.0 (inclusive) to
207 // 1.0 (inclusive). 211 // 1.0 (inclusive).
208 virtual float GetAudioVolume() = 0; 212 virtual float GetAudioVolume() = 0;
209 213
214 // DEPRECATED - Prefer to implement volume control in the media shlib using
215 // the VolumeControl API (see chromecast/public/volume_control.h).
210 // Sets new volume level of the device (or HDMI sinks). |level| is from 0.0 216 // Sets new volume level of the device (or HDMI sinks). |level| is from 0.0
211 // (inclusive) to 1.0 (inclusive). 217 // (inclusive) to 1.0 (inclusive).
212 // If successful and the level has changed, it must return true and fire 218 // If successful and the level has changed, it must return true and fire
213 // AUDIO_VOLUME_CHANGED. 219 // AUDIO_VOLUME_CHANGED.
214 virtual bool SetAudioVolume(float level) = 0; 220 virtual bool SetAudioVolume(float level) = 0;
215 221
222 // DEPRECATED - Prefer to implement volume control in the media shlib using
223 // the VolumeControl API (see chromecast/public/volume_control.h).
216 // Whether or not the device (or HDMI sinks) is muted. 224 // Whether or not the device (or HDMI sinks) is muted.
217 virtual bool IsAudioMuted() = 0; 225 virtual bool IsAudioMuted() = 0;
218 226
227 // DEPRECATED - Prefer to implement volume control in the media shlib using
228 // the VolumeControl API (see chromecast/public/volume_control.h).
219 // Sets the device (or HDMI sinks) muted. 229 // Sets the device (or HDMI sinks) muted.
220 // If successful and the muted state has changed, it must return true and fire 230 // If successful and the muted state has changed, it must return true and fire
221 // AUDIO_VOLUME_CHANGED. 231 // AUDIO_VOLUME_CHANGED.
222 virtual bool SetAudioMuted(bool muted) = 0; 232 virtual bool SetAudioMuted(bool muted) = 0;
223 233
224 // Gets audio codecs supported by the device (or HDMI sinks). 234 // Gets audio codecs supported by the device (or HDMI sinks).
225 // The result is an integer of OR'ed AudioCodec values. 235 // The result is an integer of OR'ed AudioCodec values.
226 virtual int GetAudioCodecsSupported() = 0; 236 virtual int GetAudioCodecsSupported() = 0;
227 237
228 // Gets maximum number of channels for given audio codec, |codec|. 238 // Gets maximum number of channels for given audio codec, |codec|.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // the current HDMI mode. Returns false otherwise. 333 // the current HDMI mode. Returns false otherwise.
324 // 334 //
325 // Non-HDMI devices should return false. 335 // Non-HDMI devices should return false.
326 virtual bool IsHdrOutputSupportedByCurrentHdmiVideoMode( 336 virtual bool IsHdrOutputSupportedByCurrentHdmiVideoMode(
327 HdrOutputType output_type) = 0; 337 HdrOutputType output_type) = 0;
328 }; 338 };
329 339
330 } // namespace chromecast 340 } // namespace chromecast
331 341
332 #endif // CHROMECAST_PUBLIC_AVSETTINGS_H_ 342 #endif // CHROMECAST_PUBLIC_AVSETTINGS_H_
OLDNEW
« no previous file with comments | « chromecast/public/BUILD.gn ('k') | chromecast/public/media/media_pipeline_device_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698