| 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.media; | 6 module mojo.media; |
| 7 | 7 |
| 8 import "mojo/services/media/common/interfaces/media_common.mojom"; | 8 import "mojo/services/media/common/interfaces/media_common.mojom"; |
| 9 import "mojo/services/media/common/interfaces/media_pipe.mojom"; | 9 import "mojo/services/media/common/interfaces/media_pipe.mojom"; |
| 10 import "mojo/services/media/common/interfaces/media_types.mojom"; | 10 import "mojo/services/media/common/interfaces/media_types.mojom"; |
| 11 import "mojo/services/media/common/interfaces/rate_control.mojom"; | 11 import "mojo/services/media/common/interfaces/rate_control.mojom"; |
| 12 | 12 |
| 13 struct AudioTrackDescriptor { | 13 struct AudioTrackDescriptor { |
| 14 // The track supports the union of all these media type sets. | 14 // The track supports the union of all these media type sets. |
| 15 array<MediaTypeSet> supported_media_types; | 15 array<MediaTypeSet> supported_media_types; |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 struct AudioTrackConfiguration { | 18 struct AudioTrackConfiguration { |
| 19 // The media type to use. | 19 // The media type to use. |
| 20 MediaType media_type; | 20 MediaType media_type; |
| 21 | 21 |
| 22 // Desired maximum buffer size, in frames of audio. | |
| 23 uint64 max_frames; | |
| 24 | |
| 25 // Ratio of audio frames to media time ticks. | 22 // Ratio of audio frames to media time ticks. |
| 26 // | 23 // |
| 27 // Presentation time stamps on audio packets are expressed in units of media | 24 // Presentation time stamps on audio packets are expressed in units of media |
| 28 // time ticks. Many users will choose to use units of audio frames to express | 25 // time ticks. Many users will choose to use units of audio frames to express |
| 29 // their media time, and can simply leave this ratio at the default of 1:1. | 26 // their media time, and can simply leave this ratio at the default of 1:1. |
| 30 // For some, however, it may be more convenient to use different units for | 27 // For some, however, it may be more convenient to use different units for |
| 31 // media time. For example, if the audio frame rate was 48KHz, and the time | 28 // media time. For example, if the audio frame rate was 48KHz, and the time |
| 32 // stamps are expressed in 90KHz units (the units used by MPEG-2 Program | 29 // stamps are expressed in 90KHz units (the units used by MPEG-2 Program |
| 33 // Stream timestamps), the ratio should be set to 48000:90000 (aka, 8:15). | 30 // Stream timestamps), the ratio should be set to 48000:90000 (aka, 8:15). |
| 34 // IOW - audio_frame_ratio would be set to 8 and media_time_ratio would be set | 31 // IOW - audio_frame_ratio would be set to 8 and media_time_ratio would be set |
| (...skipping 20 matching lines...) Expand all Loading... |
| 55 | 52 |
| 56 // Request the rate control interface for this AudioTrack | 53 // Request the rate control interface for this AudioTrack |
| 57 GetRateControl(RateControl& rate_control); | 54 GetRateControl(RateControl& rate_control); |
| 58 | 55 |
| 59 // Sets the current gain/attenuation of the track, expressed in dB. Legal | 56 // Sets the current gain/attenuation of the track, expressed in dB. Legal |
| 60 // values are in the range [-inf, 20.0]. Any value less than or equal to the | 57 // values are in the range [-inf, 20.0]. Any value less than or equal to the |
| 61 // constant kMutedGain will result in the track becoming explicitly muted | 58 // constant kMutedGain will result in the track becoming explicitly muted |
| 62 // (regardless of its underlying resolution or intensity). | 59 // (regardless of its underlying resolution or intensity). |
| 63 SetGain(float db_gain); | 60 SetGain(float db_gain); |
| 64 }; | 61 }; |
| OLD | NEW |