import * as VScript from "http://172.16.0.12/bladerunner_sdk/vscript@2.5.2/deno/release/mod.ts";
import * as VAPI from "./mod.ts";
export const lift = {
  AllocationMode: (
    _raw: [0, [number]] | [1, [number]],
    _socket: VScript.VSocket,
  ): AllocationMode => {
    switch (_raw[0]) {
      case 0:
        return {
          variant: "Frames",
          value: VAPI.VideoPlayer.lift.FramesSettings(_raw[1], _socket),
        };
      case 1:
        return {
          variant: "Time",
          value: VAPI.VideoPlayer.lift.TimeSettings(_raw[1], _socket),
        };
    }
  },
  VideoLimitationBandwidth: (
    _raw: [VAPI.Definitions.Bandwidth],
    _socket: VScript.VSocket,
  ): VideoLimitationBandwidth => {
    return {
      max_bandwidth: _raw[0],
    };
  },
  Capabilities: (
    _raw: [
      null | ([0, [number]] | [1, [number]]),
      [boolean, [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]]],
    ],
    _socket: VScript.VSocket,
  ): Capabilities => {
    return {
      capacity:
        _raw[0] === null
          ? null
          : VAPI.VideoPlayer.lift.AllocationMode(_raw[0], _socket),
      input_caliber: VAPI.VideoPlayer.lift.SingleSettings(_raw[1], _socket),
    };
  },
  Control: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new Control(_raw),
  FramesSettings: (
    _raw: [number],
    _socket: VScript.VSocket,
  ): FramesSettings => {
    return {
      frames: _raw[0],
    };
  },
  FramesTime: (
    _raw: [number, number],
    _socket: VScript.VSocket,
  ): FramesTime => {
    return {
      frames: _raw[0],
      time: VScript.VAPIHelpers.liftNanoseconds(_raw[1], _socket),
    };
  },
  GroupSelections: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new GroupSelections(_raw),
  Header: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new Header(_raw),
  Load: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Load(_raw),
  MemoryCapacity: (
    _raw: [
      number,
      number,
      [null | number, null | number],
      null | VAPI.Video.Standard,
    ],
    _socket: VScript.VSocket,
  ): MemoryCapacity => {
    return {
      as_pages: _raw[0],
      as_bytes: _raw[1],
      as_requested: VAPI.VideoPlayer.lift.MemoryCapacityAsRequested(
        _raw[2],
        _socket,
      ),
      calculation_standard: _raw[3],
    };
  },
  OutputDebug: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new OutputDebug(_raw),
  Reader: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new Reader(_raw),
  SingleSettings: (
    _raw: [
      boolean,
      [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
    ],
    _socket: VScript.VSocket,
  ): SingleSettings => {
    return {
      add_blanking: _raw[0],
      constraints: VAPI.VideoPlayer.lift.VideoLimitation(_raw[1], _socket),
    };
  },
  VideoLimitationStandard: (
    _raw: [VAPI.Video.Standard],
    _socket: VScript.VSocket,
  ): VideoLimitationStandard => {
    return {
      standard: _raw[0],
    };
  },
  TimeSettings: (_raw: [number], _socket: VScript.VSocket): TimeSettings => {
    return {
      time: VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
    };
  },
  Upload: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new Upload(_raw),
  VideoLimitation: (
    _raw: [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
    _socket: VScript.VSocket,
  ): VideoLimitation => {
    switch (_raw[0]) {
      case 0:
        return {
          variant: "Standard",
          value: VAPI.VideoPlayer.lift.VideoLimitationStandard(
            _raw[1],
            _socket,
          ),
        };
      case 1:
        return {
          variant: "Bandwidth",
          value: VAPI.VideoPlayer.lift.VideoLimitationBandwidth(
            _raw[1],
            _socket,
          ),
        };
    }
  },
  MemoryCapacityAsRequested: (
    _raw: [null | number, null | number],
    _socket: VScript.VSocket,
  ): MemoryCapacityAsRequested => {
    return {
      frames: _raw[0],
      time:
        _raw[1] === null
          ? null
          : VScript.VAPIHelpers.liftNanoseconds(_raw[1], _socket),
    };
  },
  HeaderDate: (
    _raw: [number, number, number],
    _socket: VScript.VSocket,
  ): HeaderDate => {
    return {
      year: _raw[0],
      month: _raw[1],
      day: _raw[2],
    };
  },
  HeaderTimeOfDay: (
    _raw: [number, number, number],
    _socket: VScript.VSocket,
  ): HeaderTimeOfDay => {
    return {
      hours: _raw[0],
      minutes: _raw[1],
      seconds: _raw[2],
    };
  },
} as const;
export const lower = {
  AllocationMode: (
    _x:
      | { variant: "Frames"; value: VAPI.VideoPlayer.FramesSettings }
      | { variant: "Time"; value: VAPI.VideoPlayer.TimeSettings },
    _socket: VScript.VSocket,
  ): [0, [number]] | [1, [number]] => {
    switch (_x.variant) {
      case "Frames":
        return [0, VAPI.VideoPlayer.lower.FramesSettings(_x.value, _socket)];
      case "Time":
        return [1, VAPI.VideoPlayer.lower.TimeSettings(_x.value, _socket)];
    }
  },
  VideoLimitationBandwidth: (
    _x: { max_bandwidth: VAPI.Definitions.Bandwidth },
    _socket: VScript.VSocket,
  ): [VAPI.Definitions.Bandwidth] => [_x.max_bandwidth],
  Capabilities: (
    _x: {
      capacity: null | VAPI.VideoPlayer.AllocationMode;
      input_caliber: VAPI.VideoPlayer.SingleSettings;
    },
    _socket: VScript.VSocket,
  ): [
    null | ([0, [number]] | [1, [number]]),
    [boolean, [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]]],
  ] => [
    _x.capacity === null
      ? null
      : VAPI.VideoPlayer.lower.AllocationMode(_x.capacity, _socket),
    VAPI.VideoPlayer.lower.SingleSettings(_x.input_caliber, _socket),
  ],
  Control: (_x: Control) => _x.raw.kwl,
  FramesSettings: (
    _x: { frames: number },
    _socket: VScript.VSocket,
  ): [number] => [_x.frames],
  FramesTime: (
    _x: { frames: number; time: VScript.Duration },
    _socket: VScript.VSocket,
  ): [number, number] => [
    _x.frames,
    VScript.VAPIHelpers.lowerNanoseconds(_x.time, _socket),
  ],
  GroupSelections: (_x: GroupSelections) => _x.raw.kwl,
  Header: (_x: Header) => _x.raw.kwl,
  Load: (_x: Load) => _x.raw.kwl,
  MemoryCapacity: (
    _x: {
      as_pages: VAPI.Primitives.Unsigned16;
      as_bytes: VAPI.Primitives.Unsigned64;
      as_requested: VAPI.VideoPlayer.MemoryCapacityAsRequested;

      /**
              This standard is used to calculate the required memory. It is
              derived from the (add_blanking, video_limitation, Frames, Time)
              settings
            */
      calculation_standard: null | VAPI.Video.Standard;
    },
    _socket: VScript.VSocket,
  ): [
    number,
    number,
    [null | number, null | number],
    null | VAPI.Video.Standard,
  ] => [
    _x.as_pages,
    _x.as_bytes,
    VAPI.VideoPlayer.lower.MemoryCapacityAsRequested(_x.as_requested, _socket),
    _x.calculation_standard,
  ],
  OutputDebug: (_x: OutputDebug) => _x.raw.kwl,
  Reader: (_x: Reader) => _x.raw.kwl,
  SingleSettings: (
    _x: {
      add_blanking: boolean;
      constraints: VAPI.VideoPlayer.VideoLimitation;
    },
    _socket: VScript.VSocket,
  ): [
    boolean,
    [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
  ] => [
    _x.add_blanking,
    VAPI.VideoPlayer.lower.VideoLimitation(_x.constraints, _socket),
  ],
  VideoLimitationStandard: (
    _x: { standard: VAPI.Video.Standard },
    _socket: VScript.VSocket,
  ): [VAPI.Video.Standard] => [_x.standard],
  TimeSettings: (
    _x: { time: VScript.Duration },
    _socket: VScript.VSocket,
  ): [number] => [VScript.VAPIHelpers.lowerNanoseconds(_x.time, _socket)],
  Upload: (_x: Upload) => _x.raw.kwl,
  VideoLimitation: (
    _x:
      | { variant: "Standard"; value: VAPI.VideoPlayer.VideoLimitationStandard }
      | {
          variant: "Bandwidth";
          value: VAPI.VideoPlayer.VideoLimitationBandwidth;
        },
    _socket: VScript.VSocket,
  ): [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]] => {
    switch (_x.variant) {
      case "Standard":
        return [
          0,
          VAPI.VideoPlayer.lower.VideoLimitationStandard(_x.value, _socket),
        ];
      case "Bandwidth":
        return [
          1,
          VAPI.VideoPlayer.lower.VideoLimitationBandwidth(_x.value, _socket),
        ];
    }
  },
  MemoryCapacityAsRequested: (
    _x: { frames: null | number; time: null | VScript.Duration },
    _socket: VScript.VSocket,
  ): [null | number, null | number] => [
    _x.frames,
    _x.time === null
      ? null
      : VScript.VAPIHelpers.lowerNanoseconds(_x.time, _socket),
  ],
  HeaderDate: (
    _x: { year: number; month: number; day: number },
    _socket: VScript.VSocket,
  ): [number, number, number] => [_x.year, _x.month, _x.day],
  HeaderTimeOfDay: (
    _x: { hours: number; minutes: number; seconds: number },
    _socket: VScript.VSocket,
  ): [number, number, number] => [_x.hours, _x.minutes, _x.seconds],
} as const;
export type AllocationMode =
  | { variant: "Frames"; value: VAPI.VideoPlayer.FramesSettings }
  | { variant: "Time"; value: VAPI.VideoPlayer.TimeSettings };
