| Index: mojo/dart/packages/mojo_services/lib/mojo/media/media_types.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_types.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_types.mojom.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..358decafa1f133128b30761f7ae4271ea4a6acb9
|
| --- /dev/null
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_types.mojom.dart
|
| @@ -0,0 +1,2153 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +library media_types_mojom;
|
| +
|
| +import 'dart:async';
|
| +
|
| +import 'package:mojo/bindings.dart' as bindings;
|
| +import 'package:mojo/core.dart' as core;
|
| +class MediaTypeScheme extends bindings.MojoEnum {
|
| + static const UNKNOWN = const MediaTypeScheme._(0);
|
| + static const NONE = const MediaTypeScheme._(1);
|
| + static const ANY_ELEMENTARY = const MediaTypeScheme._(2);
|
| + static const ANY_AUDIO = const MediaTypeScheme._(3);
|
| + static const ANY_VIDEO = const MediaTypeScheme._(4);
|
| + static const ANY_SUBPICTURE = const MediaTypeScheme._(5);
|
| + static const ANY_TEXT = const MediaTypeScheme._(6);
|
| + static const ANY_MULTIPLEXED = const MediaTypeScheme._(7);
|
| + static const ANY = const MediaTypeScheme._(8);
|
| + static const MULTIPLEXED = const MediaTypeScheme._(9);
|
| + static const LPCM = const MediaTypeScheme._(10);
|
| + static const COMPRESSED_AUDIO = const MediaTypeScheme._(11);
|
| + static const VIDEO = const MediaTypeScheme._(12);
|
| +
|
| + const MediaTypeScheme._(int v) : super(v);
|
| +
|
| + static const Map<String, MediaTypeScheme> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "NONE": NONE,
|
| + "ANY_ELEMENTARY": ANY_ELEMENTARY,
|
| + "ANY_AUDIO": ANY_AUDIO,
|
| + "ANY_VIDEO": ANY_VIDEO,
|
| + "ANY_SUBPICTURE": ANY_SUBPICTURE,
|
| + "ANY_TEXT": ANY_TEXT,
|
| + "ANY_MULTIPLEXED": ANY_MULTIPLEXED,
|
| + "ANY": ANY,
|
| + "MULTIPLEXED": MULTIPLEXED,
|
| + "LPCM": LPCM,
|
| + "COMPRESSED_AUDIO": COMPRESSED_AUDIO,
|
| + "VIDEO": VIDEO,
|
| + };
|
| + static const List<MediaTypeScheme> values = const [
|
| + UNKNOWN,
|
| + NONE,
|
| + ANY_ELEMENTARY,
|
| + ANY_AUDIO,
|
| + ANY_VIDEO,
|
| + ANY_SUBPICTURE,
|
| + ANY_TEXT,
|
| + ANY_MULTIPLEXED,
|
| + ANY,
|
| + MULTIPLEXED,
|
| + LPCM,
|
| + COMPRESSED_AUDIO,
|
| + VIDEO,
|
| + ];
|
| +
|
| + static MediaTypeScheme valueOf(String name) => valuesMap[name];
|
| +
|
| + factory MediaTypeScheme(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return NONE;
|
| + case 2:
|
| + return ANY_ELEMENTARY;
|
| + case 3:
|
| + return ANY_AUDIO;
|
| + case 4:
|
| + return ANY_VIDEO;
|
| + case 5:
|
| + return ANY_SUBPICTURE;
|
| + case 6:
|
| + return ANY_TEXT;
|
| + case 7:
|
| + return ANY_MULTIPLEXED;
|
| + case 8:
|
| + return ANY;
|
| + case 9:
|
| + return MULTIPLEXED;
|
| + case 10:
|
| + return LPCM;
|
| + case 11:
|
| + return COMPRESSED_AUDIO;
|
| + case 12:
|
| + return VIDEO;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static MediaTypeScheme decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + MediaTypeScheme result = new MediaTypeScheme(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum MediaTypeScheme.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'MediaTypeScheme.UNKNOWN';
|
| + case NONE:
|
| + return 'MediaTypeScheme.NONE';
|
| + case ANY_ELEMENTARY:
|
| + return 'MediaTypeScheme.ANY_ELEMENTARY';
|
| + case ANY_AUDIO:
|
| + return 'MediaTypeScheme.ANY_AUDIO';
|
| + case ANY_VIDEO:
|
| + return 'MediaTypeScheme.ANY_VIDEO';
|
| + case ANY_SUBPICTURE:
|
| + return 'MediaTypeScheme.ANY_SUBPICTURE';
|
| + case ANY_TEXT:
|
| + return 'MediaTypeScheme.ANY_TEXT';
|
| + case ANY_MULTIPLEXED:
|
| + return 'MediaTypeScheme.ANY_MULTIPLEXED';
|
| + case ANY:
|
| + return 'MediaTypeScheme.ANY';
|
| + case MULTIPLEXED:
|
| + return 'MediaTypeScheme.MULTIPLEXED';
|
| + case LPCM:
|
| + return 'MediaTypeScheme.LPCM';
|
| + case COMPRESSED_AUDIO:
|
| + return 'MediaTypeScheme.COMPRESSED_AUDIO';
|
| + case VIDEO:
|
| + return 'MediaTypeScheme.VIDEO';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class BoolRange extends bindings.MojoEnum {
|
| + static const FALSE = const BoolRange._(0);
|
| + static const TRUE = const BoolRange._(1);
|
| + static const EITHER = const BoolRange._(2);
|
| +
|
| + const BoolRange._(int v) : super(v);
|
| +
|
| + static const Map<String, BoolRange> valuesMap = const {
|
| + "FALSE": FALSE,
|
| + "TRUE": TRUE,
|
| + "EITHER": EITHER,
|
| + };
|
| + static const List<BoolRange> values = const [
|
| + FALSE,
|
| + TRUE,
|
| + EITHER,
|
| + ];
|
| +
|
| + static BoolRange valueOf(String name) => valuesMap[name];
|
| +
|
| + factory BoolRange(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return FALSE;
|
| + case 1:
|
| + return TRUE;
|
| + case 2:
|
| + return EITHER;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static BoolRange decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + BoolRange result = new BoolRange(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum BoolRange.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case FALSE:
|
| + return 'BoolRange.FALSE';
|
| + case TRUE:
|
| + return 'BoolRange.TRUE';
|
| + case EITHER:
|
| + return 'BoolRange.EITHER';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class LpcmSampleFormat extends bindings.MojoEnum {
|
| + static const UNKNOWN = const LpcmSampleFormat._(0);
|
| + static const ANY = const LpcmSampleFormat._(1);
|
| + static const UNSIGNED_8 = const LpcmSampleFormat._(2);
|
| + static const SIGNED_16 = const LpcmSampleFormat._(3);
|
| + static const SIGNED_16_LITTLE_ENDIAN = const LpcmSampleFormat._(4);
|
| + static const SIGNED_16_BIG_ENDIAN = const LpcmSampleFormat._(5);
|
| + static const SIGNED_24_IN_32 = const LpcmSampleFormat._(6);
|
| + static const SIGNED_24_IN_32_LITTLE_ENDIAN = const LpcmSampleFormat._(7);
|
| + static const SIGNED_24_IN_32_BIG_ENDIAN = const LpcmSampleFormat._(8);
|
| + static const FLOAT = const LpcmSampleFormat._(9);
|
| +
|
| + const LpcmSampleFormat._(int v) : super(v);
|
| +
|
| + static const Map<String, LpcmSampleFormat> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "ANY": ANY,
|
| + "UNSIGNED_8": UNSIGNED_8,
|
| + "SIGNED_16": SIGNED_16,
|
| + "SIGNED_16_LITTLE_ENDIAN": SIGNED_16_LITTLE_ENDIAN,
|
| + "SIGNED_16_BIG_ENDIAN": SIGNED_16_BIG_ENDIAN,
|
| + "SIGNED_24_IN_32": SIGNED_24_IN_32,
|
| + "SIGNED_24_IN_32_LITTLE_ENDIAN": SIGNED_24_IN_32_LITTLE_ENDIAN,
|
| + "SIGNED_24_IN_32_BIG_ENDIAN": SIGNED_24_IN_32_BIG_ENDIAN,
|
| + "FLOAT": FLOAT,
|
| + };
|
| + static const List<LpcmSampleFormat> values = const [
|
| + UNKNOWN,
|
| + ANY,
|
| + UNSIGNED_8,
|
| + SIGNED_16,
|
| + SIGNED_16_LITTLE_ENDIAN,
|
| + SIGNED_16_BIG_ENDIAN,
|
| + SIGNED_24_IN_32,
|
| + SIGNED_24_IN_32_LITTLE_ENDIAN,
|
| + SIGNED_24_IN_32_BIG_ENDIAN,
|
| + FLOAT,
|
| + ];
|
| +
|
| + static LpcmSampleFormat valueOf(String name) => valuesMap[name];
|
| +
|
| + factory LpcmSampleFormat(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return ANY;
|
| + case 2:
|
| + return UNSIGNED_8;
|
| + case 3:
|
| + return SIGNED_16;
|
| + case 4:
|
| + return SIGNED_16_LITTLE_ENDIAN;
|
| + case 5:
|
| + return SIGNED_16_BIG_ENDIAN;
|
| + case 6:
|
| + return SIGNED_24_IN_32;
|
| + case 7:
|
| + return SIGNED_24_IN_32_LITTLE_ENDIAN;
|
| + case 8:
|
| + return SIGNED_24_IN_32_BIG_ENDIAN;
|
| + case 9:
|
| + return FLOAT;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static LpcmSampleFormat decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + LpcmSampleFormat result = new LpcmSampleFormat(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum LpcmSampleFormat.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'LpcmSampleFormat.UNKNOWN';
|
| + case ANY:
|
| + return 'LpcmSampleFormat.ANY';
|
| + case UNSIGNED_8:
|
| + return 'LpcmSampleFormat.UNSIGNED_8';
|
| + case SIGNED_16:
|
| + return 'LpcmSampleFormat.SIGNED_16';
|
| + case SIGNED_16_LITTLE_ENDIAN:
|
| + return 'LpcmSampleFormat.SIGNED_16_LITTLE_ENDIAN';
|
| + case SIGNED_16_BIG_ENDIAN:
|
| + return 'LpcmSampleFormat.SIGNED_16_BIG_ENDIAN';
|
| + case SIGNED_24_IN_32:
|
| + return 'LpcmSampleFormat.SIGNED_24_IN_32';
|
| + case SIGNED_24_IN_32_LITTLE_ENDIAN:
|
| + return 'LpcmSampleFormat.SIGNED_24_IN_32_LITTLE_ENDIAN';
|
| + case SIGNED_24_IN_32_BIG_ENDIAN:
|
| + return 'LpcmSampleFormat.SIGNED_24_IN_32_BIG_ENDIAN';
|
| + case FLOAT:
|
| + return 'LpcmSampleFormat.FLOAT';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class AudioEncoding extends bindings.MojoEnum {
|
| + static const UNKNOWN = const AudioEncoding._(0);
|
| + static const ANY = const AudioEncoding._(1);
|
| + static const VORBIS = const AudioEncoding._(2);
|
| +
|
| + const AudioEncoding._(int v) : super(v);
|
| +
|
| + static const Map<String, AudioEncoding> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "ANY": ANY,
|
| + "VORBIS": VORBIS,
|
| + };
|
| + static const List<AudioEncoding> values = const [
|
| + UNKNOWN,
|
| + ANY,
|
| + VORBIS,
|
| + ];
|
| +
|
| + static AudioEncoding valueOf(String name) => valuesMap[name];
|
| +
|
| + factory AudioEncoding(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return ANY;
|
| + case 2:
|
| + return VORBIS;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static AudioEncoding decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + AudioEncoding result = new AudioEncoding(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum AudioEncoding.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'AudioEncoding.UNKNOWN';
|
| + case ANY:
|
| + return 'AudioEncoding.ANY';
|
| + case VORBIS:
|
| + return 'AudioEncoding.VORBIS';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class VideoEncoding extends bindings.MojoEnum {
|
| + static const UNKNOWN = const VideoEncoding._(0);
|
| + static const ANY = const VideoEncoding._(1);
|
| + static const THEORA = const VideoEncoding._(2);
|
| + static const VP8 = const VideoEncoding._(3);
|
| +
|
| + const VideoEncoding._(int v) : super(v);
|
| +
|
| + static const Map<String, VideoEncoding> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "ANY": ANY,
|
| + "THEORA": THEORA,
|
| + "VP8": VP8,
|
| + };
|
| + static const List<VideoEncoding> values = const [
|
| + UNKNOWN,
|
| + ANY,
|
| + THEORA,
|
| + VP8,
|
| + ];
|
| +
|
| + static VideoEncoding valueOf(String name) => valuesMap[name];
|
| +
|
| + factory VideoEncoding(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return ANY;
|
| + case 2:
|
| + return THEORA;
|
| + case 3:
|
| + return VP8;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static VideoEncoding decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + VideoEncoding result = new VideoEncoding(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum VideoEncoding.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'VideoEncoding.UNKNOWN';
|
| + case ANY:
|
| + return 'VideoEncoding.ANY';
|
| + case THEORA:
|
| + return 'VideoEncoding.THEORA';
|
| + case VP8:
|
| + return 'VideoEncoding.VP8';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class VideoProfile extends bindings.MojoEnum {
|
| + static const UNKNOWN = const VideoProfile._(0);
|
| + static const NOT_APPLICABLE = const VideoProfile._(1);
|
| + static const H264_BASELINE = const VideoProfile._(2);
|
| + static const H264_MAIN = const VideoProfile._(3);
|
| + static const H264_EXTENDED = const VideoProfile._(4);
|
| + static const H264_HIGH = const VideoProfile._(5);
|
| + static const H264_HIGH10 = const VideoProfile._(6);
|
| + static const H264_HIGH422 = const VideoProfile._(7);
|
| + static const H264_HIGH444_PREDICTIVE = const VideoProfile._(8);
|
| + static const H264_SCALABLE_BASELINE = const VideoProfile._(9);
|
| + static const H264_SCALABLE_HIGH = const VideoProfile._(10);
|
| + static const H264_STEREO_HIGH = const VideoProfile._(11);
|
| + static const H264_MULTIVIEW_HIGH = const VideoProfile._(12);
|
| +
|
| + const VideoProfile._(int v) : super(v);
|
| +
|
| + static const Map<String, VideoProfile> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "NOT_APPLICABLE": NOT_APPLICABLE,
|
| + "H264_BASELINE": H264_BASELINE,
|
| + "H264_MAIN": H264_MAIN,
|
| + "H264_EXTENDED": H264_EXTENDED,
|
| + "H264_HIGH": H264_HIGH,
|
| + "H264_HIGH10": H264_HIGH10,
|
| + "H264_HIGH422": H264_HIGH422,
|
| + "H264_HIGH444_PREDICTIVE": H264_HIGH444_PREDICTIVE,
|
| + "H264_SCALABLE_BASELINE": H264_SCALABLE_BASELINE,
|
| + "H264_SCALABLE_HIGH": H264_SCALABLE_HIGH,
|
| + "H264_STEREO_HIGH": H264_STEREO_HIGH,
|
| + "H264_MULTIVIEW_HIGH": H264_MULTIVIEW_HIGH,
|
| + };
|
| + static const List<VideoProfile> values = const [
|
| + UNKNOWN,
|
| + NOT_APPLICABLE,
|
| + H264_BASELINE,
|
| + H264_MAIN,
|
| + H264_EXTENDED,
|
| + H264_HIGH,
|
| + H264_HIGH10,
|
| + H264_HIGH422,
|
| + H264_HIGH444_PREDICTIVE,
|
| + H264_SCALABLE_BASELINE,
|
| + H264_SCALABLE_HIGH,
|
| + H264_STEREO_HIGH,
|
| + H264_MULTIVIEW_HIGH,
|
| + ];
|
| +
|
| + static VideoProfile valueOf(String name) => valuesMap[name];
|
| +
|
| + factory VideoProfile(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return NOT_APPLICABLE;
|
| + case 2:
|
| + return H264_BASELINE;
|
| + case 3:
|
| + return H264_MAIN;
|
| + case 4:
|
| + return H264_EXTENDED;
|
| + case 5:
|
| + return H264_HIGH;
|
| + case 6:
|
| + return H264_HIGH10;
|
| + case 7:
|
| + return H264_HIGH422;
|
| + case 8:
|
| + return H264_HIGH444_PREDICTIVE;
|
| + case 9:
|
| + return H264_SCALABLE_BASELINE;
|
| + case 10:
|
| + return H264_SCALABLE_HIGH;
|
| + case 11:
|
| + return H264_STEREO_HIGH;
|
| + case 12:
|
| + return H264_MULTIVIEW_HIGH;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static VideoProfile decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + VideoProfile result = new VideoProfile(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum VideoProfile.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'VideoProfile.UNKNOWN';
|
| + case NOT_APPLICABLE:
|
| + return 'VideoProfile.NOT_APPLICABLE';
|
| + case H264_BASELINE:
|
| + return 'VideoProfile.H264_BASELINE';
|
| + case H264_MAIN:
|
| + return 'VideoProfile.H264_MAIN';
|
| + case H264_EXTENDED:
|
| + return 'VideoProfile.H264_EXTENDED';
|
| + case H264_HIGH:
|
| + return 'VideoProfile.H264_HIGH';
|
| + case H264_HIGH10:
|
| + return 'VideoProfile.H264_HIGH10';
|
| + case H264_HIGH422:
|
| + return 'VideoProfile.H264_HIGH422';
|
| + case H264_HIGH444_PREDICTIVE:
|
| + return 'VideoProfile.H264_HIGH444_PREDICTIVE';
|
| + case H264_SCALABLE_BASELINE:
|
| + return 'VideoProfile.H264_SCALABLE_BASELINE';
|
| + case H264_SCALABLE_HIGH:
|
| + return 'VideoProfile.H264_SCALABLE_HIGH';
|
| + case H264_STEREO_HIGH:
|
| + return 'VideoProfile.H264_STEREO_HIGH';
|
| + case H264_MULTIVIEW_HIGH:
|
| + return 'VideoProfile.H264_MULTIVIEW_HIGH';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class PixelFormat extends bindings.MojoEnum {
|
| + static const UNKNOWN = const PixelFormat._(0);
|
| + static const I420 = const PixelFormat._(1);
|
| + static const YV12 = const PixelFormat._(2);
|
| + static const YV16 = const PixelFormat._(3);
|
| + static const YV12A = const PixelFormat._(4);
|
| + static const YV24 = const PixelFormat._(5);
|
| + static const NV12 = const PixelFormat._(6);
|
| + static const NV21 = const PixelFormat._(7);
|
| + static const UYVY = const PixelFormat._(8);
|
| + static const YUY2 = const PixelFormat._(9);
|
| + static const ARGB = const PixelFormat._(10);
|
| + static const XRGB = const PixelFormat._(11);
|
| + static const RGB24 = const PixelFormat._(12);
|
| + static const RGB32 = const PixelFormat._(13);
|
| + static const MJPEG = const PixelFormat._(14);
|
| + static const MT21 = const PixelFormat._(15);
|
| +
|
| + const PixelFormat._(int v) : super(v);
|
| +
|
| + static const Map<String, PixelFormat> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "I420": I420,
|
| + "YV12": YV12,
|
| + "YV16": YV16,
|
| + "YV12A": YV12A,
|
| + "YV24": YV24,
|
| + "NV12": NV12,
|
| + "NV21": NV21,
|
| + "UYVY": UYVY,
|
| + "YUY2": YUY2,
|
| + "ARGB": ARGB,
|
| + "XRGB": XRGB,
|
| + "RGB24": RGB24,
|
| + "RGB32": RGB32,
|
| + "MJPEG": MJPEG,
|
| + "MT21": MT21,
|
| + };
|
| + static const List<PixelFormat> values = const [
|
| + UNKNOWN,
|
| + I420,
|
| + YV12,
|
| + YV16,
|
| + YV12A,
|
| + YV24,
|
| + NV12,
|
| + NV21,
|
| + UYVY,
|
| + YUY2,
|
| + ARGB,
|
| + XRGB,
|
| + RGB24,
|
| + RGB32,
|
| + MJPEG,
|
| + MT21,
|
| + ];
|
| +
|
| + static PixelFormat valueOf(String name) => valuesMap[name];
|
| +
|
| + factory PixelFormat(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return I420;
|
| + case 2:
|
| + return YV12;
|
| + case 3:
|
| + return YV16;
|
| + case 4:
|
| + return YV12A;
|
| + case 5:
|
| + return YV24;
|
| + case 6:
|
| + return NV12;
|
| + case 7:
|
| + return NV21;
|
| + case 8:
|
| + return UYVY;
|
| + case 9:
|
| + return YUY2;
|
| + case 10:
|
| + return ARGB;
|
| + case 11:
|
| + return XRGB;
|
| + case 12:
|
| + return RGB24;
|
| + case 13:
|
| + return RGB32;
|
| + case 14:
|
| + return MJPEG;
|
| + case 15:
|
| + return MT21;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static PixelFormat decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + PixelFormat result = new PixelFormat(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum PixelFormat.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'PixelFormat.UNKNOWN';
|
| + case I420:
|
| + return 'PixelFormat.I420';
|
| + case YV12:
|
| + return 'PixelFormat.YV12';
|
| + case YV16:
|
| + return 'PixelFormat.YV16';
|
| + case YV12A:
|
| + return 'PixelFormat.YV12A';
|
| + case YV24:
|
| + return 'PixelFormat.YV24';
|
| + case NV12:
|
| + return 'PixelFormat.NV12';
|
| + case NV21:
|
| + return 'PixelFormat.NV21';
|
| + case UYVY:
|
| + return 'PixelFormat.UYVY';
|
| + case YUY2:
|
| + return 'PixelFormat.YUY2';
|
| + case ARGB:
|
| + return 'PixelFormat.ARGB';
|
| + case XRGB:
|
| + return 'PixelFormat.XRGB';
|
| + case RGB24:
|
| + return 'PixelFormat.RGB24';
|
| + case RGB32:
|
| + return 'PixelFormat.RGB32';
|
| + case MJPEG:
|
| + return 'PixelFormat.MJPEG';
|
| + case MT21:
|
| + return 'PixelFormat.MT21';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +class ColorSpace extends bindings.MojoEnum {
|
| + static const UNKNOWN = const ColorSpace._(0);
|
| + static const NOT_APPLICABLE = const ColorSpace._(1);
|
| + static const JPEG = const ColorSpace._(2);
|
| + static const HD_REC709 = const ColorSpace._(3);
|
| + static const SD_REC601 = const ColorSpace._(4);
|
| +
|
| + const ColorSpace._(int v) : super(v);
|
| +
|
| + static const Map<String, ColorSpace> valuesMap = const {
|
| + "UNKNOWN": UNKNOWN,
|
| + "NOT_APPLICABLE": NOT_APPLICABLE,
|
| + "JPEG": JPEG,
|
| + "HD_REC709": HD_REC709,
|
| + "SD_REC601": SD_REC601,
|
| + };
|
| + static const List<ColorSpace> values = const [
|
| + UNKNOWN,
|
| + NOT_APPLICABLE,
|
| + JPEG,
|
| + HD_REC709,
|
| + SD_REC601,
|
| + ];
|
| +
|
| + static ColorSpace valueOf(String name) => valuesMap[name];
|
| +
|
| + factory ColorSpace(int v) {
|
| + switch (v) {
|
| + case 0:
|
| + return UNKNOWN;
|
| + case 1:
|
| + return NOT_APPLICABLE;
|
| + case 2:
|
| + return JPEG;
|
| + case 3:
|
| + return HD_REC709;
|
| + case 4:
|
| + return SD_REC601;
|
| + default:
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + static ColorSpace decode(bindings.Decoder decoder0, int offset) {
|
| + int v = decoder0.decodeUint32(offset);
|
| + ColorSpace result = new ColorSpace(v);
|
| + if (result == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Bad value $v for enum ColorSpace.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + String toString() {
|
| + switch(this) {
|
| + case UNKNOWN:
|
| + return 'ColorSpace.UNKNOWN';
|
| + case NOT_APPLICABLE:
|
| + return 'ColorSpace.NOT_APPLICABLE';
|
| + case JPEG:
|
| + return 'ColorSpace.JPEG';
|
| + case HD_REC709:
|
| + return 'ColorSpace.HD_REC709';
|
| + case SD_REC601:
|
| + return 'ColorSpace.SD_REC601';
|
| + }
|
| + }
|
| +
|
| + int toJson() => value;
|
| +}
|
| +
|
| +
|
| +
|
| +class MediaType extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + MediaTypeScheme scheme = null;
|
| + MediaTypeDetails details = null;
|
| +
|
| + MediaType() : super(kVersions.last.size);
|
| +
|
| + static MediaType deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static MediaType decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + MediaType result = new MediaType();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.scheme = MediaTypeScheme.decode(decoder0, 8);
|
| + if (result.scheme == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable MediaTypeScheme.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.details = MediaTypeDetails.decode(decoder0, 16);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(scheme, 8);
|
| +
|
| + encoder0.encodeUnion(details, 16, true);
|
| + }
|
| +
|
| + String toString() {
|
| + return "MediaType("
|
| + "scheme: $scheme" ", "
|
| + "details: $details" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["scheme"] = scheme;
|
| + map["details"] = details;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class MediaTypeSet extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + MediaTypeScheme scheme = null;
|
| + MediaTypeSetDetails details = null;
|
| +
|
| + MediaTypeSet() : super(kVersions.last.size);
|
| +
|
| + static MediaTypeSet deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static MediaTypeSet decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + MediaTypeSet result = new MediaTypeSet();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.scheme = MediaTypeScheme.decode(decoder0, 8);
|
| + if (result.scheme == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable MediaTypeScheme.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.details = MediaTypeSetDetails.decode(decoder0, 16);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(scheme, 8);
|
| +
|
| + encoder0.encodeUnion(details, 16, true);
|
| + }
|
| +
|
| + String toString() {
|
| + return "MediaTypeSet("
|
| + "scheme: $scheme" ", "
|
| + "details: $details" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["scheme"] = scheme;
|
| + map["details"] = details;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class LpcmMediaTypeDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(24, 0)
|
| + ];
|
| + LpcmSampleFormat sampleFormat = null;
|
| + bool interleaved = false;
|
| + int channels = 0;
|
| + int framesPerSecond = 0;
|
| +
|
| + LpcmMediaTypeDetails() : super(kVersions.last.size);
|
| +
|
| + static LpcmMediaTypeDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static LpcmMediaTypeDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + LpcmMediaTypeDetails result = new LpcmMediaTypeDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.sampleFormat = LpcmSampleFormat.decode(decoder0, 8);
|
| + if (result.sampleFormat == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable LpcmSampleFormat.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.interleaved = decoder0.decodeBool(12, 0);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.channels = decoder0.decodeUint8(13);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.framesPerSecond = decoder0.decodeUint32(16);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(sampleFormat, 8);
|
| +
|
| + encoder0.encodeBool(interleaved, 12, 0);
|
| +
|
| + encoder0.encodeUint8(channels, 13);
|
| +
|
| + encoder0.encodeUint32(framesPerSecond, 16);
|
| + }
|
| +
|
| + String toString() {
|
| + return "LpcmMediaTypeDetails("
|
| + "sampleFormat: $sampleFormat" ", "
|
| + "interleaved: $interleaved" ", "
|
| + "channels: $channels" ", "
|
| + "framesPerSecond: $framesPerSecond" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["sampleFormat"] = sampleFormat;
|
| + map["interleaved"] = interleaved;
|
| + map["channels"] = channels;
|
| + map["framesPerSecond"] = framesPerSecond;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class LpcmMediaTypeSetDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + LpcmSampleFormat sampleFormat = null;
|
| + BoolRange interleaved = null;
|
| + int minChannels = 0;
|
| + int maxChannels = 0;
|
| + int minFramesPerSecond = 0;
|
| + int maxFramesPerSecond = 0;
|
| +
|
| + LpcmMediaTypeSetDetails() : super(kVersions.last.size);
|
| +
|
| + static LpcmMediaTypeSetDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static LpcmMediaTypeSetDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + LpcmMediaTypeSetDetails result = new LpcmMediaTypeSetDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.sampleFormat = LpcmSampleFormat.decode(decoder0, 8);
|
| + if (result.sampleFormat == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable LpcmSampleFormat.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.interleaved = BoolRange.decode(decoder0, 12);
|
| + if (result.interleaved == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable BoolRange.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minChannels = decoder0.decodeUint8(16);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxChannels = decoder0.decodeUint8(17);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minFramesPerSecond = decoder0.decodeUint32(20);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxFramesPerSecond = decoder0.decodeUint32(24);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(sampleFormat, 8);
|
| +
|
| + encoder0.encodeEnum(interleaved, 12);
|
| +
|
| + encoder0.encodeUint8(minChannels, 16);
|
| +
|
| + encoder0.encodeUint8(maxChannels, 17);
|
| +
|
| + encoder0.encodeUint32(minFramesPerSecond, 20);
|
| +
|
| + encoder0.encodeUint32(maxFramesPerSecond, 24);
|
| + }
|
| +
|
| + String toString() {
|
| + return "LpcmMediaTypeSetDetails("
|
| + "sampleFormat: $sampleFormat" ", "
|
| + "interleaved: $interleaved" ", "
|
| + "minChannels: $minChannels" ", "
|
| + "maxChannels: $maxChannels" ", "
|
| + "minFramesPerSecond: $minFramesPerSecond" ", "
|
| + "maxFramesPerSecond: $maxFramesPerSecond" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["sampleFormat"] = sampleFormat;
|
| + map["interleaved"] = interleaved;
|
| + map["minChannels"] = minChannels;
|
| + map["maxChannels"] = maxChannels;
|
| + map["minFramesPerSecond"] = minFramesPerSecond;
|
| + map["maxFramesPerSecond"] = maxFramesPerSecond;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class MultiplexedMediaTypeDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(24, 0)
|
| + ];
|
| + MediaType multiplexType = null;
|
| + List<MediaType> substreamTypes = null;
|
| +
|
| + MultiplexedMediaTypeDetails() : super(kVersions.last.size);
|
| +
|
| + static MultiplexedMediaTypeDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static MultiplexedMediaTypeDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + MultiplexedMediaTypeDetails result = new MultiplexedMediaTypeDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(8, false);
|
| + result.multiplexType = MediaType.decode(decoder1);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(16, false);
|
| + {
|
| + var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
|
| + result.substreamTypes = new List<MediaType>(si1.numElements);
|
| + for (int i1 = 0; i1 < si1.numElements; ++i1) {
|
| +
|
| + var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
|
| + result.substreamTypes[i1] = MediaType.decode(decoder2);
|
| + }
|
| + }
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeStruct(multiplexType, 8, false);
|
| +
|
| + if (substreamTypes == null) {
|
| + encoder0.encodeNullPointer(16, false);
|
| + } else {
|
| + var encoder1 = encoder0.encodePointerArray(substreamTypes.length, 16, bindings.kUnspecifiedArrayLength);
|
| + for (int i0 = 0; i0 < substreamTypes.length; ++i0) {
|
| +
|
| + encoder1.encodeStruct(substreamTypes[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
|
| + }
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + return "MultiplexedMediaTypeDetails("
|
| + "multiplexType: $multiplexType" ", "
|
| + "substreamTypes: $substreamTypes" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["multiplexType"] = multiplexType;
|
| + map["substreamTypes"] = substreamTypes;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class MultiplexedMediaTypeSetDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(24, 0)
|
| + ];
|
| + MediaTypeSet multiplexTypeSet = null;
|
| + List<MediaTypeSet> substreamTypeSets = null;
|
| +
|
| + MultiplexedMediaTypeSetDetails() : super(kVersions.last.size);
|
| +
|
| + static MultiplexedMediaTypeSetDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static MultiplexedMediaTypeSetDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + MultiplexedMediaTypeSetDetails result = new MultiplexedMediaTypeSetDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(8, false);
|
| + result.multiplexTypeSet = MediaTypeSet.decode(decoder1);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(16, false);
|
| + {
|
| + var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
|
| + result.substreamTypeSets = new List<MediaTypeSet>(si1.numElements);
|
| + for (int i1 = 0; i1 < si1.numElements; ++i1) {
|
| +
|
| + var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
|
| + result.substreamTypeSets[i1] = MediaTypeSet.decode(decoder2);
|
| + }
|
| + }
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeStruct(multiplexTypeSet, 8, false);
|
| +
|
| + if (substreamTypeSets == null) {
|
| + encoder0.encodeNullPointer(16, false);
|
| + } else {
|
| + var encoder1 = encoder0.encodePointerArray(substreamTypeSets.length, 16, bindings.kUnspecifiedArrayLength);
|
| + for (int i0 = 0; i0 < substreamTypeSets.length; ++i0) {
|
| +
|
| + encoder1.encodeStruct(substreamTypeSets[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
|
| + }
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + return "MultiplexedMediaTypeSetDetails("
|
| + "multiplexTypeSet: $multiplexTypeSet" ", "
|
| + "substreamTypeSets: $substreamTypeSets" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["multiplexTypeSet"] = multiplexTypeSet;
|
| + map["substreamTypeSets"] = substreamTypeSets;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CompressedAudioMediaTypeDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + AudioEncoding encoding = null;
|
| + LpcmSampleFormat sampleFormat = null;
|
| + bool interleaved = false;
|
| + int channels = 0;
|
| + int framesPerSecond = 0;
|
| + String extraDataBase64 = null;
|
| +
|
| + CompressedAudioMediaTypeDetails() : super(kVersions.last.size);
|
| +
|
| + static CompressedAudioMediaTypeDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CompressedAudioMediaTypeDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CompressedAudioMediaTypeDetails result = new CompressedAudioMediaTypeDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.encoding = AudioEncoding.decode(decoder0, 8);
|
| + if (result.encoding == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable AudioEncoding.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.sampleFormat = LpcmSampleFormat.decode(decoder0, 12);
|
| + if (result.sampleFormat == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable LpcmSampleFormat.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.interleaved = decoder0.decodeBool(16, 0);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.channels = decoder0.decodeUint8(17);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.framesPerSecond = decoder0.decodeUint32(20);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.extraDataBase64 = decoder0.decodeString(24, false);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(encoding, 8);
|
| +
|
| + encoder0.encodeEnum(sampleFormat, 12);
|
| +
|
| + encoder0.encodeBool(interleaved, 16, 0);
|
| +
|
| + encoder0.encodeUint8(channels, 17);
|
| +
|
| + encoder0.encodeUint32(framesPerSecond, 20);
|
| +
|
| + encoder0.encodeString(extraDataBase64, 24, false);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CompressedAudioMediaTypeDetails("
|
| + "encoding: $encoding" ", "
|
| + "sampleFormat: $sampleFormat" ", "
|
| + "interleaved: $interleaved" ", "
|
| + "channels: $channels" ", "
|
| + "framesPerSecond: $framesPerSecond" ", "
|
| + "extraDataBase64: $extraDataBase64" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["encoding"] = encoding;
|
| + map["sampleFormat"] = sampleFormat;
|
| + map["interleaved"] = interleaved;
|
| + map["channels"] = channels;
|
| + map["framesPerSecond"] = framesPerSecond;
|
| + map["extraDataBase64"] = extraDataBase64;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CompressedAudioMediaTypeSetDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + AudioEncoding encoding = null;
|
| + LpcmSampleFormat sampleFormat = null;
|
| + BoolRange interleaved = null;
|
| + int minChannels = 0;
|
| + int maxChannels = 0;
|
| + int minFramesPerSecond = 0;
|
| + int maxFramesPerSecond = 0;
|
| +
|
| + CompressedAudioMediaTypeSetDetails() : super(kVersions.last.size);
|
| +
|
| + static CompressedAudioMediaTypeSetDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CompressedAudioMediaTypeSetDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CompressedAudioMediaTypeSetDetails result = new CompressedAudioMediaTypeSetDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.encoding = AudioEncoding.decode(decoder0, 8);
|
| + if (result.encoding == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable AudioEncoding.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.sampleFormat = LpcmSampleFormat.decode(decoder0, 12);
|
| + if (result.sampleFormat == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable LpcmSampleFormat.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.interleaved = BoolRange.decode(decoder0, 16);
|
| + if (result.interleaved == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable BoolRange.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minChannels = decoder0.decodeUint8(20);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxChannels = decoder0.decodeUint8(21);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minFramesPerSecond = decoder0.decodeUint32(24);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxFramesPerSecond = decoder0.decodeUint32(28);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(encoding, 8);
|
| +
|
| + encoder0.encodeEnum(sampleFormat, 12);
|
| +
|
| + encoder0.encodeEnum(interleaved, 16);
|
| +
|
| + encoder0.encodeUint8(minChannels, 20);
|
| +
|
| + encoder0.encodeUint8(maxChannels, 21);
|
| +
|
| + encoder0.encodeUint32(minFramesPerSecond, 24);
|
| +
|
| + encoder0.encodeUint32(maxFramesPerSecond, 28);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CompressedAudioMediaTypeSetDetails("
|
| + "encoding: $encoding" ", "
|
| + "sampleFormat: $sampleFormat" ", "
|
| + "interleaved: $interleaved" ", "
|
| + "minChannels: $minChannels" ", "
|
| + "maxChannels: $maxChannels" ", "
|
| + "minFramesPerSecond: $minFramesPerSecond" ", "
|
| + "maxFramesPerSecond: $maxFramesPerSecond" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["encoding"] = encoding;
|
| + map["sampleFormat"] = sampleFormat;
|
| + map["interleaved"] = interleaved;
|
| + map["minChannels"] = minChannels;
|
| + map["maxChannels"] = maxChannels;
|
| + map["minFramesPerSecond"] = minFramesPerSecond;
|
| + map["maxFramesPerSecond"] = maxFramesPerSecond;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class VideoMediaTypeDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(48, 0)
|
| + ];
|
| + VideoEncoding encoding = null;
|
| + VideoProfile profile = null;
|
| + PixelFormat pixelFormat = null;
|
| + ColorSpace colorSpace = null;
|
| + int width = 0;
|
| + int height = 0;
|
| + int codedWidth = 0;
|
| + int codedHeight = 0;
|
| + String extraDataBase64 = null;
|
| +
|
| + VideoMediaTypeDetails() : super(kVersions.last.size);
|
| +
|
| + static VideoMediaTypeDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static VideoMediaTypeDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + VideoMediaTypeDetails result = new VideoMediaTypeDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.encoding = VideoEncoding.decode(decoder0, 8);
|
| + if (result.encoding == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable VideoEncoding.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.profile = VideoProfile.decode(decoder0, 12);
|
| + if (result.profile == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable VideoProfile.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.pixelFormat = PixelFormat.decode(decoder0, 16);
|
| + if (result.pixelFormat == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable PixelFormat.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.colorSpace = ColorSpace.decode(decoder0, 20);
|
| + if (result.colorSpace == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable ColorSpace.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.width = decoder0.decodeUint32(24);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.height = decoder0.decodeUint32(28);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.codedWidth = decoder0.decodeUint32(32);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.codedHeight = decoder0.decodeUint32(36);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.extraDataBase64 = decoder0.decodeString(40, false);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(encoding, 8);
|
| +
|
| + encoder0.encodeEnum(profile, 12);
|
| +
|
| + encoder0.encodeEnum(pixelFormat, 16);
|
| +
|
| + encoder0.encodeEnum(colorSpace, 20);
|
| +
|
| + encoder0.encodeUint32(width, 24);
|
| +
|
| + encoder0.encodeUint32(height, 28);
|
| +
|
| + encoder0.encodeUint32(codedWidth, 32);
|
| +
|
| + encoder0.encodeUint32(codedHeight, 36);
|
| +
|
| + encoder0.encodeString(extraDataBase64, 40, false);
|
| + }
|
| +
|
| + String toString() {
|
| + return "VideoMediaTypeDetails("
|
| + "encoding: $encoding" ", "
|
| + "profile: $profile" ", "
|
| + "pixelFormat: $pixelFormat" ", "
|
| + "colorSpace: $colorSpace" ", "
|
| + "width: $width" ", "
|
| + "height: $height" ", "
|
| + "codedWidth: $codedWidth" ", "
|
| + "codedHeight: $codedHeight" ", "
|
| + "extraDataBase64: $extraDataBase64" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["encoding"] = encoding;
|
| + map["profile"] = profile;
|
| + map["pixelFormat"] = pixelFormat;
|
| + map["colorSpace"] = colorSpace;
|
| + map["width"] = width;
|
| + map["height"] = height;
|
| + map["codedWidth"] = codedWidth;
|
| + map["codedHeight"] = codedHeight;
|
| + map["extraDataBase64"] = extraDataBase64;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class VideoMediaTypeSetDetails extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(32, 0)
|
| + ];
|
| + VideoEncoding encoding = null;
|
| + int minWidth = 0;
|
| + int maxWidth = 0;
|
| + int minHeight = 0;
|
| + int maxHeight = 0;
|
| +
|
| + VideoMediaTypeSetDetails() : super(kVersions.last.size);
|
| +
|
| + static VideoMediaTypeSetDetails deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static VideoMediaTypeSetDetails decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + VideoMediaTypeSetDetails result = new VideoMediaTypeSetDetails();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.encoding = VideoEncoding.decode(decoder0, 8);
|
| + if (result.encoding == null) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Trying to decode null union for non-nullable VideoEncoding.');
|
| + }
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minWidth = decoder0.decodeUint32(12);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxWidth = decoder0.decodeUint32(16);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.minHeight = decoder0.decodeUint32(20);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.maxHeight = decoder0.decodeUint32(24);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeEnum(encoding, 8);
|
| +
|
| + encoder0.encodeUint32(minWidth, 12);
|
| +
|
| + encoder0.encodeUint32(maxWidth, 16);
|
| +
|
| + encoder0.encodeUint32(minHeight, 20);
|
| +
|
| + encoder0.encodeUint32(maxHeight, 24);
|
| + }
|
| +
|
| + String toString() {
|
| + return "VideoMediaTypeSetDetails("
|
| + "encoding: $encoding" ", "
|
| + "minWidth: $minWidth" ", "
|
| + "maxWidth: $maxWidth" ", "
|
| + "minHeight: $minHeight" ", "
|
| + "maxHeight: $maxHeight" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["encoding"] = encoding;
|
| + map["minWidth"] = minWidth;
|
| + map["maxWidth"] = maxWidth;
|
| + map["minHeight"] = minHeight;
|
| + map["maxHeight"] = maxHeight;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +
|
| +enum MediaTypeDetailsTag {
|
| + multiplexed,
|
| + lpcm,
|
| + compressedAudio,
|
| + video,
|
| + unknown
|
| +}
|
| +
|
| +class MediaTypeDetails extends bindings.Union {
|
| + static final _tag_to_int = const {
|
| + MediaTypeDetailsTag.multiplexed: 0,
|
| + MediaTypeDetailsTag.lpcm: 1,
|
| + MediaTypeDetailsTag.compressedAudio: 2,
|
| + MediaTypeDetailsTag.video: 3,
|
| + };
|
| +
|
| + static final _int_to_tag = const {
|
| + 0: MediaTypeDetailsTag.multiplexed,
|
| + 1: MediaTypeDetailsTag.lpcm,
|
| + 2: MediaTypeDetailsTag.compressedAudio,
|
| + 3: MediaTypeDetailsTag.video,
|
| + };
|
| +
|
| + var _data;
|
| + MediaTypeDetailsTag _tag = MediaTypeDetailsTag.unknown;
|
| +
|
| + MediaTypeDetailsTag get tag => _tag;
|
| + MultiplexedMediaTypeDetails get multiplexed {
|
| + if (_tag != MediaTypeDetailsTag.multiplexed) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeDetailsTag.multiplexed);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set multiplexed(MultiplexedMediaTypeDetails value) {
|
| + _tag = MediaTypeDetailsTag.multiplexed;
|
| + _data = value;
|
| + }
|
| + LpcmMediaTypeDetails get lpcm {
|
| + if (_tag != MediaTypeDetailsTag.lpcm) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeDetailsTag.lpcm);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set lpcm(LpcmMediaTypeDetails value) {
|
| + _tag = MediaTypeDetailsTag.lpcm;
|
| + _data = value;
|
| + }
|
| + CompressedAudioMediaTypeDetails get compressedAudio {
|
| + if (_tag != MediaTypeDetailsTag.compressedAudio) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeDetailsTag.compressedAudio);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set compressedAudio(CompressedAudioMediaTypeDetails value) {
|
| + _tag = MediaTypeDetailsTag.compressedAudio;
|
| + _data = value;
|
| + }
|
| + VideoMediaTypeDetails get video {
|
| + if (_tag != MediaTypeDetailsTag.video) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeDetailsTag.video);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set video(VideoMediaTypeDetails value) {
|
| + _tag = MediaTypeDetailsTag.video;
|
| + _data = value;
|
| + }
|
| +
|
| + static MediaTypeDetails decode(bindings.Decoder decoder0, int offset) {
|
| + int size = decoder0.decodeUint32(offset);
|
| + if (size == 0) {
|
| + return null;
|
| + }
|
| + MediaTypeDetails result = new MediaTypeDetails();
|
| +
|
| + // TODO(azani): Handle unknown union member.
|
| + MediaTypeDetailsTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
|
| + switch (tag) {
|
| + case MediaTypeDetailsTag.multiplexed:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.multiplexed = MultiplexedMediaTypeDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeDetailsTag.lpcm:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.lpcm = LpcmMediaTypeDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeDetailsTag.compressedAudio:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.compressedAudio = CompressedAudioMediaTypeDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeDetailsTag.video:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.video = VideoMediaTypeDetails.decode(decoder1);
|
| + break;
|
| + }
|
| +
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder0, int offset) {
|
| + // TODO(azani): Error when trying to encode an unknown member.
|
| + encoder0.encodeUint32(16, offset);
|
| + encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
|
| + switch (_tag) {
|
| + case MediaTypeDetailsTag.multiplexed:
|
| +
|
| + encoder0.encodeStruct(multiplexed, offset + 8, false);
|
| + break;
|
| + case MediaTypeDetailsTag.lpcm:
|
| +
|
| + encoder0.encodeStruct(lpcm, offset + 8, false);
|
| + break;
|
| + case MediaTypeDetailsTag.compressedAudio:
|
| +
|
| + encoder0.encodeStruct(compressedAudio, offset + 8, false);
|
| + break;
|
| + case MediaTypeDetailsTag.video:
|
| +
|
| + encoder0.encodeStruct(video, offset + 8, false);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + String result = "MediaTypeDetails(";
|
| + switch (_tag) {
|
| + case MediaTypeDetailsTag.multiplexed:
|
| + result += "multiplexed";
|
| + break;
|
| + case MediaTypeDetailsTag.lpcm:
|
| + result += "lpcm";
|
| + break;
|
| + case MediaTypeDetailsTag.compressedAudio:
|
| + result += "compressedAudio";
|
| + break;
|
| + case MediaTypeDetailsTag.video:
|
| + result += "video";
|
| + break;
|
| + default:
|
| + result += "unknown";
|
| + }
|
| + result += ": $_data)";
|
| + return result;
|
| + }
|
| +}
|
| +
|
| +
|
| +enum MediaTypeSetDetailsTag {
|
| + multiplexed,
|
| + lpcm,
|
| + compressedAudio,
|
| + video,
|
| + unknown
|
| +}
|
| +
|
| +class MediaTypeSetDetails extends bindings.Union {
|
| + static final _tag_to_int = const {
|
| + MediaTypeSetDetailsTag.multiplexed: 0,
|
| + MediaTypeSetDetailsTag.lpcm: 1,
|
| + MediaTypeSetDetailsTag.compressedAudio: 2,
|
| + MediaTypeSetDetailsTag.video: 3,
|
| + };
|
| +
|
| + static final _int_to_tag = const {
|
| + 0: MediaTypeSetDetailsTag.multiplexed,
|
| + 1: MediaTypeSetDetailsTag.lpcm,
|
| + 2: MediaTypeSetDetailsTag.compressedAudio,
|
| + 3: MediaTypeSetDetailsTag.video,
|
| + };
|
| +
|
| + var _data;
|
| + MediaTypeSetDetailsTag _tag = MediaTypeSetDetailsTag.unknown;
|
| +
|
| + MediaTypeSetDetailsTag get tag => _tag;
|
| + MultiplexedMediaTypeSetDetails get multiplexed {
|
| + if (_tag != MediaTypeSetDetailsTag.multiplexed) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeSetDetailsTag.multiplexed);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set multiplexed(MultiplexedMediaTypeSetDetails value) {
|
| + _tag = MediaTypeSetDetailsTag.multiplexed;
|
| + _data = value;
|
| + }
|
| + LpcmMediaTypeSetDetails get lpcm {
|
| + if (_tag != MediaTypeSetDetailsTag.lpcm) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeSetDetailsTag.lpcm);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set lpcm(LpcmMediaTypeSetDetails value) {
|
| + _tag = MediaTypeSetDetailsTag.lpcm;
|
| + _data = value;
|
| + }
|
| + CompressedAudioMediaTypeSetDetails get compressedAudio {
|
| + if (_tag != MediaTypeSetDetailsTag.compressedAudio) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeSetDetailsTag.compressedAudio);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set compressedAudio(CompressedAudioMediaTypeSetDetails value) {
|
| + _tag = MediaTypeSetDetailsTag.compressedAudio;
|
| + _data = value;
|
| + }
|
| + VideoMediaTypeSetDetails get video {
|
| + if (_tag != MediaTypeSetDetailsTag.video) {
|
| + throw new bindings.UnsetUnionTagError(_tag, MediaTypeSetDetailsTag.video);
|
| + }
|
| + return _data;
|
| + }
|
| +
|
| + set video(VideoMediaTypeSetDetails value) {
|
| + _tag = MediaTypeSetDetailsTag.video;
|
| + _data = value;
|
| + }
|
| +
|
| + static MediaTypeSetDetails decode(bindings.Decoder decoder0, int offset) {
|
| + int size = decoder0.decodeUint32(offset);
|
| + if (size == 0) {
|
| + return null;
|
| + }
|
| + MediaTypeSetDetails result = new MediaTypeSetDetails();
|
| +
|
| + // TODO(azani): Handle unknown union member.
|
| + MediaTypeSetDetailsTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
|
| + switch (tag) {
|
| + case MediaTypeSetDetailsTag.multiplexed:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.multiplexed = MultiplexedMediaTypeSetDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeSetDetailsTag.lpcm:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.lpcm = LpcmMediaTypeSetDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeSetDetailsTag.compressedAudio:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.compressedAudio = CompressedAudioMediaTypeSetDetails.decode(decoder1);
|
| + break;
|
| + case MediaTypeSetDetailsTag.video:
|
| +
|
| + var decoder1 = decoder0.decodePointer(offset + 8, false);
|
| + result.video = VideoMediaTypeSetDetails.decode(decoder1);
|
| + break;
|
| + }
|
| +
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder0, int offset) {
|
| + // TODO(azani): Error when trying to encode an unknown member.
|
| + encoder0.encodeUint32(16, offset);
|
| + encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
|
| + switch (_tag) {
|
| + case MediaTypeSetDetailsTag.multiplexed:
|
| +
|
| + encoder0.encodeStruct(multiplexed, offset + 8, false);
|
| + break;
|
| + case MediaTypeSetDetailsTag.lpcm:
|
| +
|
| + encoder0.encodeStruct(lpcm, offset + 8, false);
|
| + break;
|
| + case MediaTypeSetDetailsTag.compressedAudio:
|
| +
|
| + encoder0.encodeStruct(compressedAudio, offset + 8, false);
|
| + break;
|
| + case MediaTypeSetDetailsTag.video:
|
| +
|
| + encoder0.encodeStruct(video, offset + 8, false);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + String result = "MediaTypeSetDetails(";
|
| + switch (_tag) {
|
| + case MediaTypeSetDetailsTag.multiplexed:
|
| + result += "multiplexed";
|
| + break;
|
| + case MediaTypeSetDetailsTag.lpcm:
|
| + result += "lpcm";
|
| + break;
|
| + case MediaTypeSetDetailsTag.compressedAudio:
|
| + result += "compressedAudio";
|
| + break;
|
| + case MediaTypeSetDetailsTag.video:
|
| + result += "video";
|
| + break;
|
| + default:
|
| + result += "unknown";
|
| + }
|
| + result += ": $_data)";
|
| + return result;
|
| + }
|
| +}
|
| +
|
|
|