Class KinesisVideoFrame
- java.lang.Object
-
- com.amazonaws.kinesisvideo.producer.KinesisVideoFrame
-
@Immutable @ThreadSafe public class KinesisVideoFrame extends Object
Kinesis Video frame representation.NOTE: This class must match the Frame declaration in native code in /mkvgen/Include.h
- See Also:
- PIC's MKVGEN
-
-
Field Summary
Fields Modifier and Type Field Description static intFRAME_CURRENT_VERSIONCurrent version for the structure as defined in the native codestatic intFRAME_VERSION_ZERO
-
Constructor Summary
Constructors Constructor Description KinesisVideoFrame(int index, int flags, long decodingTs, long presentationTs, long duration, ByteBuffer data)Creates a Kinesis Video Frame V0 with trackId = 1.KinesisVideoFrame(int index, int flags, long decodingTs, long presentationTs, long duration, ByteBuffer data, long trackId)Creates a V0 struct version of a KinesisVideoFrame.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffergetData()Native code will access this buffer viaGetDirectBufferAddress().longgetDecodingTs()longgetDuration()intgetFlags()intgetIndex()longgetPresentationTs()intgetSize()longgetTrackId()intgetVersion()StringtoString()
-
-
-
Field Detail
-
FRAME_CURRENT_VERSION
public static final int FRAME_CURRENT_VERSION
Current version for the structure as defined in the native code- See Also:
- Constant Field Values
-
FRAME_VERSION_ZERO
public static final int FRAME_VERSION_ZERO
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KinesisVideoFrame
public KinesisVideoFrame(int index, int flags, long decodingTs, long presentationTs, long duration, @Nonnull ByteBuffer data, long trackId)Creates a V0 struct version of a KinesisVideoFrame. Submit these frames to a Stream usingKinesisVideoProducerStream.putFrame(KinesisVideoFrame)- Parameters:
index- ID for this frame.flags- Flags associated with this frame. They should be bitwise OR'ed together when specifying more than 1. SeeFrameFlags.decodingTs- DTS of this frame in hundreds of nanosecond units. Should be monotonically increasing.presentationTs- PTS of this frame in hundreds of nanosecond units. Should be monotonically increasing.duration- Duration of this frame in hundreds of nanosecond units. Can be 0.data- The frame contents.trackId- The track number this frame belongs to.- Throws:
OutOfMemoryError- if not enough memory to create a copy of the data.
-
KinesisVideoFrame
public KinesisVideoFrame(int index, int flags, long decodingTs, long presentationTs, long duration, @Nonnull ByteBuffer data)Creates a Kinesis Video Frame V0 with trackId = 1. SeeKinesisVideoFrame(int, int, long, long, long, ByteBuffer, long)
-
-
Method Detail
-
getIndex
@CalledByNativeCode public int getIndex()
-
getFlags
@CalledByNativeCode public int getFlags()
-
getDecodingTs
@CalledByNativeCode public long getDecodingTs()
-
getPresentationTs
@CalledByNativeCode public long getPresentationTs()
-
getDuration
@CalledByNativeCode public long getDuration()
-
getSize
@CalledByNativeCode public int getSize()
-
getData
@Nonnull @CalledByNativeCode public ByteBuffer getData()
Native code will access this buffer viaGetDirectBufferAddress(). SeesetFramein the JNI.- Returns:
- a read-only ByteBuffer containing this frame's data.
-
getTrackId
@CalledByNativeCode public long getTrackId()
-
getVersion
@CalledByNativeCode public int getVersion()
-
-