com.amazonaws.kinesisvideo.parser.examples.lambda.EncodedFrame 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 Thu Mar 10 20:43:17 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.examples.lambda;
import java.nio.ByteBuffer;
/**
* Container class for H264 encoded frame
*/
public class EncodedFrame {
private final ByteBuffer byteBuffer;
private final ByteBuffer cpd;
private final boolean isKeyFrame;
private long timeCode;
@SuppressWarnings("all")
EncodedFrame(final ByteBuffer byteBuffer, final ByteBuffer cpd, final boolean isKeyFrame, final long timeCode) {
this.byteBuffer = byteBuffer;
this.cpd = cpd;
this.isKeyFrame = isKeyFrame;
this.timeCode = timeCode;
}
@SuppressWarnings("all")
public static class EncodedFrameBuilder {
@SuppressWarnings("all")
private ByteBuffer byteBuffer;
@SuppressWarnings("all")
private ByteBuffer cpd;
@SuppressWarnings("all")
private boolean isKeyFrame;
@SuppressWarnings("all")
private long timeCode;
@SuppressWarnings("all")
EncodedFrameBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public EncodedFrame.EncodedFrameBuilder byteBuffer(final ByteBuffer byteBuffer) {
this.byteBuffer = byteBuffer;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public EncodedFrame.EncodedFrameBuilder cpd(final ByteBuffer cpd) {
this.cpd = cpd;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public EncodedFrame.EncodedFrameBuilder isKeyFrame(final boolean isKeyFrame) {
this.isKeyFrame = isKeyFrame;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public EncodedFrame.EncodedFrameBuilder timeCode(final long timeCode) {
this.timeCode = timeCode;
return this;
}
@SuppressWarnings("all")
public EncodedFrame build() {
return new EncodedFrame(this.byteBuffer, this.cpd, this.isKeyFrame, this.timeCode);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "EncodedFrame.EncodedFrameBuilder(byteBuffer=" + this.byteBuffer + ", cpd=" + this.cpd + ", isKeyFrame=" + this.isKeyFrame + ", timeCode=" + this.timeCode + ")";
}
}
@SuppressWarnings("all")
public static EncodedFrame.EncodedFrameBuilder builder() {
return new EncodedFrame.EncodedFrameBuilder();
}
@SuppressWarnings("all")
public ByteBuffer getByteBuffer() {
return this.byteBuffer;
}
@SuppressWarnings("all")
public ByteBuffer getCpd() {
return this.cpd;
}
@SuppressWarnings("all")
public boolean isKeyFrame() {
return this.isKeyFrame;
}
@SuppressWarnings("all")
public long getTimeCode() {
return this.timeCode;
}
@SuppressWarnings("all")
public void setTimeCode(final long timeCode) {
this.timeCode = timeCode;
}
}