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 media_pipe_mojom; | 5 library media_pipe_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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 Map toJson() { | 91 Map toJson() { |
92 Map map = new Map(); | 92 Map map = new Map(); |
93 map["offset"] = offset; | 93 map["offset"] = offset; |
94 map["length"] = length; | 94 map["length"] = length; |
95 return map; | 95 return map; |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 | 99 |
100 | |
101 | |
102 class MediaPacket extends bindings.Struct { | 100 class MediaPacket extends bindings.Struct { |
103 static const List<bindings.StructDataHeader> kVersions = const [ | 101 static const List<bindings.StructDataHeader> kVersions = const [ |
104 const bindings.StructDataHeader(48, 0) | 102 const bindings.StructDataHeader(48, 0) |
105 ]; | 103 ]; |
106 static const int kNoTimestamp = 9223372036854775807; | 104 static const int kNoTimestamp = 9223372036854775807; |
107 int pts = 9223372036854775807; | 105 int pts = 9223372036854775807; |
108 int duration = 0; | 106 int duration = 0; |
109 bool endOfStream = false; | 107 bool endOfStream = false; |
110 MediaPacketRegion payload = null; | 108 MediaPacketRegion payload = null; |
111 List<MediaPacketRegion> extraPayload = null; | 109 List<MediaPacketRegion> extraPayload = null; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 map["pts"] = pts; | 238 map["pts"] = pts; |
241 map["duration"] = duration; | 239 map["duration"] = duration; |
242 map["endOfStream"] = endOfStream; | 240 map["endOfStream"] = endOfStream; |
243 map["payload"] = payload; | 241 map["payload"] = payload; |
244 map["extraPayload"] = extraPayload; | 242 map["extraPayload"] = extraPayload; |
245 return map; | 243 return map; |
246 } | 244 } |
247 } | 245 } |
248 | 246 |
249 | 247 |
250 | |
251 | |
252 class _MediaPipeSetBufferParams extends bindings.Struct { | 248 class _MediaPipeSetBufferParams extends bindings.Struct { |
253 static const List<bindings.StructDataHeader> kVersions = const [ | 249 static const List<bindings.StructDataHeader> kVersions = const [ |
254 const bindings.StructDataHeader(24, 0) | 250 const bindings.StructDataHeader(24, 0) |
255 ]; | 251 ]; |
256 core.MojoSharedBuffer buffer = null; | 252 core.MojoSharedBuffer buffer = null; |
257 int size = 0; | 253 int size = 0; |
258 | 254 |
259 _MediaPipeSetBufferParams() : super(kVersions.last.size); | 255 _MediaPipeSetBufferParams() : super(kVersions.last.size); |
260 | 256 |
261 static _MediaPipeSetBufferParams deserialize(bindings.Message message) { | 257 static _MediaPipeSetBufferParams deserialize(bindings.Message message) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 "size: $size" ")"; | 322 "size: $size" ")"; |
327 } | 323 } |
328 | 324 |
329 Map toJson() { | 325 Map toJson() { |
330 throw new bindings.MojoCodecError( | 326 throw new bindings.MojoCodecError( |
331 'Object containing handles cannot be encoded to JSON.'); | 327 'Object containing handles cannot be encoded to JSON.'); |
332 } | 328 } |
333 } | 329 } |
334 | 330 |
335 | 331 |
336 | |
337 | |
338 class _MediaPipeSendPacketParams extends bindings.Struct { | 332 class _MediaPipeSendPacketParams extends bindings.Struct { |
339 static const List<bindings.StructDataHeader> kVersions = const [ | 333 static const List<bindings.StructDataHeader> kVersions = const [ |
340 const bindings.StructDataHeader(16, 0) | 334 const bindings.StructDataHeader(16, 0) |
341 ]; | 335 ]; |
342 MediaPacket packet = null; | 336 MediaPacket packet = null; |
343 | 337 |
344 _MediaPipeSendPacketParams() : super(kVersions.last.size); | 338 _MediaPipeSendPacketParams() : super(kVersions.last.size); |
345 | 339 |
346 static _MediaPipeSendPacketParams deserialize(bindings.Message message) { | 340 static _MediaPipeSendPacketParams deserialize(bindings.Message message) { |
347 var decoder = new bindings.Decoder(message); | 341 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 395 } |
402 | 396 |
403 Map toJson() { | 397 Map toJson() { |
404 Map map = new Map(); | 398 Map map = new Map(); |
405 map["packet"] = packet; | 399 map["packet"] = packet; |
406 return map; | 400 return map; |
407 } | 401 } |
408 } | 402 } |
409 | 403 |
410 | 404 |
411 | |
412 | |
413 class MediaPipeSendPacketResponseParams extends bindings.Struct { | 405 class MediaPipeSendPacketResponseParams extends bindings.Struct { |
414 static const List<bindings.StructDataHeader> kVersions = const [ | 406 static const List<bindings.StructDataHeader> kVersions = const [ |
415 const bindings.StructDataHeader(16, 0) | 407 const bindings.StructDataHeader(16, 0) |
416 ]; | 408 ]; |
417 MediaPipeSendResult result = null; | 409 MediaPipeSendResult result = null; |
418 | 410 |
419 MediaPipeSendPacketResponseParams() : super(kVersions.last.size); | 411 MediaPipeSendPacketResponseParams() : super(kVersions.last.size); |
420 | 412 |
421 static MediaPipeSendPacketResponseParams deserialize(bindings.Message message)
{ | 413 static MediaPipeSendPacketResponseParams deserialize(bindings.Message message)
{ |
422 var decoder = new bindings.Decoder(message); | 414 var decoder = new bindings.Decoder(message); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 } | 471 } |
480 | 472 |
481 Map toJson() { | 473 Map toJson() { |
482 Map map = new Map(); | 474 Map map = new Map(); |
483 map["result"] = result; | 475 map["result"] = result; |
484 return map; | 476 return map; |
485 } | 477 } |
486 } | 478 } |
487 | 479 |
488 | 480 |
489 | |
490 | |
491 class _MediaPipeFlushParams extends bindings.Struct { | 481 class _MediaPipeFlushParams extends bindings.Struct { |
492 static const List<bindings.StructDataHeader> kVersions = const [ | 482 static const List<bindings.StructDataHeader> kVersions = const [ |
493 const bindings.StructDataHeader(8, 0) | 483 const bindings.StructDataHeader(8, 0) |
494 ]; | 484 ]; |
495 | 485 |
496 _MediaPipeFlushParams() : super(kVersions.last.size); | 486 _MediaPipeFlushParams() : super(kVersions.last.size); |
497 | 487 |
498 static _MediaPipeFlushParams deserialize(bindings.Message message) { | 488 static _MediaPipeFlushParams deserialize(bindings.Message message) { |
499 var decoder = new bindings.Decoder(message); | 489 var decoder = new bindings.Decoder(message); |
500 var result = decode(decoder); | 490 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 return "_MediaPipeFlushParams("")"; | 529 return "_MediaPipeFlushParams("")"; |
540 } | 530 } |
541 | 531 |
542 Map toJson() { | 532 Map toJson() { |
543 Map map = new Map(); | 533 Map map = new Map(); |
544 return map; | 534 return map; |
545 } | 535 } |
546 } | 536 } |
547 | 537 |
548 | 538 |
549 | |
550 | |
551 class MediaPipeFlushResponseParams extends bindings.Struct { | 539 class MediaPipeFlushResponseParams extends bindings.Struct { |
552 static const List<bindings.StructDataHeader> kVersions = const [ | 540 static const List<bindings.StructDataHeader> kVersions = const [ |
553 const bindings.StructDataHeader(8, 0) | 541 const bindings.StructDataHeader(8, 0) |
554 ]; | 542 ]; |
555 | 543 |
556 MediaPipeFlushResponseParams() : super(kVersions.last.size); | 544 MediaPipeFlushResponseParams() : super(kVersions.last.size); |
557 | 545 |
558 static MediaPipeFlushResponseParams deserialize(bindings.Message message) { | 546 static MediaPipeFlushResponseParams deserialize(bindings.Message message) { |
559 var decoder = new bindings.Decoder(message); | 547 var decoder = new bindings.Decoder(message); |
560 var result = decode(decoder); | 548 var result = decode(decoder); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 String toString() { | 586 String toString() { |
599 return "MediaPipeFlushResponseParams("")"; | 587 return "MediaPipeFlushResponseParams("")"; |
600 } | 588 } |
601 | 589 |
602 Map toJson() { | 590 Map toJson() { |
603 Map map = new Map(); | 591 Map map = new Map(); |
604 return map; | 592 return map; |
605 } | 593 } |
606 } | 594 } |
607 | 595 |
608 | |
609 | |
610 | |
611 const int _MediaPipe_setBufferName = 0; | 596 const int _MediaPipe_setBufferName = 0; |
612 const int _MediaPipe_sendPacketName = 1; | 597 const int _MediaPipe_sendPacketName = 1; |
613 const int _MediaPipe_flushName = 2; | 598 const int _MediaPipe_flushName = 2; |
614 | 599 |
615 class MediaPipeSendResult extends bindings.MojoEnum { | 600 class MediaPipeSendResult extends bindings.MojoEnum { |
616 static const MediaPipeSendResult consumed = const MediaPipeSendResult._(0); | 601 static const MediaPipeSendResult consumed = const MediaPipeSendResult._(0); |
617 static const MediaPipeSendResult flushed = const MediaPipeSendResult._(1); | 602 static const MediaPipeSendResult flushed = const MediaPipeSendResult._(1); |
618 | 603 |
619 const MediaPipeSendResult._(int v) : super(v); | 604 const MediaPipeSendResult._(int v) : super(v); |
620 | 605 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 case flushed: | 642 case flushed: |
658 return 'MediaPipeSendResult.flushed'; | 643 return 'MediaPipeSendResult.flushed'; |
659 default: | 644 default: |
660 return null; | 645 return null; |
661 } | 646 } |
662 } | 647 } |
663 | 648 |
664 int toJson() => mojoEnumValue; | 649 int toJson() => mojoEnumValue; |
665 } | 650 } |
666 | 651 |
667 | |
668 | |
669 | |
670 | |
671 class _MediaPipeServiceDescription implements service_describer.ServiceDescripti
on { | 652 class _MediaPipeServiceDescription implements service_describer.ServiceDescripti
on { |
672 dynamic getTopLevelInterface([Function responseFactory]) => | 653 dynamic getTopLevelInterface([Function responseFactory]) => |
673 responseFactory(null); | 654 responseFactory(null); |
674 | 655 |
675 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 656 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
676 responseFactory(null); | 657 responseFactory(null); |
677 | 658 |
678 dynamic getAllTypeDefinitions([Function responseFactory]) => | 659 dynamic getAllTypeDefinitions([Function responseFactory]) => |
679 responseFactory(null); | 660 responseFactory(null); |
680 } | 661 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 static service_describer.ServiceDescription get serviceDescription { | 944 static service_describer.ServiceDescription get serviceDescription { |
964 if (_cachedServiceDescription == null) { | 945 if (_cachedServiceDescription == null) { |
965 _cachedServiceDescription = new _MediaPipeServiceDescription(); | 946 _cachedServiceDescription = new _MediaPipeServiceDescription(); |
966 } | 947 } |
967 return _cachedServiceDescription; | 948 return _cachedServiceDescription; |
968 } | 949 } |
969 } | 950 } |
970 | 951 |
971 | 952 |
972 | 953 |
OLD | NEW |