com.amazonaws.kinesisvideo.parser.utilities.MkvTrackMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amazon-kinesis-video-streams-parser-library Show documentation
Show all versions of amazon-kinesis-video-streams-parser-library Show documentation
The Amazon Kinesis Video Streams Parser Library for Java enables Java developers to parse the streams
returned by GetMedia calls to Amazon Kinesis Video.
// Generated by delombok at Fri Jan 14 22:03:52 UTC 2022
/*
Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
*/
package com.amazonaws.kinesisvideo.parser.utilities;
import com.amazonaws.kinesisvideo.parser.mkv.MkvElement;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Optional;
/**
* Class that captures the meta-data for a particular track in the mkv response.
*/
public class MkvTrackMetadata {
private BigInteger trackNumber;
private Optional trackUID;
private String trackName;
private String codecId;
private String codecName;
private ByteBuffer codecPrivateData;
// Video track specific
private Optional pixelWidth;
private Optional pixelHeight;
// Audio track specific
private Optional samplingFrequency;
private Optional channels;
private Optional bitDepth;
private List allElementsInTrack;
@SuppressWarnings("all")
private static Optional $default$trackUID() {
return Optional.empty();
}
@SuppressWarnings("all")
private static String $default$trackName() {
return "";
}
@SuppressWarnings("all")
private static String $default$codecId() {
return "";
}
@SuppressWarnings("all")
private static String $default$codecName() {
return "";
}
@SuppressWarnings("all")
private static Optional $default$pixelWidth() {
return Optional.empty();
}
@SuppressWarnings("all")
private static Optional $default$pixelHeight() {
return Optional.empty();
}
@SuppressWarnings("all")
private static Optional $default$samplingFrequency() {
return Optional.empty();
}
@SuppressWarnings("all")
private static Optional $default$channels() {
return Optional.empty();
}
@SuppressWarnings("all")
private static Optional $default$bitDepth() {
return Optional.empty();
}
@SuppressWarnings("all")
public static class MkvTrackMetadataBuilder {
@SuppressWarnings("all")
private BigInteger trackNumber;
@SuppressWarnings("all")
private boolean trackUID$set;
@SuppressWarnings("all")
private Optional trackUID$value;
@SuppressWarnings("all")
private boolean trackName$set;
@SuppressWarnings("all")
private String trackName$value;
@SuppressWarnings("all")
private boolean codecId$set;
@SuppressWarnings("all")
private String codecId$value;
@SuppressWarnings("all")
private boolean codecName$set;
@SuppressWarnings("all")
private String codecName$value;
@SuppressWarnings("all")
private ByteBuffer codecPrivateData;
@SuppressWarnings("all")
private boolean pixelWidth$set;
@SuppressWarnings("all")
private Optional pixelWidth$value;
@SuppressWarnings("all")
private boolean pixelHeight$set;
@SuppressWarnings("all")
private Optional pixelHeight$value;
@SuppressWarnings("all")
private boolean samplingFrequency$set;
@SuppressWarnings("all")
private Optional samplingFrequency$value;
@SuppressWarnings("all")
private boolean channels$set;
@SuppressWarnings("all")
private Optional channels$value;
@SuppressWarnings("all")
private boolean bitDepth$set;
@SuppressWarnings("all")
private Optional bitDepth$value;
@SuppressWarnings("all")
private List allElementsInTrack;
@SuppressWarnings("all")
MkvTrackMetadataBuilder() {
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder trackNumber(final BigInteger trackNumber) {
this.trackNumber = trackNumber;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder trackUID(final Optional trackUID) {
this.trackUID$value = trackUID;
trackUID$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder trackName(final String trackName) {
this.trackName$value = trackName;
trackName$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder codecId(final String codecId) {
this.codecId$value = codecId;
codecId$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder codecName(final String codecName) {
this.codecName$value = codecName;
codecName$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder codecPrivateData(final ByteBuffer codecPrivateData) {
this.codecPrivateData = codecPrivateData;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder pixelWidth(final Optional pixelWidth) {
this.pixelWidth$value = pixelWidth;
pixelWidth$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder pixelHeight(final Optional pixelHeight) {
this.pixelHeight$value = pixelHeight;
pixelHeight$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder samplingFrequency(final Optional samplingFrequency) {
this.samplingFrequency$value = samplingFrequency;
samplingFrequency$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder channels(final Optional channels) {
this.channels$value = channels;
channels$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder bitDepth(final Optional bitDepth) {
this.bitDepth$value = bitDepth;
bitDepth$set = true;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata.MkvTrackMetadataBuilder allElementsInTrack(final List allElementsInTrack) {
this.allElementsInTrack = allElementsInTrack;
return this;
}
@SuppressWarnings("all")
public MkvTrackMetadata build() {
Optional trackUID$value = this.trackUID$value;
if (!this.trackUID$set) trackUID$value = MkvTrackMetadata.$default$trackUID();
String trackName$value = this.trackName$value;
if (!this.trackName$set) trackName$value = MkvTrackMetadata.$default$trackName();
String codecId$value = this.codecId$value;
if (!this.codecId$set) codecId$value = MkvTrackMetadata.$default$codecId();
String codecName$value = this.codecName$value;
if (!this.codecName$set) codecName$value = MkvTrackMetadata.$default$codecName();
Optional pixelWidth$value = this.pixelWidth$value;
if (!this.pixelWidth$set) pixelWidth$value = MkvTrackMetadata.$default$pixelWidth();
Optional pixelHeight$value = this.pixelHeight$value;
if (!this.pixelHeight$set) pixelHeight$value = MkvTrackMetadata.$default$pixelHeight();
Optional samplingFrequency$value = this.samplingFrequency$value;
if (!this.samplingFrequency$set) samplingFrequency$value = MkvTrackMetadata.$default$samplingFrequency();
Optional channels$value = this.channels$value;
if (!this.channels$set) channels$value = MkvTrackMetadata.$default$channels();
Optional bitDepth$value = this.bitDepth$value;
if (!this.bitDepth$set) bitDepth$value = MkvTrackMetadata.$default$bitDepth();
return new MkvTrackMetadata(this.trackNumber, trackUID$value, trackName$value, codecId$value, codecName$value, this.codecPrivateData, pixelWidth$value, pixelHeight$value, samplingFrequency$value, channels$value, bitDepth$value, this.allElementsInTrack);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "MkvTrackMetadata.MkvTrackMetadataBuilder(trackNumber=" + this.trackNumber + ", trackUID$value=" + this.trackUID$value + ", trackName$value=" + this.trackName$value + ", codecId$value=" + this.codecId$value + ", codecName$value=" + this.codecName$value + ", codecPrivateData=" + this.codecPrivateData + ", pixelWidth$value=" + this.pixelWidth$value + ", pixelHeight$value=" + this.pixelHeight$value + ", samplingFrequency$value=" + this.samplingFrequency$value + ", channels$value=" + this.channels$value + ", bitDepth$value=" + this.bitDepth$value + ", allElementsInTrack=" + this.allElementsInTrack + ")";
}
}
@SuppressWarnings("all")
public static MkvTrackMetadata.MkvTrackMetadataBuilder builder() {
return new MkvTrackMetadata.MkvTrackMetadataBuilder();
}
@SuppressWarnings("all")
private MkvTrackMetadata(final BigInteger trackNumber, final Optional trackUID, final String trackName, final String codecId, final String codecName, final ByteBuffer codecPrivateData, final Optional pixelWidth, final Optional pixelHeight, final Optional samplingFrequency, final Optional channels, final Optional bitDepth, final List allElementsInTrack) {
this.trackNumber = trackNumber;
this.trackUID = trackUID;
this.trackName = trackName;
this.codecId = codecId;
this.codecName = codecName;
this.codecPrivateData = codecPrivateData;
this.pixelWidth = pixelWidth;
this.pixelHeight = pixelHeight;
this.samplingFrequency = samplingFrequency;
this.channels = channels;
this.bitDepth = bitDepth;
this.allElementsInTrack = allElementsInTrack;
}
@SuppressWarnings("all")
public BigInteger getTrackNumber() {
return this.trackNumber;
}
@SuppressWarnings("all")
public Optional getTrackUID() {
return this.trackUID;
}
@SuppressWarnings("all")
public String getTrackName() {
return this.trackName;
}
@SuppressWarnings("all")
public String getCodecId() {
return this.codecId;
}
@SuppressWarnings("all")
public String getCodecName() {
return this.codecName;
}
@SuppressWarnings("all")
public ByteBuffer getCodecPrivateData() {
return this.codecPrivateData;
}
@SuppressWarnings("all")
public Optional getPixelWidth() {
return this.pixelWidth;
}
@SuppressWarnings("all")
public Optional getPixelHeight() {
return this.pixelHeight;
}
@SuppressWarnings("all")
public Optional getSamplingFrequency() {
return this.samplingFrequency;
}
@SuppressWarnings("all")
public Optional getChannels() {
return this.channels;
}
@SuppressWarnings("all")
public Optional getBitDepth() {
return this.bitDepth;
}
@SuppressWarnings("all")
public List getAllElementsInTrack() {
return this.allElementsInTrack;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "MkvTrackMetadata(trackNumber=" + this.getTrackNumber() + ", trackUID=" + this.getTrackUID() + ", trackName=" + this.getTrackName() + ", codecId=" + this.getCodecId() + ", codecName=" + this.getCodecName() + ", pixelWidth=" + this.getPixelWidth() + ", pixelHeight=" + this.getPixelHeight() + ", samplingFrequency=" + this.getSamplingFrequency() + ", channels=" + this.getChannels() + ", bitDepth=" + this.getBitDepth() + ")";
}
}