M2tsSettings.fromJson constructor

M2tsSettings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory M2tsSettings.fromJson(Map<String, dynamic> json) {
  return M2tsSettings(
    audioBufferModel:
        (json['audioBufferModel'] as String?)?.toM2tsAudioBufferModel(),
    audioDuration: (json['audioDuration'] as String?)?.toM2tsAudioDuration(),
    audioFramesPerPes: json['audioFramesPerPes'] as int?,
    audioPids: (json['audioPids'] as List?)
        ?.whereNotNull()
        .map((e) => e as int)
        .toList(),
    bitrate: json['bitrate'] as int?,
    bufferModel: (json['bufferModel'] as String?)?.toM2tsBufferModel(),
    dvbNitSettings: json['dvbNitSettings'] != null
        ? DvbNitSettings.fromJson(
            json['dvbNitSettings'] as Map<String, dynamic>)
        : null,
    dvbSdtSettings: json['dvbSdtSettings'] != null
        ? DvbSdtSettings.fromJson(
            json['dvbSdtSettings'] as Map<String, dynamic>)
        : null,
    dvbSubPids: (json['dvbSubPids'] as List?)
        ?.whereNotNull()
        .map((e) => e as int)
        .toList(),
    dvbTdtSettings: json['dvbTdtSettings'] != null
        ? DvbTdtSettings.fromJson(
            json['dvbTdtSettings'] as Map<String, dynamic>)
        : null,
    dvbTeletextPid: json['dvbTeletextPid'] as int?,
    ebpAudioInterval:
        (json['ebpAudioInterval'] as String?)?.toM2tsEbpAudioInterval(),
    ebpPlacement: (json['ebpPlacement'] as String?)?.toM2tsEbpPlacement(),
    esRateInPes: (json['esRateInPes'] as String?)?.toM2tsEsRateInPes(),
    forceTsVideoEbpOrder: (json['forceTsVideoEbpOrder'] as String?)
        ?.toM2tsForceTsVideoEbpOrder(),
    fragmentTime: json['fragmentTime'] as double?,
    maxPcrInterval: json['maxPcrInterval'] as int?,
    minEbpInterval: json['minEbpInterval'] as int?,
    nielsenId3: (json['nielsenId3'] as String?)?.toM2tsNielsenId3(),
    nullPacketBitrate: json['nullPacketBitrate'] as double?,
    patInterval: json['patInterval'] as int?,
    pcrControl: (json['pcrControl'] as String?)?.toM2tsPcrControl(),
    pcrPid: json['pcrPid'] as int?,
    pmtInterval: json['pmtInterval'] as int?,
    pmtPid: json['pmtPid'] as int?,
    privateMetadataPid: json['privateMetadataPid'] as int?,
    programNumber: json['programNumber'] as int?,
    rateMode: (json['rateMode'] as String?)?.toM2tsRateMode(),
    scte35Esam: json['scte35Esam'] != null
        ? M2tsScte35Esam.fromJson(json['scte35Esam'] as Map<String, dynamic>)
        : null,
    scte35Pid: json['scte35Pid'] as int?,
    scte35Source: (json['scte35Source'] as String?)?.toM2tsScte35Source(),
    segmentationMarkers:
        (json['segmentationMarkers'] as String?)?.toM2tsSegmentationMarkers(),
    segmentationStyle:
        (json['segmentationStyle'] as String?)?.toM2tsSegmentationStyle(),
    segmentationTime: json['segmentationTime'] as double?,
    timedMetadataPid: json['timedMetadataPid'] as int?,
    transportStreamId: json['transportStreamId'] as int?,
    videoPid: json['videoPid'] as int?,
  );
}