mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
2961 lines
84 KiB
Java
2961 lines
84 KiB
Java
/*
|
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
*/
|
|
package dev.plexapi.sdk.models.operations;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import dev.plexapi.sdk.utils.Utils;
|
|
import java.lang.Boolean;
|
|
import java.lang.Float;
|
|
import java.lang.Integer;
|
|
import java.lang.Long;
|
|
import java.lang.Override;
|
|
import java.lang.String;
|
|
import java.util.Objects;
|
|
import java.util.Optional;
|
|
|
|
public class Stream {
|
|
|
|
/**
|
|
* Unique stream identifier.
|
|
*/
|
|
@JsonProperty("id")
|
|
private long id;
|
|
|
|
/**
|
|
* Stream type:
|
|
* - 1 = video
|
|
* - 2 = audio
|
|
* - 3 = subtitle
|
|
*/
|
|
@JsonProperty("streamType")
|
|
private StreamType streamType;
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("format")
|
|
private Optional<String> format;
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("default")
|
|
private Optional<Boolean> default_;
|
|
|
|
/**
|
|
* Codec used by the stream.
|
|
*/
|
|
@JsonProperty("codec")
|
|
private String codec;
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("index")
|
|
private Optional<Integer> index;
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("bitrate")
|
|
private Optional<Integer> bitrate;
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("language")
|
|
private Optional<String> language;
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("languageTag")
|
|
private Optional<String> languageTag;
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("languageCode")
|
|
private Optional<String> languageCode;
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("headerCompression")
|
|
private Optional<Boolean> headerCompression;
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIBLCompatID")
|
|
private Optional<Integer> doviblCompatID;
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIBLPresent")
|
|
private Optional<Boolean> doviblPresent;
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIELPresent")
|
|
private Optional<Boolean> dovielPresent;
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVILevel")
|
|
private Optional<Integer> doviLevel;
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIPresent")
|
|
private Optional<Boolean> doviPresent;
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIProfile")
|
|
private Optional<Integer> doviProfile;
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIRPUPresent")
|
|
private Optional<Boolean> dovirpuPresent;
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("DOVIVersion")
|
|
private Optional<String> doviVersion;
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("bitDepth")
|
|
private Optional<Integer> bitDepth;
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("chromaLocation")
|
|
private Optional<String> chromaLocation;
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("chromaSubsampling")
|
|
private Optional<String> chromaSubsampling;
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("codedHeight")
|
|
private Optional<Integer> codedHeight;
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("codedWidth")
|
|
private Optional<Integer> codedWidth;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("closedCaptions")
|
|
private Optional<Boolean> closedCaptions;
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("colorPrimaries")
|
|
private Optional<String> colorPrimaries;
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("colorRange")
|
|
private Optional<String> colorRange;
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("colorSpace")
|
|
private Optional<String> colorSpace;
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("colorTrc")
|
|
private Optional<String> colorTrc;
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("frameRate")
|
|
private Optional<Float> frameRate;
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("key")
|
|
private Optional<String> key;
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("height")
|
|
private Optional<Integer> height;
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("level")
|
|
private Optional<Integer> level;
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("original")
|
|
private Optional<Boolean> original;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("hasScalingMatrix")
|
|
private Optional<Boolean> hasScalingMatrix;
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("profile")
|
|
private Optional<String> profile;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("scanType")
|
|
private Optional<String> scanType;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("embeddedInVideo")
|
|
private Optional<String> embeddedInVideo;
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("refFrames")
|
|
private Optional<Integer> refFrames;
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("width")
|
|
private Optional<Integer> width;
|
|
|
|
/**
|
|
* Display title for the stream.
|
|
*/
|
|
@JsonProperty("displayTitle")
|
|
private String displayTitle;
|
|
|
|
/**
|
|
* Extended display title for the stream.
|
|
*/
|
|
@JsonProperty("extendedDisplayTitle")
|
|
private String extendedDisplayTitle;
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("selected")
|
|
private Optional<Boolean> selected;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("forced")
|
|
private Optional<Boolean> forced;
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("channels")
|
|
private Optional<Integer> channels;
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("audioChannelLayout")
|
|
private Optional<String> audioChannelLayout;
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("samplingRate")
|
|
private Optional<Integer> samplingRate;
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("canAutoSync")
|
|
private Optional<Boolean> canAutoSync;
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("hearingImpaired")
|
|
private Optional<Boolean> hearingImpaired;
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("dub")
|
|
private Optional<Boolean> dub;
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("title")
|
|
private Optional<String> title;
|
|
|
|
@JsonCreator
|
|
public Stream(
|
|
@JsonProperty("id") long id,
|
|
@JsonProperty("streamType") StreamType streamType,
|
|
@JsonProperty("format") Optional<String> format,
|
|
@JsonProperty("default") Optional<Boolean> default_,
|
|
@JsonProperty("codec") String codec,
|
|
@JsonProperty("index") Optional<Integer> index,
|
|
@JsonProperty("bitrate") Optional<Integer> bitrate,
|
|
@JsonProperty("language") Optional<String> language,
|
|
@JsonProperty("languageTag") Optional<String> languageTag,
|
|
@JsonProperty("languageCode") Optional<String> languageCode,
|
|
@JsonProperty("headerCompression") Optional<Boolean> headerCompression,
|
|
@JsonProperty("DOVIBLCompatID") Optional<Integer> doviblCompatID,
|
|
@JsonProperty("DOVIBLPresent") Optional<Boolean> doviblPresent,
|
|
@JsonProperty("DOVIELPresent") Optional<Boolean> dovielPresent,
|
|
@JsonProperty("DOVILevel") Optional<Integer> doviLevel,
|
|
@JsonProperty("DOVIPresent") Optional<Boolean> doviPresent,
|
|
@JsonProperty("DOVIProfile") Optional<Integer> doviProfile,
|
|
@JsonProperty("DOVIRPUPresent") Optional<Boolean> dovirpuPresent,
|
|
@JsonProperty("DOVIVersion") Optional<String> doviVersion,
|
|
@JsonProperty("bitDepth") Optional<Integer> bitDepth,
|
|
@JsonProperty("chromaLocation") Optional<String> chromaLocation,
|
|
@JsonProperty("chromaSubsampling") Optional<String> chromaSubsampling,
|
|
@JsonProperty("codedHeight") Optional<Integer> codedHeight,
|
|
@JsonProperty("codedWidth") Optional<Integer> codedWidth,
|
|
@JsonProperty("closedCaptions") Optional<Boolean> closedCaptions,
|
|
@JsonProperty("colorPrimaries") Optional<String> colorPrimaries,
|
|
@JsonProperty("colorRange") Optional<String> colorRange,
|
|
@JsonProperty("colorSpace") Optional<String> colorSpace,
|
|
@JsonProperty("colorTrc") Optional<String> colorTrc,
|
|
@JsonProperty("frameRate") Optional<Float> frameRate,
|
|
@JsonProperty("key") Optional<String> key,
|
|
@JsonProperty("height") Optional<Integer> height,
|
|
@JsonProperty("level") Optional<Integer> level,
|
|
@JsonProperty("original") Optional<Boolean> original,
|
|
@JsonProperty("hasScalingMatrix") Optional<Boolean> hasScalingMatrix,
|
|
@JsonProperty("profile") Optional<String> profile,
|
|
@JsonProperty("scanType") Optional<String> scanType,
|
|
@JsonProperty("embeddedInVideo") Optional<String> embeddedInVideo,
|
|
@JsonProperty("refFrames") Optional<Integer> refFrames,
|
|
@JsonProperty("width") Optional<Integer> width,
|
|
@JsonProperty("displayTitle") String displayTitle,
|
|
@JsonProperty("extendedDisplayTitle") String extendedDisplayTitle,
|
|
@JsonProperty("selected") Optional<Boolean> selected,
|
|
@JsonProperty("forced") Optional<Boolean> forced,
|
|
@JsonProperty("channels") Optional<Integer> channels,
|
|
@JsonProperty("audioChannelLayout") Optional<String> audioChannelLayout,
|
|
@JsonProperty("samplingRate") Optional<Integer> samplingRate,
|
|
@JsonProperty("canAutoSync") Optional<Boolean> canAutoSync,
|
|
@JsonProperty("hearingImpaired") Optional<Boolean> hearingImpaired,
|
|
@JsonProperty("dub") Optional<Boolean> dub,
|
|
@JsonProperty("title") Optional<String> title) {
|
|
Utils.checkNotNull(id, "id");
|
|
Utils.checkNotNull(streamType, "streamType");
|
|
Utils.checkNotNull(format, "format");
|
|
Utils.checkNotNull(default_, "default_");
|
|
Utils.checkNotNull(codec, "codec");
|
|
Utils.checkNotNull(index, "index");
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
Utils.checkNotNull(language, "language");
|
|
Utils.checkNotNull(languageTag, "languageTag");
|
|
Utils.checkNotNull(languageCode, "languageCode");
|
|
Utils.checkNotNull(headerCompression, "headerCompression");
|
|
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
|
|
Utils.checkNotNull(doviblPresent, "doviblPresent");
|
|
Utils.checkNotNull(dovielPresent, "dovielPresent");
|
|
Utils.checkNotNull(doviLevel, "doviLevel");
|
|
Utils.checkNotNull(doviPresent, "doviPresent");
|
|
Utils.checkNotNull(doviProfile, "doviProfile");
|
|
Utils.checkNotNull(dovirpuPresent, "dovirpuPresent");
|
|
Utils.checkNotNull(doviVersion, "doviVersion");
|
|
Utils.checkNotNull(bitDepth, "bitDepth");
|
|
Utils.checkNotNull(chromaLocation, "chromaLocation");
|
|
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
|
|
Utils.checkNotNull(codedHeight, "codedHeight");
|
|
Utils.checkNotNull(codedWidth, "codedWidth");
|
|
Utils.checkNotNull(closedCaptions, "closedCaptions");
|
|
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
|
|
Utils.checkNotNull(colorRange, "colorRange");
|
|
Utils.checkNotNull(colorSpace, "colorSpace");
|
|
Utils.checkNotNull(colorTrc, "colorTrc");
|
|
Utils.checkNotNull(frameRate, "frameRate");
|
|
Utils.checkNotNull(key, "key");
|
|
Utils.checkNotNull(height, "height");
|
|
Utils.checkNotNull(level, "level");
|
|
Utils.checkNotNull(original, "original");
|
|
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
|
|
Utils.checkNotNull(profile, "profile");
|
|
Utils.checkNotNull(scanType, "scanType");
|
|
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
|
|
Utils.checkNotNull(refFrames, "refFrames");
|
|
Utils.checkNotNull(width, "width");
|
|
Utils.checkNotNull(displayTitle, "displayTitle");
|
|
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
|
Utils.checkNotNull(selected, "selected");
|
|
Utils.checkNotNull(forced, "forced");
|
|
Utils.checkNotNull(channels, "channels");
|
|
Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
|
|
Utils.checkNotNull(samplingRate, "samplingRate");
|
|
Utils.checkNotNull(canAutoSync, "canAutoSync");
|
|
Utils.checkNotNull(hearingImpaired, "hearingImpaired");
|
|
Utils.checkNotNull(dub, "dub");
|
|
Utils.checkNotNull(title, "title");
|
|
this.id = id;
|
|
this.streamType = streamType;
|
|
this.format = format;
|
|
this.default_ = default_;
|
|
this.codec = codec;
|
|
this.index = index;
|
|
this.bitrate = bitrate;
|
|
this.language = language;
|
|
this.languageTag = languageTag;
|
|
this.languageCode = languageCode;
|
|
this.headerCompression = headerCompression;
|
|
this.doviblCompatID = doviblCompatID;
|
|
this.doviblPresent = doviblPresent;
|
|
this.dovielPresent = dovielPresent;
|
|
this.doviLevel = doviLevel;
|
|
this.doviPresent = doviPresent;
|
|
this.doviProfile = doviProfile;
|
|
this.dovirpuPresent = dovirpuPresent;
|
|
this.doviVersion = doviVersion;
|
|
this.bitDepth = bitDepth;
|
|
this.chromaLocation = chromaLocation;
|
|
this.chromaSubsampling = chromaSubsampling;
|
|
this.codedHeight = codedHeight;
|
|
this.codedWidth = codedWidth;
|
|
this.closedCaptions = closedCaptions;
|
|
this.colorPrimaries = colorPrimaries;
|
|
this.colorRange = colorRange;
|
|
this.colorSpace = colorSpace;
|
|
this.colorTrc = colorTrc;
|
|
this.frameRate = frameRate;
|
|
this.key = key;
|
|
this.height = height;
|
|
this.level = level;
|
|
this.original = original;
|
|
this.hasScalingMatrix = hasScalingMatrix;
|
|
this.profile = profile;
|
|
this.scanType = scanType;
|
|
this.embeddedInVideo = embeddedInVideo;
|
|
this.refFrames = refFrames;
|
|
this.width = width;
|
|
this.displayTitle = displayTitle;
|
|
this.extendedDisplayTitle = extendedDisplayTitle;
|
|
this.selected = selected;
|
|
this.forced = forced;
|
|
this.channels = channels;
|
|
this.audioChannelLayout = audioChannelLayout;
|
|
this.samplingRate = samplingRate;
|
|
this.canAutoSync = canAutoSync;
|
|
this.hearingImpaired = hearingImpaired;
|
|
this.dub = dub;
|
|
this.title = title;
|
|
}
|
|
|
|
public Stream(
|
|
long id,
|
|
StreamType streamType,
|
|
String codec,
|
|
String displayTitle,
|
|
String extendedDisplayTitle) {
|
|
this(id, streamType, Optional.empty(), Optional.empty(), codec, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
|
}
|
|
|
|
/**
|
|
* Unique stream identifier.
|
|
*/
|
|
@JsonIgnore
|
|
public long id() {
|
|
return id;
|
|
}
|
|
|
|
/**
|
|
* Stream type:
|
|
* - 1 = video
|
|
* - 2 = audio
|
|
* - 3 = subtitle
|
|
*/
|
|
@JsonIgnore
|
|
public StreamType streamType() {
|
|
return streamType;
|
|
}
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> format() {
|
|
return format;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> default_() {
|
|
return default_;
|
|
}
|
|
|
|
/**
|
|
* Codec used by the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public String codec() {
|
|
return codec;
|
|
}
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> index() {
|
|
return index;
|
|
}
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> bitrate() {
|
|
return bitrate;
|
|
}
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> language() {
|
|
return language;
|
|
}
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> languageTag() {
|
|
return languageTag;
|
|
}
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> languageCode() {
|
|
return languageCode;
|
|
}
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> headerCompression() {
|
|
return headerCompression;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> doviblCompatID() {
|
|
return doviblCompatID;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> doviblPresent() {
|
|
return doviblPresent;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> dovielPresent() {
|
|
return dovielPresent;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> doviLevel() {
|
|
return doviLevel;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> doviPresent() {
|
|
return doviPresent;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> doviProfile() {
|
|
return doviProfile;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> dovirpuPresent() {
|
|
return dovirpuPresent;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> doviVersion() {
|
|
return doviVersion;
|
|
}
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> bitDepth() {
|
|
return bitDepth;
|
|
}
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> chromaLocation() {
|
|
return chromaLocation;
|
|
}
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> chromaSubsampling() {
|
|
return chromaSubsampling;
|
|
}
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> codedHeight() {
|
|
return codedHeight;
|
|
}
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> codedWidth() {
|
|
return codedWidth;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Boolean> closedCaptions() {
|
|
return closedCaptions;
|
|
}
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> colorPrimaries() {
|
|
return colorPrimaries;
|
|
}
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> colorRange() {
|
|
return colorRange;
|
|
}
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> colorSpace() {
|
|
return colorSpace;
|
|
}
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> colorTrc() {
|
|
return colorTrc;
|
|
}
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Float> frameRate() {
|
|
return frameRate;
|
|
}
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> key() {
|
|
return key;
|
|
}
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> height() {
|
|
return height;
|
|
}
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> level() {
|
|
return level;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> original() {
|
|
return original;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Boolean> hasScalingMatrix() {
|
|
return hasScalingMatrix;
|
|
}
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> profile() {
|
|
return profile;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<String> scanType() {
|
|
return scanType;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<String> embeddedInVideo() {
|
|
return embeddedInVideo;
|
|
}
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> refFrames() {
|
|
return refFrames;
|
|
}
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> width() {
|
|
return width;
|
|
}
|
|
|
|
/**
|
|
* Display title for the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public String displayTitle() {
|
|
return displayTitle;
|
|
}
|
|
|
|
/**
|
|
* Extended display title for the stream.
|
|
*/
|
|
@JsonIgnore
|
|
public String extendedDisplayTitle() {
|
|
return extendedDisplayTitle;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> selected() {
|
|
return selected;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Boolean> forced() {
|
|
return forced;
|
|
}
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> channels() {
|
|
return channels;
|
|
}
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> audioChannelLayout() {
|
|
return audioChannelLayout;
|
|
}
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Integer> samplingRate() {
|
|
return samplingRate;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> canAutoSync() {
|
|
return canAutoSync;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> hearingImpaired() {
|
|
return hearingImpaired;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<Boolean> dub() {
|
|
return dub;
|
|
}
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> title() {
|
|
return title;
|
|
}
|
|
|
|
public final static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
/**
|
|
* Unique stream identifier.
|
|
*/
|
|
public Stream withId(long id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Stream type:
|
|
* - 1 = video
|
|
* - 2 = audio
|
|
* - 3 = subtitle
|
|
*/
|
|
public Stream withStreamType(StreamType streamType) {
|
|
Utils.checkNotNull(streamType, "streamType");
|
|
this.streamType = streamType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
public Stream withFormat(String format) {
|
|
Utils.checkNotNull(format, "format");
|
|
this.format = Optional.ofNullable(format);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
public Stream withFormat(Optional<String> format) {
|
|
Utils.checkNotNull(format, "format");
|
|
this.format = format;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
public Stream withDefault(boolean default_) {
|
|
Utils.checkNotNull(default_, "default_");
|
|
this.default_ = Optional.ofNullable(default_);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
public Stream withDefault(Optional<Boolean> default_) {
|
|
Utils.checkNotNull(default_, "default_");
|
|
this.default_ = default_;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Codec used by the stream.
|
|
*/
|
|
public Stream withCodec(String codec) {
|
|
Utils.checkNotNull(codec, "codec");
|
|
this.codec = codec;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
public Stream withIndex(int index) {
|
|
Utils.checkNotNull(index, "index");
|
|
this.index = Optional.ofNullable(index);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
public Stream withIndex(Optional<Integer> index) {
|
|
Utils.checkNotNull(index, "index");
|
|
this.index = index;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
public Stream withBitrate(int bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = Optional.ofNullable(bitrate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
public Stream withBitrate(Optional<Integer> bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = bitrate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
public Stream withLanguage(String language) {
|
|
Utils.checkNotNull(language, "language");
|
|
this.language = Optional.ofNullable(language);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
public Stream withLanguage(Optional<String> language) {
|
|
Utils.checkNotNull(language, "language");
|
|
this.language = language;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
public Stream withLanguageTag(String languageTag) {
|
|
Utils.checkNotNull(languageTag, "languageTag");
|
|
this.languageTag = Optional.ofNullable(languageTag);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
public Stream withLanguageTag(Optional<String> languageTag) {
|
|
Utils.checkNotNull(languageTag, "languageTag");
|
|
this.languageTag = languageTag;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
public Stream withLanguageCode(String languageCode) {
|
|
Utils.checkNotNull(languageCode, "languageCode");
|
|
this.languageCode = Optional.ofNullable(languageCode);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
public Stream withLanguageCode(Optional<String> languageCode) {
|
|
Utils.checkNotNull(languageCode, "languageCode");
|
|
this.languageCode = languageCode;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
public Stream withHeaderCompression(boolean headerCompression) {
|
|
Utils.checkNotNull(headerCompression, "headerCompression");
|
|
this.headerCompression = Optional.ofNullable(headerCompression);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
public Stream withHeaderCompression(Optional<Boolean> headerCompression) {
|
|
Utils.checkNotNull(headerCompression, "headerCompression");
|
|
this.headerCompression = headerCompression;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
public Stream withDOVIBLCompatID(int doviblCompatID) {
|
|
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
|
|
this.doviblCompatID = Optional.ofNullable(doviblCompatID);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
public Stream withDOVIBLCompatID(Optional<Integer> doviblCompatID) {
|
|
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
|
|
this.doviblCompatID = doviblCompatID;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
public Stream withDOVIBLPresent(boolean doviblPresent) {
|
|
Utils.checkNotNull(doviblPresent, "doviblPresent");
|
|
this.doviblPresent = Optional.ofNullable(doviblPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
public Stream withDOVIBLPresent(Optional<Boolean> doviblPresent) {
|
|
Utils.checkNotNull(doviblPresent, "doviblPresent");
|
|
this.doviblPresent = doviblPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
public Stream withDOVIELPresent(boolean dovielPresent) {
|
|
Utils.checkNotNull(dovielPresent, "dovielPresent");
|
|
this.dovielPresent = Optional.ofNullable(dovielPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
public Stream withDOVIELPresent(Optional<Boolean> dovielPresent) {
|
|
Utils.checkNotNull(dovielPresent, "dovielPresent");
|
|
this.dovielPresent = dovielPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
public Stream withDOVILevel(int doviLevel) {
|
|
Utils.checkNotNull(doviLevel, "doviLevel");
|
|
this.doviLevel = Optional.ofNullable(doviLevel);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
public Stream withDOVILevel(Optional<Integer> doviLevel) {
|
|
Utils.checkNotNull(doviLevel, "doviLevel");
|
|
this.doviLevel = doviLevel;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
public Stream withDOVIPresent(boolean doviPresent) {
|
|
Utils.checkNotNull(doviPresent, "doviPresent");
|
|
this.doviPresent = Optional.ofNullable(doviPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
public Stream withDOVIPresent(Optional<Boolean> doviPresent) {
|
|
Utils.checkNotNull(doviPresent, "doviPresent");
|
|
this.doviPresent = doviPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
public Stream withDOVIProfile(int doviProfile) {
|
|
Utils.checkNotNull(doviProfile, "doviProfile");
|
|
this.doviProfile = Optional.ofNullable(doviProfile);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
public Stream withDOVIProfile(Optional<Integer> doviProfile) {
|
|
Utils.checkNotNull(doviProfile, "doviProfile");
|
|
this.doviProfile = doviProfile;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
public Stream withDOVIRPUPresent(boolean dovirpuPresent) {
|
|
Utils.checkNotNull(dovirpuPresent, "dovirpuPresent");
|
|
this.dovirpuPresent = Optional.ofNullable(dovirpuPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
public Stream withDOVIRPUPresent(Optional<Boolean> dovirpuPresent) {
|
|
Utils.checkNotNull(dovirpuPresent, "dovirpuPresent");
|
|
this.dovirpuPresent = dovirpuPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
public Stream withDOVIVersion(String doviVersion) {
|
|
Utils.checkNotNull(doviVersion, "doviVersion");
|
|
this.doviVersion = Optional.ofNullable(doviVersion);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
public Stream withDOVIVersion(Optional<String> doviVersion) {
|
|
Utils.checkNotNull(doviVersion, "doviVersion");
|
|
this.doviVersion = doviVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
public Stream withBitDepth(int bitDepth) {
|
|
Utils.checkNotNull(bitDepth, "bitDepth");
|
|
this.bitDepth = Optional.ofNullable(bitDepth);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
public Stream withBitDepth(Optional<Integer> bitDepth) {
|
|
Utils.checkNotNull(bitDepth, "bitDepth");
|
|
this.bitDepth = bitDepth;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
public Stream withChromaLocation(String chromaLocation) {
|
|
Utils.checkNotNull(chromaLocation, "chromaLocation");
|
|
this.chromaLocation = Optional.ofNullable(chromaLocation);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
public Stream withChromaLocation(Optional<String> chromaLocation) {
|
|
Utils.checkNotNull(chromaLocation, "chromaLocation");
|
|
this.chromaLocation = chromaLocation;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
public Stream withChromaSubsampling(String chromaSubsampling) {
|
|
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
|
|
this.chromaSubsampling = Optional.ofNullable(chromaSubsampling);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
public Stream withChromaSubsampling(Optional<String> chromaSubsampling) {
|
|
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
|
|
this.chromaSubsampling = chromaSubsampling;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
public Stream withCodedHeight(int codedHeight) {
|
|
Utils.checkNotNull(codedHeight, "codedHeight");
|
|
this.codedHeight = Optional.ofNullable(codedHeight);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
public Stream withCodedHeight(Optional<Integer> codedHeight) {
|
|
Utils.checkNotNull(codedHeight, "codedHeight");
|
|
this.codedHeight = codedHeight;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
public Stream withCodedWidth(int codedWidth) {
|
|
Utils.checkNotNull(codedWidth, "codedWidth");
|
|
this.codedWidth = Optional.ofNullable(codedWidth);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
public Stream withCodedWidth(Optional<Integer> codedWidth) {
|
|
Utils.checkNotNull(codedWidth, "codedWidth");
|
|
this.codedWidth = codedWidth;
|
|
return this;
|
|
}
|
|
|
|
public Stream withClosedCaptions(boolean closedCaptions) {
|
|
Utils.checkNotNull(closedCaptions, "closedCaptions");
|
|
this.closedCaptions = Optional.ofNullable(closedCaptions);
|
|
return this;
|
|
}
|
|
|
|
public Stream withClosedCaptions(Optional<Boolean> closedCaptions) {
|
|
Utils.checkNotNull(closedCaptions, "closedCaptions");
|
|
this.closedCaptions = closedCaptions;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
public Stream withColorPrimaries(String colorPrimaries) {
|
|
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
|
|
this.colorPrimaries = Optional.ofNullable(colorPrimaries);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
public Stream withColorPrimaries(Optional<String> colorPrimaries) {
|
|
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
|
|
this.colorPrimaries = colorPrimaries;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
public Stream withColorRange(String colorRange) {
|
|
Utils.checkNotNull(colorRange, "colorRange");
|
|
this.colorRange = Optional.ofNullable(colorRange);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
public Stream withColorRange(Optional<String> colorRange) {
|
|
Utils.checkNotNull(colorRange, "colorRange");
|
|
this.colorRange = colorRange;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
public Stream withColorSpace(String colorSpace) {
|
|
Utils.checkNotNull(colorSpace, "colorSpace");
|
|
this.colorSpace = Optional.ofNullable(colorSpace);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
public Stream withColorSpace(Optional<String> colorSpace) {
|
|
Utils.checkNotNull(colorSpace, "colorSpace");
|
|
this.colorSpace = colorSpace;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
public Stream withColorTrc(String colorTrc) {
|
|
Utils.checkNotNull(colorTrc, "colorTrc");
|
|
this.colorTrc = Optional.ofNullable(colorTrc);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
public Stream withColorTrc(Optional<String> colorTrc) {
|
|
Utils.checkNotNull(colorTrc, "colorTrc");
|
|
this.colorTrc = colorTrc;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
public Stream withFrameRate(float frameRate) {
|
|
Utils.checkNotNull(frameRate, "frameRate");
|
|
this.frameRate = Optional.ofNullable(frameRate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
public Stream withFrameRate(Optional<Float> frameRate) {
|
|
Utils.checkNotNull(frameRate, "frameRate");
|
|
this.frameRate = frameRate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
public Stream withKey(String key) {
|
|
Utils.checkNotNull(key, "key");
|
|
this.key = Optional.ofNullable(key);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
public Stream withKey(Optional<String> key) {
|
|
Utils.checkNotNull(key, "key");
|
|
this.key = key;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
public Stream withHeight(int height) {
|
|
Utils.checkNotNull(height, "height");
|
|
this.height = Optional.ofNullable(height);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
public Stream withHeight(Optional<Integer> height) {
|
|
Utils.checkNotNull(height, "height");
|
|
this.height = height;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
public Stream withLevel(int level) {
|
|
Utils.checkNotNull(level, "level");
|
|
this.level = Optional.ofNullable(level);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
public Stream withLevel(Optional<Integer> level) {
|
|
Utils.checkNotNull(level, "level");
|
|
this.level = level;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
public Stream withOriginal(boolean original) {
|
|
Utils.checkNotNull(original, "original");
|
|
this.original = Optional.ofNullable(original);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
public Stream withOriginal(Optional<Boolean> original) {
|
|
Utils.checkNotNull(original, "original");
|
|
this.original = original;
|
|
return this;
|
|
}
|
|
|
|
public Stream withHasScalingMatrix(boolean hasScalingMatrix) {
|
|
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
|
|
this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix);
|
|
return this;
|
|
}
|
|
|
|
public Stream withHasScalingMatrix(Optional<Boolean> hasScalingMatrix) {
|
|
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
|
|
this.hasScalingMatrix = hasScalingMatrix;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
public Stream withProfile(String profile) {
|
|
Utils.checkNotNull(profile, "profile");
|
|
this.profile = Optional.ofNullable(profile);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
public Stream withProfile(Optional<String> profile) {
|
|
Utils.checkNotNull(profile, "profile");
|
|
this.profile = profile;
|
|
return this;
|
|
}
|
|
|
|
public Stream withScanType(String scanType) {
|
|
Utils.checkNotNull(scanType, "scanType");
|
|
this.scanType = Optional.ofNullable(scanType);
|
|
return this;
|
|
}
|
|
|
|
public Stream withScanType(Optional<String> scanType) {
|
|
Utils.checkNotNull(scanType, "scanType");
|
|
this.scanType = scanType;
|
|
return this;
|
|
}
|
|
|
|
public Stream withEmbeddedInVideo(String embeddedInVideo) {
|
|
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
|
|
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
|
|
return this;
|
|
}
|
|
|
|
public Stream withEmbeddedInVideo(Optional<String> embeddedInVideo) {
|
|
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
|
|
this.embeddedInVideo = embeddedInVideo;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
public Stream withRefFrames(int refFrames) {
|
|
Utils.checkNotNull(refFrames, "refFrames");
|
|
this.refFrames = Optional.ofNullable(refFrames);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
public Stream withRefFrames(Optional<Integer> refFrames) {
|
|
Utils.checkNotNull(refFrames, "refFrames");
|
|
this.refFrames = refFrames;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
public Stream withWidth(int width) {
|
|
Utils.checkNotNull(width, "width");
|
|
this.width = Optional.ofNullable(width);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
public Stream withWidth(Optional<Integer> width) {
|
|
Utils.checkNotNull(width, "width");
|
|
this.width = width;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Display title for the stream.
|
|
*/
|
|
public Stream withDisplayTitle(String displayTitle) {
|
|
Utils.checkNotNull(displayTitle, "displayTitle");
|
|
this.displayTitle = displayTitle;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Extended display title for the stream.
|
|
*/
|
|
public Stream withExtendedDisplayTitle(String extendedDisplayTitle) {
|
|
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
|
this.extendedDisplayTitle = extendedDisplayTitle;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
public Stream withSelected(boolean selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = Optional.ofNullable(selected);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
public Stream withSelected(Optional<Boolean> selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = selected;
|
|
return this;
|
|
}
|
|
|
|
public Stream withForced(boolean forced) {
|
|
Utils.checkNotNull(forced, "forced");
|
|
this.forced = Optional.ofNullable(forced);
|
|
return this;
|
|
}
|
|
|
|
public Stream withForced(Optional<Boolean> forced) {
|
|
Utils.checkNotNull(forced, "forced");
|
|
this.forced = forced;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
public Stream withChannels(int channels) {
|
|
Utils.checkNotNull(channels, "channels");
|
|
this.channels = Optional.ofNullable(channels);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
public Stream withChannels(Optional<Integer> channels) {
|
|
Utils.checkNotNull(channels, "channels");
|
|
this.channels = channels;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
public Stream withAudioChannelLayout(String audioChannelLayout) {
|
|
Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
|
|
this.audioChannelLayout = Optional.ofNullable(audioChannelLayout);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
public Stream withAudioChannelLayout(Optional<String> audioChannelLayout) {
|
|
Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
|
|
this.audioChannelLayout = audioChannelLayout;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
public Stream withSamplingRate(int samplingRate) {
|
|
Utils.checkNotNull(samplingRate, "samplingRate");
|
|
this.samplingRate = Optional.ofNullable(samplingRate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
public Stream withSamplingRate(Optional<Integer> samplingRate) {
|
|
Utils.checkNotNull(samplingRate, "samplingRate");
|
|
this.samplingRate = samplingRate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
public Stream withCanAutoSync(boolean canAutoSync) {
|
|
Utils.checkNotNull(canAutoSync, "canAutoSync");
|
|
this.canAutoSync = Optional.ofNullable(canAutoSync);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
public Stream withCanAutoSync(Optional<Boolean> canAutoSync) {
|
|
Utils.checkNotNull(canAutoSync, "canAutoSync");
|
|
this.canAutoSync = canAutoSync;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
public Stream withHearingImpaired(boolean hearingImpaired) {
|
|
Utils.checkNotNull(hearingImpaired, "hearingImpaired");
|
|
this.hearingImpaired = Optional.ofNullable(hearingImpaired);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
public Stream withHearingImpaired(Optional<Boolean> hearingImpaired) {
|
|
Utils.checkNotNull(hearingImpaired, "hearingImpaired");
|
|
this.hearingImpaired = hearingImpaired;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
public Stream withDub(boolean dub) {
|
|
Utils.checkNotNull(dub, "dub");
|
|
this.dub = Optional.ofNullable(dub);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
public Stream withDub(Optional<Boolean> dub) {
|
|
Utils.checkNotNull(dub, "dub");
|
|
this.dub = dub;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
public Stream withTitle(String title) {
|
|
Utils.checkNotNull(title, "title");
|
|
this.title = Optional.ofNullable(title);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
public Stream withTitle(Optional<String> title) {
|
|
Utils.checkNotNull(title, "title");
|
|
this.title = title;
|
|
return this;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean equals(java.lang.Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
Stream other = (Stream) o;
|
|
return
|
|
Objects.deepEquals(this.id, other.id) &&
|
|
Objects.deepEquals(this.streamType, other.streamType) &&
|
|
Objects.deepEquals(this.format, other.format) &&
|
|
Objects.deepEquals(this.default_, other.default_) &&
|
|
Objects.deepEquals(this.codec, other.codec) &&
|
|
Objects.deepEquals(this.index, other.index) &&
|
|
Objects.deepEquals(this.bitrate, other.bitrate) &&
|
|
Objects.deepEquals(this.language, other.language) &&
|
|
Objects.deepEquals(this.languageTag, other.languageTag) &&
|
|
Objects.deepEquals(this.languageCode, other.languageCode) &&
|
|
Objects.deepEquals(this.headerCompression, other.headerCompression) &&
|
|
Objects.deepEquals(this.doviblCompatID, other.doviblCompatID) &&
|
|
Objects.deepEquals(this.doviblPresent, other.doviblPresent) &&
|
|
Objects.deepEquals(this.dovielPresent, other.dovielPresent) &&
|
|
Objects.deepEquals(this.doviLevel, other.doviLevel) &&
|
|
Objects.deepEquals(this.doviPresent, other.doviPresent) &&
|
|
Objects.deepEquals(this.doviProfile, other.doviProfile) &&
|
|
Objects.deepEquals(this.dovirpuPresent, other.dovirpuPresent) &&
|
|
Objects.deepEquals(this.doviVersion, other.doviVersion) &&
|
|
Objects.deepEquals(this.bitDepth, other.bitDepth) &&
|
|
Objects.deepEquals(this.chromaLocation, other.chromaLocation) &&
|
|
Objects.deepEquals(this.chromaSubsampling, other.chromaSubsampling) &&
|
|
Objects.deepEquals(this.codedHeight, other.codedHeight) &&
|
|
Objects.deepEquals(this.codedWidth, other.codedWidth) &&
|
|
Objects.deepEquals(this.closedCaptions, other.closedCaptions) &&
|
|
Objects.deepEquals(this.colorPrimaries, other.colorPrimaries) &&
|
|
Objects.deepEquals(this.colorRange, other.colorRange) &&
|
|
Objects.deepEquals(this.colorSpace, other.colorSpace) &&
|
|
Objects.deepEquals(this.colorTrc, other.colorTrc) &&
|
|
Objects.deepEquals(this.frameRate, other.frameRate) &&
|
|
Objects.deepEquals(this.key, other.key) &&
|
|
Objects.deepEquals(this.height, other.height) &&
|
|
Objects.deepEquals(this.level, other.level) &&
|
|
Objects.deepEquals(this.original, other.original) &&
|
|
Objects.deepEquals(this.hasScalingMatrix, other.hasScalingMatrix) &&
|
|
Objects.deepEquals(this.profile, other.profile) &&
|
|
Objects.deepEquals(this.scanType, other.scanType) &&
|
|
Objects.deepEquals(this.embeddedInVideo, other.embeddedInVideo) &&
|
|
Objects.deepEquals(this.refFrames, other.refFrames) &&
|
|
Objects.deepEquals(this.width, other.width) &&
|
|
Objects.deepEquals(this.displayTitle, other.displayTitle) &&
|
|
Objects.deepEquals(this.extendedDisplayTitle, other.extendedDisplayTitle) &&
|
|
Objects.deepEquals(this.selected, other.selected) &&
|
|
Objects.deepEquals(this.forced, other.forced) &&
|
|
Objects.deepEquals(this.channels, other.channels) &&
|
|
Objects.deepEquals(this.audioChannelLayout, other.audioChannelLayout) &&
|
|
Objects.deepEquals(this.samplingRate, other.samplingRate) &&
|
|
Objects.deepEquals(this.canAutoSync, other.canAutoSync) &&
|
|
Objects.deepEquals(this.hearingImpaired, other.hearingImpaired) &&
|
|
Objects.deepEquals(this.dub, other.dub) &&
|
|
Objects.deepEquals(this.title, other.title);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(
|
|
id,
|
|
streamType,
|
|
format,
|
|
default_,
|
|
codec,
|
|
index,
|
|
bitrate,
|
|
language,
|
|
languageTag,
|
|
languageCode,
|
|
headerCompression,
|
|
doviblCompatID,
|
|
doviblPresent,
|
|
dovielPresent,
|
|
doviLevel,
|
|
doviPresent,
|
|
doviProfile,
|
|
dovirpuPresent,
|
|
doviVersion,
|
|
bitDepth,
|
|
chromaLocation,
|
|
chromaSubsampling,
|
|
codedHeight,
|
|
codedWidth,
|
|
closedCaptions,
|
|
colorPrimaries,
|
|
colorRange,
|
|
colorSpace,
|
|
colorTrc,
|
|
frameRate,
|
|
key,
|
|
height,
|
|
level,
|
|
original,
|
|
hasScalingMatrix,
|
|
profile,
|
|
scanType,
|
|
embeddedInVideo,
|
|
refFrames,
|
|
width,
|
|
displayTitle,
|
|
extendedDisplayTitle,
|
|
selected,
|
|
forced,
|
|
channels,
|
|
audioChannelLayout,
|
|
samplingRate,
|
|
canAutoSync,
|
|
hearingImpaired,
|
|
dub,
|
|
title);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return Utils.toString(Stream.class,
|
|
"id", id,
|
|
"streamType", streamType,
|
|
"format", format,
|
|
"default_", default_,
|
|
"codec", codec,
|
|
"index", index,
|
|
"bitrate", bitrate,
|
|
"language", language,
|
|
"languageTag", languageTag,
|
|
"languageCode", languageCode,
|
|
"headerCompression", headerCompression,
|
|
"doviblCompatID", doviblCompatID,
|
|
"doviblPresent", doviblPresent,
|
|
"dovielPresent", dovielPresent,
|
|
"doviLevel", doviLevel,
|
|
"doviPresent", doviPresent,
|
|
"doviProfile", doviProfile,
|
|
"dovirpuPresent", dovirpuPresent,
|
|
"doviVersion", doviVersion,
|
|
"bitDepth", bitDepth,
|
|
"chromaLocation", chromaLocation,
|
|
"chromaSubsampling", chromaSubsampling,
|
|
"codedHeight", codedHeight,
|
|
"codedWidth", codedWidth,
|
|
"closedCaptions", closedCaptions,
|
|
"colorPrimaries", colorPrimaries,
|
|
"colorRange", colorRange,
|
|
"colorSpace", colorSpace,
|
|
"colorTrc", colorTrc,
|
|
"frameRate", frameRate,
|
|
"key", key,
|
|
"height", height,
|
|
"level", level,
|
|
"original", original,
|
|
"hasScalingMatrix", hasScalingMatrix,
|
|
"profile", profile,
|
|
"scanType", scanType,
|
|
"embeddedInVideo", embeddedInVideo,
|
|
"refFrames", refFrames,
|
|
"width", width,
|
|
"displayTitle", displayTitle,
|
|
"extendedDisplayTitle", extendedDisplayTitle,
|
|
"selected", selected,
|
|
"forced", forced,
|
|
"channels", channels,
|
|
"audioChannelLayout", audioChannelLayout,
|
|
"samplingRate", samplingRate,
|
|
"canAutoSync", canAutoSync,
|
|
"hearingImpaired", hearingImpaired,
|
|
"dub", dub,
|
|
"title", title);
|
|
}
|
|
|
|
public final static class Builder {
|
|
|
|
private Long id;
|
|
|
|
private StreamType streamType;
|
|
|
|
private Optional<String> format = Optional.empty();
|
|
|
|
private Optional<Boolean> default_ = Optional.empty();
|
|
|
|
private String codec;
|
|
|
|
private Optional<Integer> index = Optional.empty();
|
|
|
|
private Optional<Integer> bitrate = Optional.empty();
|
|
|
|
private Optional<String> language = Optional.empty();
|
|
|
|
private Optional<String> languageTag = Optional.empty();
|
|
|
|
private Optional<String> languageCode = Optional.empty();
|
|
|
|
private Optional<Boolean> headerCompression = Optional.empty();
|
|
|
|
private Optional<Integer> doviblCompatID = Optional.empty();
|
|
|
|
private Optional<Boolean> doviblPresent = Optional.empty();
|
|
|
|
private Optional<Boolean> dovielPresent = Optional.empty();
|
|
|
|
private Optional<Integer> doviLevel = Optional.empty();
|
|
|
|
private Optional<Boolean> doviPresent = Optional.empty();
|
|
|
|
private Optional<Integer> doviProfile = Optional.empty();
|
|
|
|
private Optional<Boolean> dovirpuPresent = Optional.empty();
|
|
|
|
private Optional<String> doviVersion = Optional.empty();
|
|
|
|
private Optional<Integer> bitDepth = Optional.empty();
|
|
|
|
private Optional<String> chromaLocation = Optional.empty();
|
|
|
|
private Optional<String> chromaSubsampling = Optional.empty();
|
|
|
|
private Optional<Integer> codedHeight = Optional.empty();
|
|
|
|
private Optional<Integer> codedWidth = Optional.empty();
|
|
|
|
private Optional<Boolean> closedCaptions = Optional.empty();
|
|
|
|
private Optional<String> colorPrimaries = Optional.empty();
|
|
|
|
private Optional<String> colorRange = Optional.empty();
|
|
|
|
private Optional<String> colorSpace = Optional.empty();
|
|
|
|
private Optional<String> colorTrc = Optional.empty();
|
|
|
|
private Optional<Float> frameRate = Optional.empty();
|
|
|
|
private Optional<String> key = Optional.empty();
|
|
|
|
private Optional<Integer> height = Optional.empty();
|
|
|
|
private Optional<Integer> level = Optional.empty();
|
|
|
|
private Optional<Boolean> original = Optional.empty();
|
|
|
|
private Optional<Boolean> hasScalingMatrix = Optional.empty();
|
|
|
|
private Optional<String> profile = Optional.empty();
|
|
|
|
private Optional<String> scanType = Optional.empty();
|
|
|
|
private Optional<String> embeddedInVideo = Optional.empty();
|
|
|
|
private Optional<Integer> refFrames = Optional.empty();
|
|
|
|
private Optional<Integer> width = Optional.empty();
|
|
|
|
private String displayTitle;
|
|
|
|
private String extendedDisplayTitle;
|
|
|
|
private Optional<Boolean> selected = Optional.empty();
|
|
|
|
private Optional<Boolean> forced = Optional.empty();
|
|
|
|
private Optional<Integer> channels = Optional.empty();
|
|
|
|
private Optional<String> audioChannelLayout = Optional.empty();
|
|
|
|
private Optional<Integer> samplingRate = Optional.empty();
|
|
|
|
private Optional<Boolean> canAutoSync = Optional.empty();
|
|
|
|
private Optional<Boolean> hearingImpaired = Optional.empty();
|
|
|
|
private Optional<Boolean> dub = Optional.empty();
|
|
|
|
private Optional<String> title = Optional.empty();
|
|
|
|
private Builder() {
|
|
// force use of static builder() method
|
|
}
|
|
|
|
/**
|
|
* Unique stream identifier.
|
|
*/
|
|
public Builder id(long id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Stream type:
|
|
* - 1 = video
|
|
* - 2 = audio
|
|
* - 3 = subtitle
|
|
*/
|
|
public Builder streamType(StreamType streamType) {
|
|
Utils.checkNotNull(streamType, "streamType");
|
|
this.streamType = streamType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
public Builder format(String format) {
|
|
Utils.checkNotNull(format, "format");
|
|
this.format = Optional.ofNullable(format);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Format of the stream (e.g., srt).
|
|
*/
|
|
public Builder format(Optional<String> format) {
|
|
Utils.checkNotNull(format, "format");
|
|
this.format = format;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
public Builder default_(boolean default_) {
|
|
Utils.checkNotNull(default_, "default_");
|
|
this.default_ = Optional.ofNullable(default_);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is default.
|
|
*/
|
|
public Builder default_(Optional<Boolean> default_) {
|
|
Utils.checkNotNull(default_, "default_");
|
|
this.default_ = default_;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Codec used by the stream.
|
|
*/
|
|
public Builder codec(String codec) {
|
|
Utils.checkNotNull(codec, "codec");
|
|
this.codec = codec;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
public Builder index(int index) {
|
|
Utils.checkNotNull(index, "index");
|
|
this.index = Optional.ofNullable(index);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Index of the stream.
|
|
*/
|
|
public Builder index(Optional<Integer> index) {
|
|
Utils.checkNotNull(index, "index");
|
|
this.index = index;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
public Builder bitrate(int bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = Optional.ofNullable(bitrate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bitrate of the stream.
|
|
*/
|
|
public Builder bitrate(Optional<Integer> bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = bitrate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
public Builder language(String language) {
|
|
Utils.checkNotNull(language, "language");
|
|
this.language = Optional.ofNullable(language);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language of the stream.
|
|
*/
|
|
public Builder language(Optional<String> language) {
|
|
Utils.checkNotNull(language, "language");
|
|
this.language = language;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
public Builder languageTag(String languageTag) {
|
|
Utils.checkNotNull(languageTag, "languageTag");
|
|
this.languageTag = Optional.ofNullable(languageTag);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Language tag (e.g., en).
|
|
*/
|
|
public Builder languageTag(Optional<String> languageTag) {
|
|
Utils.checkNotNull(languageTag, "languageTag");
|
|
this.languageTag = languageTag;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
public Builder languageCode(String languageCode) {
|
|
Utils.checkNotNull(languageCode, "languageCode");
|
|
this.languageCode = Optional.ofNullable(languageCode);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* ISO language code.
|
|
*/
|
|
public Builder languageCode(Optional<String> languageCode) {
|
|
Utils.checkNotNull(languageCode, "languageCode");
|
|
this.languageCode = languageCode;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
public Builder headerCompression(boolean headerCompression) {
|
|
Utils.checkNotNull(headerCompression, "headerCompression");
|
|
this.headerCompression = Optional.ofNullable(headerCompression);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates whether header compression is enabled.
|
|
*/
|
|
public Builder headerCompression(Optional<Boolean> headerCompression) {
|
|
Utils.checkNotNull(headerCompression, "headerCompression");
|
|
this.headerCompression = headerCompression;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
public Builder doviblCompatID(int doviblCompatID) {
|
|
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
|
|
this.doviblCompatID = Optional.ofNullable(doviblCompatID);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision BL compatibility ID.
|
|
*/
|
|
public Builder doviblCompatID(Optional<Integer> doviblCompatID) {
|
|
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
|
|
this.doviblCompatID = doviblCompatID;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
public Builder doviblPresent(boolean doviblPresent) {
|
|
Utils.checkNotNull(doviblPresent, "doviblPresent");
|
|
this.doviblPresent = Optional.ofNullable(doviblPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision BL is present.
|
|
*/
|
|
public Builder doviblPresent(Optional<Boolean> doviblPresent) {
|
|
Utils.checkNotNull(doviblPresent, "doviblPresent");
|
|
this.doviblPresent = doviblPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
public Builder dovielPresent(boolean dovielPresent) {
|
|
Utils.checkNotNull(dovielPresent, "dovielPresent");
|
|
this.dovielPresent = Optional.ofNullable(dovielPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision EL is present.
|
|
*/
|
|
public Builder dovielPresent(Optional<Boolean> dovielPresent) {
|
|
Utils.checkNotNull(dovielPresent, "dovielPresent");
|
|
this.dovielPresent = dovielPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
public Builder doviLevel(int doviLevel) {
|
|
Utils.checkNotNull(doviLevel, "doviLevel");
|
|
this.doviLevel = Optional.ofNullable(doviLevel);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision level.
|
|
*/
|
|
public Builder doviLevel(Optional<Integer> doviLevel) {
|
|
Utils.checkNotNull(doviLevel, "doviLevel");
|
|
this.doviLevel = doviLevel;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
public Builder doviPresent(boolean doviPresent) {
|
|
Utils.checkNotNull(doviPresent, "doviPresent");
|
|
this.doviPresent = Optional.ofNullable(doviPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision is present.
|
|
*/
|
|
public Builder doviPresent(Optional<Boolean> doviPresent) {
|
|
Utils.checkNotNull(doviPresent, "doviPresent");
|
|
this.doviPresent = doviPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
public Builder doviProfile(int doviProfile) {
|
|
Utils.checkNotNull(doviProfile, "doviProfile");
|
|
this.doviProfile = Optional.ofNullable(doviProfile);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision profile.
|
|
*/
|
|
public Builder doviProfile(Optional<Integer> doviProfile) {
|
|
Utils.checkNotNull(doviProfile, "doviProfile");
|
|
this.doviProfile = doviProfile;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
public Builder dovirpuPresent(boolean dovirpuPresent) {
|
|
Utils.checkNotNull(dovirpuPresent, "dovirpuPresent");
|
|
this.dovirpuPresent = Optional.ofNullable(dovirpuPresent);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if Dolby Vision RPU is present.
|
|
*/
|
|
public Builder dovirpuPresent(Optional<Boolean> dovirpuPresent) {
|
|
Utils.checkNotNull(dovirpuPresent, "dovirpuPresent");
|
|
this.dovirpuPresent = dovirpuPresent;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
public Builder doviVersion(String doviVersion) {
|
|
Utils.checkNotNull(doviVersion, "doviVersion");
|
|
this.doviVersion = Optional.ofNullable(doviVersion);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Dolby Vision version.
|
|
*/
|
|
public Builder doviVersion(Optional<String> doviVersion) {
|
|
Utils.checkNotNull(doviVersion, "doviVersion");
|
|
this.doviVersion = doviVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
public Builder bitDepth(int bitDepth) {
|
|
Utils.checkNotNull(bitDepth, "bitDepth");
|
|
this.bitDepth = Optional.ofNullable(bitDepth);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Bit depth of the video stream.
|
|
*/
|
|
public Builder bitDepth(Optional<Integer> bitDepth) {
|
|
Utils.checkNotNull(bitDepth, "bitDepth");
|
|
this.bitDepth = bitDepth;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
public Builder chromaLocation(String chromaLocation) {
|
|
Utils.checkNotNull(chromaLocation, "chromaLocation");
|
|
this.chromaLocation = Optional.ofNullable(chromaLocation);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma sample location.
|
|
*/
|
|
public Builder chromaLocation(Optional<String> chromaLocation) {
|
|
Utils.checkNotNull(chromaLocation, "chromaLocation");
|
|
this.chromaLocation = chromaLocation;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
public Builder chromaSubsampling(String chromaSubsampling) {
|
|
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
|
|
this.chromaSubsampling = Optional.ofNullable(chromaSubsampling);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Chroma subsampling format.
|
|
*/
|
|
public Builder chromaSubsampling(Optional<String> chromaSubsampling) {
|
|
Utils.checkNotNull(chromaSubsampling, "chromaSubsampling");
|
|
this.chromaSubsampling = chromaSubsampling;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
public Builder codedHeight(int codedHeight) {
|
|
Utils.checkNotNull(codedHeight, "codedHeight");
|
|
this.codedHeight = Optional.ofNullable(codedHeight);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video height.
|
|
*/
|
|
public Builder codedHeight(Optional<Integer> codedHeight) {
|
|
Utils.checkNotNull(codedHeight, "codedHeight");
|
|
this.codedHeight = codedHeight;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
public Builder codedWidth(int codedWidth) {
|
|
Utils.checkNotNull(codedWidth, "codedWidth");
|
|
this.codedWidth = Optional.ofNullable(codedWidth);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Coded video width.
|
|
*/
|
|
public Builder codedWidth(Optional<Integer> codedWidth) {
|
|
Utils.checkNotNull(codedWidth, "codedWidth");
|
|
this.codedWidth = codedWidth;
|
|
return this;
|
|
}
|
|
|
|
public Builder closedCaptions(boolean closedCaptions) {
|
|
Utils.checkNotNull(closedCaptions, "closedCaptions");
|
|
this.closedCaptions = Optional.ofNullable(closedCaptions);
|
|
return this;
|
|
}
|
|
|
|
public Builder closedCaptions(Optional<Boolean> closedCaptions) {
|
|
Utils.checkNotNull(closedCaptions, "closedCaptions");
|
|
this.closedCaptions = closedCaptions;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
public Builder colorPrimaries(String colorPrimaries) {
|
|
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
|
|
this.colorPrimaries = Optional.ofNullable(colorPrimaries);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color primaries used.
|
|
*/
|
|
public Builder colorPrimaries(Optional<String> colorPrimaries) {
|
|
Utils.checkNotNull(colorPrimaries, "colorPrimaries");
|
|
this.colorPrimaries = colorPrimaries;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
public Builder colorRange(String colorRange) {
|
|
Utils.checkNotNull(colorRange, "colorRange");
|
|
this.colorRange = Optional.ofNullable(colorRange);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color range (e.g., tv).
|
|
*/
|
|
public Builder colorRange(Optional<String> colorRange) {
|
|
Utils.checkNotNull(colorRange, "colorRange");
|
|
this.colorRange = colorRange;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
public Builder colorSpace(String colorSpace) {
|
|
Utils.checkNotNull(colorSpace, "colorSpace");
|
|
this.colorSpace = Optional.ofNullable(colorSpace);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color space.
|
|
*/
|
|
public Builder colorSpace(Optional<String> colorSpace) {
|
|
Utils.checkNotNull(colorSpace, "colorSpace");
|
|
this.colorSpace = colorSpace;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
public Builder colorTrc(String colorTrc) {
|
|
Utils.checkNotNull(colorTrc, "colorTrc");
|
|
this.colorTrc = Optional.ofNullable(colorTrc);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Color transfer characteristics.
|
|
*/
|
|
public Builder colorTrc(Optional<String> colorTrc) {
|
|
Utils.checkNotNull(colorTrc, "colorTrc");
|
|
this.colorTrc = colorTrc;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
public Builder frameRate(float frameRate) {
|
|
Utils.checkNotNull(frameRate, "frameRate");
|
|
this.frameRate = Optional.ofNullable(frameRate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Frame rate of the stream.
|
|
*/
|
|
public Builder frameRate(Optional<Float> frameRate) {
|
|
Utils.checkNotNull(frameRate, "frameRate");
|
|
this.frameRate = frameRate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
public Builder key(String key) {
|
|
Utils.checkNotNull(key, "key");
|
|
this.key = Optional.ofNullable(key);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Key to access this stream part.
|
|
*/
|
|
public Builder key(Optional<String> key) {
|
|
Utils.checkNotNull(key, "key");
|
|
this.key = key;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
public Builder height(int height) {
|
|
Utils.checkNotNull(height, "height");
|
|
this.height = Optional.ofNullable(height);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Height of the video stream.
|
|
*/
|
|
public Builder height(Optional<Integer> height) {
|
|
Utils.checkNotNull(height, "height");
|
|
this.height = height;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
public Builder level(int level) {
|
|
Utils.checkNotNull(level, "level");
|
|
this.level = Optional.ofNullable(level);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video level.
|
|
*/
|
|
public Builder level(Optional<Integer> level) {
|
|
Utils.checkNotNull(level, "level");
|
|
this.level = level;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
public Builder original(boolean original) {
|
|
Utils.checkNotNull(original, "original");
|
|
this.original = Optional.ofNullable(original);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this is the original stream.
|
|
*/
|
|
public Builder original(Optional<Boolean> original) {
|
|
Utils.checkNotNull(original, "original");
|
|
this.original = original;
|
|
return this;
|
|
}
|
|
|
|
public Builder hasScalingMatrix(boolean hasScalingMatrix) {
|
|
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
|
|
this.hasScalingMatrix = Optional.ofNullable(hasScalingMatrix);
|
|
return this;
|
|
}
|
|
|
|
public Builder hasScalingMatrix(Optional<Boolean> hasScalingMatrix) {
|
|
Utils.checkNotNull(hasScalingMatrix, "hasScalingMatrix");
|
|
this.hasScalingMatrix = hasScalingMatrix;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
public Builder profile(String profile) {
|
|
Utils.checkNotNull(profile, "profile");
|
|
this.profile = Optional.ofNullable(profile);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Video profile.
|
|
*/
|
|
public Builder profile(Optional<String> profile) {
|
|
Utils.checkNotNull(profile, "profile");
|
|
this.profile = profile;
|
|
return this;
|
|
}
|
|
|
|
public Builder scanType(String scanType) {
|
|
Utils.checkNotNull(scanType, "scanType");
|
|
this.scanType = Optional.ofNullable(scanType);
|
|
return this;
|
|
}
|
|
|
|
public Builder scanType(Optional<String> scanType) {
|
|
Utils.checkNotNull(scanType, "scanType");
|
|
this.scanType = scanType;
|
|
return this;
|
|
}
|
|
|
|
public Builder embeddedInVideo(String embeddedInVideo) {
|
|
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
|
|
this.embeddedInVideo = Optional.ofNullable(embeddedInVideo);
|
|
return this;
|
|
}
|
|
|
|
public Builder embeddedInVideo(Optional<String> embeddedInVideo) {
|
|
Utils.checkNotNull(embeddedInVideo, "embeddedInVideo");
|
|
this.embeddedInVideo = embeddedInVideo;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
public Builder refFrames(int refFrames) {
|
|
Utils.checkNotNull(refFrames, "refFrames");
|
|
this.refFrames = Optional.ofNullable(refFrames);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of reference frames.
|
|
*/
|
|
public Builder refFrames(Optional<Integer> refFrames) {
|
|
Utils.checkNotNull(refFrames, "refFrames");
|
|
this.refFrames = refFrames;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
public Builder width(int width) {
|
|
Utils.checkNotNull(width, "width");
|
|
this.width = Optional.ofNullable(width);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Width of the video stream.
|
|
*/
|
|
public Builder width(Optional<Integer> width) {
|
|
Utils.checkNotNull(width, "width");
|
|
this.width = width;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Display title for the stream.
|
|
*/
|
|
public Builder displayTitle(String displayTitle) {
|
|
Utils.checkNotNull(displayTitle, "displayTitle");
|
|
this.displayTitle = displayTitle;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Extended display title for the stream.
|
|
*/
|
|
public Builder extendedDisplayTitle(String extendedDisplayTitle) {
|
|
Utils.checkNotNull(extendedDisplayTitle, "extendedDisplayTitle");
|
|
this.extendedDisplayTitle = extendedDisplayTitle;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
public Builder selected(boolean selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = Optional.ofNullable(selected);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if this stream is selected (applicable for audio streams).
|
|
*/
|
|
public Builder selected(Optional<Boolean> selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = selected;
|
|
return this;
|
|
}
|
|
|
|
public Builder forced(boolean forced) {
|
|
Utils.checkNotNull(forced, "forced");
|
|
this.forced = Optional.ofNullable(forced);
|
|
return this;
|
|
}
|
|
|
|
public Builder forced(Optional<Boolean> forced) {
|
|
Utils.checkNotNull(forced, "forced");
|
|
this.forced = forced;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
public Builder channels(int channels) {
|
|
Utils.checkNotNull(channels, "channels");
|
|
this.channels = Optional.ofNullable(channels);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Number of audio channels (for audio streams).
|
|
*/
|
|
public Builder channels(Optional<Integer> channels) {
|
|
Utils.checkNotNull(channels, "channels");
|
|
this.channels = channels;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
public Builder audioChannelLayout(String audioChannelLayout) {
|
|
Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
|
|
this.audioChannelLayout = Optional.ofNullable(audioChannelLayout);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Audio channel layout.
|
|
*/
|
|
public Builder audioChannelLayout(Optional<String> audioChannelLayout) {
|
|
Utils.checkNotNull(audioChannelLayout, "audioChannelLayout");
|
|
this.audioChannelLayout = audioChannelLayout;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
public Builder samplingRate(int samplingRate) {
|
|
Utils.checkNotNull(samplingRate, "samplingRate");
|
|
this.samplingRate = Optional.ofNullable(samplingRate);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sampling rate for the audio stream.
|
|
*/
|
|
public Builder samplingRate(Optional<Integer> samplingRate) {
|
|
Utils.checkNotNull(samplingRate, "samplingRate");
|
|
this.samplingRate = samplingRate;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
public Builder canAutoSync(boolean canAutoSync) {
|
|
Utils.checkNotNull(canAutoSync, "canAutoSync");
|
|
this.canAutoSync = Optional.ofNullable(canAutoSync);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream can auto-sync.
|
|
*/
|
|
public Builder canAutoSync(Optional<Boolean> canAutoSync) {
|
|
Utils.checkNotNull(canAutoSync, "canAutoSync");
|
|
this.canAutoSync = canAutoSync;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
public Builder hearingImpaired(boolean hearingImpaired) {
|
|
Utils.checkNotNull(hearingImpaired, "hearingImpaired");
|
|
this.hearingImpaired = Optional.ofNullable(hearingImpaired);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is for the hearing impaired.
|
|
*/
|
|
public Builder hearingImpaired(Optional<Boolean> hearingImpaired) {
|
|
Utils.checkNotNull(hearingImpaired, "hearingImpaired");
|
|
this.hearingImpaired = hearingImpaired;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
public Builder dub(boolean dub) {
|
|
Utils.checkNotNull(dub, "dub");
|
|
this.dub = Optional.ofNullable(dub);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Indicates if the stream is a dub.
|
|
*/
|
|
public Builder dub(Optional<Boolean> dub) {
|
|
Utils.checkNotNull(dub, "dub");
|
|
this.dub = dub;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
public Builder title(String title) {
|
|
Utils.checkNotNull(title, "title");
|
|
this.title = Optional.ofNullable(title);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Optional title for the stream (e.g., language variant).
|
|
*/
|
|
public Builder title(Optional<String> title) {
|
|
Utils.checkNotNull(title, "title");
|
|
this.title = title;
|
|
return this;
|
|
}
|
|
|
|
public Stream build() {
|
|
return new Stream(
|
|
id,
|
|
streamType,
|
|
format,
|
|
default_,
|
|
codec,
|
|
index,
|
|
bitrate,
|
|
language,
|
|
languageTag,
|
|
languageCode,
|
|
headerCompression,
|
|
doviblCompatID,
|
|
doviblPresent,
|
|
dovielPresent,
|
|
doviLevel,
|
|
doviPresent,
|
|
doviProfile,
|
|
dovirpuPresent,
|
|
doviVersion,
|
|
bitDepth,
|
|
chromaLocation,
|
|
chromaSubsampling,
|
|
codedHeight,
|
|
codedWidth,
|
|
closedCaptions,
|
|
colorPrimaries,
|
|
colorRange,
|
|
colorSpace,
|
|
colorTrc,
|
|
frameRate,
|
|
key,
|
|
height,
|
|
level,
|
|
original,
|
|
hasScalingMatrix,
|
|
profile,
|
|
scanType,
|
|
embeddedInVideo,
|
|
refFrames,
|
|
width,
|
|
displayTitle,
|
|
extendedDisplayTitle,
|
|
selected,
|
|
forced,
|
|
channels,
|
|
audioChannelLayout,
|
|
samplingRate,
|
|
canAutoSync,
|
|
hearingImpaired,
|
|
dub,
|
|
title);
|
|
}
|
|
}
|
|
}
|