OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 library audio_track_mojom; | 5 library audio_track_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/media/media_common.mojom.dart' as media_commo
n_mojom; | 10 import 'package:mojo_services/mojo/media/media_common.mojom.dart' as media_commo
n_mojom; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 Map toJson() { | 97 Map toJson() { |
98 Map map = new Map(); | 98 Map map = new Map(); |
99 map["supportedMediaTypes"] = supportedMediaTypes; | 99 map["supportedMediaTypes"] = supportedMediaTypes; |
100 return map; | 100 return map; |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 | 104 |
105 | |
106 | |
107 class AudioTrackConfiguration extends bindings.Struct { | 105 class AudioTrackConfiguration extends bindings.Struct { |
108 static const List<bindings.StructDataHeader> kVersions = const [ | 106 static const List<bindings.StructDataHeader> kVersions = const [ |
109 const bindings.StructDataHeader(24, 0) | 107 const bindings.StructDataHeader(24, 0) |
110 ]; | 108 ]; |
111 media_types_mojom.MediaType mediaType = null; | 109 media_types_mojom.MediaType mediaType = null; |
112 int audioFrameRatio = 1; | 110 int audioFrameRatio = 1; |
113 int mediaTimeRatio = 1; | 111 int mediaTimeRatio = 1; |
114 | 112 |
115 AudioTrackConfiguration() : super(kVersions.last.size); | 113 AudioTrackConfiguration() : super(kVersions.last.size); |
116 | 114 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 Map toJson() { | 196 Map toJson() { |
199 Map map = new Map(); | 197 Map map = new Map(); |
200 map["mediaType"] = mediaType; | 198 map["mediaType"] = mediaType; |
201 map["audioFrameRatio"] = audioFrameRatio; | 199 map["audioFrameRatio"] = audioFrameRatio; |
202 map["mediaTimeRatio"] = mediaTimeRatio; | 200 map["mediaTimeRatio"] = mediaTimeRatio; |
203 return map; | 201 return map; |
204 } | 202 } |
205 } | 203 } |
206 | 204 |
207 | 205 |
208 | |
209 | |
210 class _AudioTrackDescribeParams extends bindings.Struct { | 206 class _AudioTrackDescribeParams extends bindings.Struct { |
211 static const List<bindings.StructDataHeader> kVersions = const [ | 207 static const List<bindings.StructDataHeader> kVersions = const [ |
212 const bindings.StructDataHeader(8, 0) | 208 const bindings.StructDataHeader(8, 0) |
213 ]; | 209 ]; |
214 | 210 |
215 _AudioTrackDescribeParams() : super(kVersions.last.size); | 211 _AudioTrackDescribeParams() : super(kVersions.last.size); |
216 | 212 |
217 static _AudioTrackDescribeParams deserialize(bindings.Message message) { | 213 static _AudioTrackDescribeParams deserialize(bindings.Message message) { |
218 var decoder = new bindings.Decoder(message); | 214 var decoder = new bindings.Decoder(message); |
219 var result = decode(decoder); | 215 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return "_AudioTrackDescribeParams("")"; | 254 return "_AudioTrackDescribeParams("")"; |
259 } | 255 } |
260 | 256 |
261 Map toJson() { | 257 Map toJson() { |
262 Map map = new Map(); | 258 Map map = new Map(); |
263 return map; | 259 return map; |
264 } | 260 } |
265 } | 261 } |
266 | 262 |
267 | 263 |
268 | |
269 | |
270 class AudioTrackDescribeResponseParams extends bindings.Struct { | 264 class AudioTrackDescribeResponseParams extends bindings.Struct { |
271 static const List<bindings.StructDataHeader> kVersions = const [ | 265 static const List<bindings.StructDataHeader> kVersions = const [ |
272 const bindings.StructDataHeader(16, 0) | 266 const bindings.StructDataHeader(16, 0) |
273 ]; | 267 ]; |
274 AudioTrackDescriptor descriptor = null; | 268 AudioTrackDescriptor descriptor = null; |
275 | 269 |
276 AudioTrackDescribeResponseParams() : super(kVersions.last.size); | 270 AudioTrackDescribeResponseParams() : super(kVersions.last.size); |
277 | 271 |
278 static AudioTrackDescribeResponseParams deserialize(bindings.Message message)
{ | 272 static AudioTrackDescribeResponseParams deserialize(bindings.Message message)
{ |
279 var decoder = new bindings.Decoder(message); | 273 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 327 } |
334 | 328 |
335 Map toJson() { | 329 Map toJson() { |
336 Map map = new Map(); | 330 Map map = new Map(); |
337 map["descriptor"] = descriptor; | 331 map["descriptor"] = descriptor; |
338 return map; | 332 return map; |
339 } | 333 } |
340 } | 334 } |
341 | 335 |
342 | 336 |
343 | |
344 | |
345 class _AudioTrackConfigureParams extends bindings.Struct { | 337 class _AudioTrackConfigureParams extends bindings.Struct { |
346 static const List<bindings.StructDataHeader> kVersions = const [ | 338 static const List<bindings.StructDataHeader> kVersions = const [ |
347 const bindings.StructDataHeader(24, 0) | 339 const bindings.StructDataHeader(24, 0) |
348 ]; | 340 ]; |
349 AudioTrackConfiguration configuration = null; | 341 AudioTrackConfiguration configuration = null; |
350 Object pipe = null; | 342 Object pipe = null; |
351 | 343 |
352 _AudioTrackConfigureParams() : super(kVersions.last.size); | 344 _AudioTrackConfigureParams() : super(kVersions.last.size); |
353 | 345 |
354 static _AudioTrackConfigureParams deserialize(bindings.Message message) { | 346 static _AudioTrackConfigureParams deserialize(bindings.Message message) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 "pipe: $pipe" ")"; | 412 "pipe: $pipe" ")"; |
421 } | 413 } |
422 | 414 |
423 Map toJson() { | 415 Map toJson() { |
424 throw new bindings.MojoCodecError( | 416 throw new bindings.MojoCodecError( |
425 'Object containing handles cannot be encoded to JSON.'); | 417 'Object containing handles cannot be encoded to JSON.'); |
426 } | 418 } |
427 } | 419 } |
428 | 420 |
429 | 421 |
430 | |
431 | |
432 class _AudioTrackGetRateControlParams extends bindings.Struct { | 422 class _AudioTrackGetRateControlParams extends bindings.Struct { |
433 static const List<bindings.StructDataHeader> kVersions = const [ | 423 static const List<bindings.StructDataHeader> kVersions = const [ |
434 const bindings.StructDataHeader(16, 0) | 424 const bindings.StructDataHeader(16, 0) |
435 ]; | 425 ]; |
436 Object rateControl = null; | 426 Object rateControl = null; |
437 | 427 |
438 _AudioTrackGetRateControlParams() : super(kVersions.last.size); | 428 _AudioTrackGetRateControlParams() : super(kVersions.last.size); |
439 | 429 |
440 static _AudioTrackGetRateControlParams deserialize(bindings.Message message) { | 430 static _AudioTrackGetRateControlParams deserialize(bindings.Message message) { |
441 var decoder = new bindings.Decoder(message); | 431 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 "rateControl: $rateControl" ")"; | 483 "rateControl: $rateControl" ")"; |
494 } | 484 } |
495 | 485 |
496 Map toJson() { | 486 Map toJson() { |
497 throw new bindings.MojoCodecError( | 487 throw new bindings.MojoCodecError( |
498 'Object containing handles cannot be encoded to JSON.'); | 488 'Object containing handles cannot be encoded to JSON.'); |
499 } | 489 } |
500 } | 490 } |
501 | 491 |
502 | 492 |
503 | |
504 | |
505 class _AudioTrackSetGainParams extends bindings.Struct { | 493 class _AudioTrackSetGainParams extends bindings.Struct { |
506 static const List<bindings.StructDataHeader> kVersions = const [ | 494 static const List<bindings.StructDataHeader> kVersions = const [ |
507 const bindings.StructDataHeader(16, 0) | 495 const bindings.StructDataHeader(16, 0) |
508 ]; | 496 ]; |
509 double dbGain = 0.0; | 497 double dbGain = 0.0; |
510 | 498 |
511 _AudioTrackSetGainParams() : super(kVersions.last.size); | 499 _AudioTrackSetGainParams() : super(kVersions.last.size); |
512 | 500 |
513 static _AudioTrackSetGainParams deserialize(bindings.Message message) { | 501 static _AudioTrackSetGainParams deserialize(bindings.Message message) { |
514 var decoder = new bindings.Decoder(message); | 502 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 "dbGain: $dbGain" ")"; | 554 "dbGain: $dbGain" ")"; |
567 } | 555 } |
568 | 556 |
569 Map toJson() { | 557 Map toJson() { |
570 Map map = new Map(); | 558 Map map = new Map(); |
571 map["dbGain"] = dbGain; | 559 map["dbGain"] = dbGain; |
572 return map; | 560 return map; |
573 } | 561 } |
574 } | 562 } |
575 | 563 |
576 | |
577 | |
578 | |
579 const int _AudioTrack_describeName = 0; | 564 const int _AudioTrack_describeName = 0; |
580 const int _AudioTrack_configureName = 1; | 565 const int _AudioTrack_configureName = 1; |
581 const int _AudioTrack_getRateControlName = 2; | 566 const int _AudioTrack_getRateControlName = 2; |
582 const int _AudioTrack_setGainName = 3; | 567 const int _AudioTrack_setGainName = 3; |
583 | 568 |
584 | |
585 | |
586 class _AudioTrackServiceDescription implements service_describer.ServiceDescript
ion { | 569 class _AudioTrackServiceDescription implements service_describer.ServiceDescript
ion { |
587 dynamic getTopLevelInterface([Function responseFactory]) => | 570 dynamic getTopLevelInterface([Function responseFactory]) => |
588 responseFactory(null); | 571 responseFactory(null); |
589 | 572 |
590 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 573 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
591 responseFactory(null); | 574 responseFactory(null); |
592 | 575 |
593 dynamic getAllTypeDefinitions([Function responseFactory]) => | 576 dynamic getAllTypeDefinitions([Function responseFactory]) => |
594 responseFactory(null); | 577 responseFactory(null); |
595 } | 578 } |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 static service_describer.ServiceDescription get serviceDescription { | 836 static service_describer.ServiceDescription get serviceDescription { |
854 if (_cachedServiceDescription == null) { | 837 if (_cachedServiceDescription == null) { |
855 _cachedServiceDescription = new _AudioTrackServiceDescription(); | 838 _cachedServiceDescription = new _AudioTrackServiceDescription(); |
856 } | 839 } |
857 return _cachedServiceDescription; | 840 return _cachedServiceDescription; |
858 } | 841 } |
859 } | 842 } |
860 | 843 |
861 | 844 |
862 | 845 |
OLD | NEW |