export interface VideoLimitationBandwidth {
  max_bandwidth: VAPI.Definitions.Bandwidth;
}
export type BufferMode = "Frames" | "Time";
export interface Capabilities {
  capacity: null | VAPI.VideoPlayer.AllocationMode;
  input_caliber: VAPI.VideoPlayer.SingleSettings;
}
export class Control
  implements VScript.Referenceable<"VideoPlayer::Data::Control">
{
  readonly type_identifier = "VideoPlayer::Data::Control" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

  /**
    Stop
  */
  get stop(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Control
    >(
      this,
      "stop" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Play
  */
  get play(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Control
    >(
      this,
      "play" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Back
  */
  get step_backward(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Control
    >(
      this,
      "step_backward" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Forward
  */
  get step_forward(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Control
    >(
      this,
      "step_forward" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Jump
  */
  get jump(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Control
    >(
      this,
      "jump" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get frame(): VScript.dKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    null | number,
    null | number,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.dKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | number,
      null | number,
      VAPI.VideoPlayer.Control
    >(
      this,
      "frame" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get motion_status(): VScript.rKeyword<
    VScript.VSocket,
    VAPI.VideoPlayer.MotionStatus,
    VAPI.VideoPlayer.MotionStatus,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      VAPI.VideoPlayer.MotionStatus,
      VAPI.VideoPlayer.MotionStatus,
      VAPI.VideoPlayer.Control
    >(this, "motion_status" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get visible_frame(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Control
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Control
    >(this, "visible_frame" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export type DelayMode = "FrameSync_Freeze" | "FrameSync_Black" | "FramePhaser";
export interface FramesSettings {
  frames: number;
}
export interface FramesTime {
  frames: number;
  time: VScript.Duration;
}
export class GroupSelections
  implements VScript.Referenceable<"VideoPlayer::Data::GroupSelections">
{
  readonly type_identifier = "VideoPlayer::Data::GroupSelections" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get group(): VScript.dKeyword<
    VScript.VSocket,
    null | VAPI.VideoPlayer.Groups,
    null | VAPI.VideoPlayer.Groups,
    null | VAPI.VideoPlayer.Groups,
    null | VAPI.VideoPlayer.Groups,
    VAPI.VideoPlayer.GroupSelections
  > {
    return new VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.VideoPlayer.Groups,
      null | VAPI.VideoPlayer.Groups,
      null | VAPI.VideoPlayer.Groups,
      null | VAPI.VideoPlayer.Groups,
      VAPI.VideoPlayer.GroupSelections
    >(
      this,
      "group" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
}
export type Groups = "Group0" | "Group1" | "Group2" | "Group3";
export class Header
  implements VScript.Referenceable<"VideoPlayer::Data::Header">
{
  readonly type_identifier = "VideoPlayer::Data::Header" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get date(): VScript.rKeyword<
    VScript.VSocket,
    null | [number, number, number],
    null | VAPI.VideoPlayer.HeaderDate,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number],
      null | VAPI.VideoPlayer.HeaderDate,
      VAPI.VideoPlayer.Header
    >(this, "date" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VAPI.VideoPlayer.lift.HeaderDate,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VAPI.VideoPlayer.lower.HeaderDate,
      ),
    });
  }
  get time_of_day(): VScript.rKeyword<
    VScript.VSocket,
    null | [number, number, number],
    null | VAPI.VideoPlayer.HeaderTimeOfDay,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number],
      null | VAPI.VideoPlayer.HeaderTimeOfDay,
      VAPI.VideoPlayer.Header
    >(this, "time_of_day" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VAPI.VideoPlayer.lift.HeaderTimeOfDay,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VAPI.VideoPlayer.lower.HeaderTimeOfDay,
      ),
    });
  }
  get standard(): VScript.rKeyword<
    VScript.VSocket,
    null | VAPI.Video.Standard,
    null | VAPI.Video.Standard,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.VideoPlayer.Header
    >(this, "standard" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get interlace(): VScript.rKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.VideoPlayer.Header
    >(this, "interlace" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get frames(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Header
    >(this, "frames" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get time(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.VideoPlayer.Header
    >(this, "time" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftNanoseconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerNanoseconds,
      ),
    });
  }
  get add_blanking(): VScript.rKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.VideoPlayer.Header
    >(this, "add_blanking" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get h_active(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Header
    >(this, "h_active" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get v_active(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Header
    >(this, "v_active" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get h_total(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Header
    >(this, "h_total" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get v_total(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Header
    >(this, "v_total" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get colorspace(): VScript.rKeyword<
    VScript.VSocket,
    null | VAPI.Video.ColorSpace,
    null | VAPI.Video.ColorSpace,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.ColorSpace,
      null | VAPI.Video.ColorSpace,
      VAPI.VideoPlayer.Header
    >(this, "colorspace" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get tc(): VScript.rKeyword<
    VScript.VSocket,
    null | VAPI.Video.TransferCharacteristics,
    null | VAPI.Video.TransferCharacteristics,
    VAPI.VideoPlayer.Header
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.TransferCharacteristics,
      null | VAPI.Video.TransferCharacteristics,
      VAPI.VideoPlayer.Header
    >(this, "tc" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export type InputMode = "Single" | "Quad" | "UHD";
export class Load implements VScript.Referenceable<"VideoPlayer::Data::Load"> {
  readonly type_identifier = "VideoPlayer::Data::Load" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get file(): VScript.dKeyword<
    VScript.VSocket,
    string,
    string,
    string,
    string,
    VAPI.VideoPlayer.Load
  > {
    return new VScript.dKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.VideoPlayer.Load
    >(
      this,
      "file" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Load Clip
  */
  get load(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.VideoPlayer.Load
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.VideoPlayer.Load
    >(
      this,
      "load" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get progress(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.Load
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.Load
    >(this, "progress" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export interface MemoryCapacity {
  as_pages: VAPI.Primitives.Unsigned16;
  as_bytes: VAPI.Primitives.Unsigned64;
  as_requested: VAPI.VideoPlayer.MemoryCapacityAsRequested;

  /**
    This standard is used to calculate the required memory. It is derived
    from the (add_blanking, video_limitation, Frames, Time) settings
  */
  calculation_standard: null | VAPI.Video.Standard;
}
export type MotionStatus =
  | "Stop"
  | "Play"
  | "StepBackward"
  | "StepForward"
  | "Jump";
export class OutputDebug
  implements VScript.Referenceable<"VideoPlayer::Data::OutputDebug">
{
  readonly type_identifier = "VideoPlayer::Data::OutputDebug" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get reader_id(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "reader_id" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get reader_v_idx(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "reader_v_idx" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_first_active_line_field_0(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_first_active_line_field_0" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get end_first_blanking_line_field_0(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "end_first_blanking_line_field_0" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_first_active_line_field_1(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_first_active_line_field_1" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get end_first_blanking_line_field_1(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "end_first_blanking_line_field_1" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get line_number_field_0(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "line_number_field_0" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get line_number_field_1(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "line_number_field_1" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get line_total(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "line_total" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_line_number_generator(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_line_number_generator" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_v_flag_generator(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_v_flag_generator" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get horizontal_blanking(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "horizontal_blanking" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get horizontal_active(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "horizontal_active" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mode_hanc(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "mode_hanc" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mode_vanc(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "mode_vanc" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mode_video(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "mode_video" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mode_en_cnt(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "mode_en_cnt" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get ce_sel(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "ce_sel" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get ce_sel_enable(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "ce_sel_enable" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get length_frame(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "length_frame" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get length_line(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "length_line" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stride_line(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "stride_line" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stride_frame(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "stride_frame" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_address(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get end_address(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "end_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get jump(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "jump" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get reset(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "reset" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get start_generator(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "start_generator" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get delta_frame(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.VideoPlayer.OutputDebug
    >(this, "delta_frame" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get delta_time(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.VideoPlayer.OutputDebug
    >(this, "delta_time" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get time_from_start(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.VideoPlayer.OutputDebug
    >(this, "time_from_start" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get delta_start_address(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "delta_start_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get frame_start_address(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.VideoPlayer.OutputDebug
    >(this, "frame_start_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get register_panic(): VScript.rKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    VAPI.VideoPlayer.OutputDebug
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.VideoPlayer.OutputDebug
    >(this, "register_panic" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class Reader
  implements VScript.Referenceable<"VideoPlayer::Data::Reader">
{
  readonly type_identifier = "VideoPlayer::Data::Reader" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get active(): VScript.rKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    VAPI.VideoPlayer.Reader
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.VideoPlayer.Reader
    >(this, "active" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get debug() {
    return VAPI.VideoPlayer.lift.OutputDebug(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "debug"),
    );
  }
}
export interface SingleSettings {
  add_blanking: boolean;
  constraints: VAPI.VideoPlayer.VideoLimitation;
}
export interface VideoLimitationStandard {
  standard: VAPI.Video.Standard;
}
export interface TimeSettings {
  time: VScript.Duration;
}
export class Upload
  implements VScript.Referenceable<"VideoPlayer::Data::Upload">
{
  readonly type_identifier = "VideoPlayer::Data::Upload" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get load() {
    return VAPI.VideoPlayer.lift.Load(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "load"),
    );
  }
  get header() {
    return VAPI.VideoPlayer.lift.Header(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "header"),
    );
  }
}
export type VideoLimitation =
  | { variant: "Standard"; value: VAPI.VideoPlayer.VideoLimitationStandard }
  | { variant: "Bandwidth"; value: VAPI.VideoPlayer.VideoLimitationBandwidth };
export interface MemoryCapacityAsRequested {
  frames: null | number;
  time: null | VScript.Duration;
}
export interface HeaderDate {
  year: number;
  month: number;
  day: number;
}
export type PlayerIssues = {
  load_failed_bad_header: boolean;
  load_failed_no_header: boolean;
  load_failed_read_error: boolean;
  load_pending: boolean;
  missing_latched_standard: boolean;
  missing_timesource: boolean;
  out_of_memory: boolean;
  out_of_readers: boolean;
  out_of_writers: boolean;
  upload_error: boolean;
};
export interface HeaderTimeOfDay {
  hours: number;
  minutes: number;
  seconds: number;
}
export const Enums = {
  MotionStatus: [
    "Stop",
    "Play",
    "StepBackward",
    "StepForward",
    "Jump",
  ] as MotionStatus[],
  InputMode: ["Single", "Quad", "UHD"] as InputMode[],
  Groups: ["Group0", "Group1", "Group2", "Group3"] as Groups[],
  DelayMode: [
    "FrameSync_Freeze",
    "FrameSync_Black",
    "FramePhaser",
  ] as DelayMode[],
  BufferMode: ["Frames", "Time"] as BufferMode[],
} as const;
