Class FrameCode
It describes common frame characteristics (even across multiple streams).
Note: in NUT specification there is no such class. The name comes from ffmpeg NUT implementation.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe less significant part of the size of the following frame.final intIfFrameCode.Flag.SIZE_MSBis set then data_size_msb which is stored after the frame code is multiplied with it and forms the more significant part of the size of the following frame.final longThe index into the elision_header table.final Set<FrameCode.Flag> static final FrameCodefinal longThis is the time difference in stream timebase units from the pts at which the output from the decoder has converged independent from the availability of previous frames (that is the frames are virtually identical no matter if decoding started from the very first frame or from this keyframe).final longIfFrameCode.Flag.CODED_PTSis set in the flags of the current frame then this value MUST be ignored.final longNumber of reserved bytes in NUT frame.final intIfFrameCode.Flag.STREAM_IDis not set then this is the stream number for the frame following this frame_code. -
Constructor Summary
ConstructorsConstructorDescriptionFrameCode(Set<FrameCode.Flag> flags, int streamId, int dataSizeMul, int dataSizeLsb, long ptsDelta, long reservedCount, long matchTimeDelta, long elisionHeaderIdx) Creates FrameCode. -
Method Summary
-
Field Details
-
flags
-
streamId
public final int streamIdIfFrameCode.Flag.STREAM_IDis not set then this is the stream number for the frame following this frame_code.If
FrameCode.Flag.STREAM_IDis set then this value has no meaning. MUST be < 250. -
dataSizeMul
public final int dataSizeMulIfFrameCode.Flag.SIZE_MSBis set then data_size_msb which is stored after the frame code is multiplied with it and forms the more significant part of the size of the following frame.If
FrameCode.Flag.SIZE_MSBis not set then this field has no meaning. MUST be < 16384. -
dataSizeLsb
public final int dataSizeLsbThe less significant part of the size of the following frame. This added together with data_size_mul*data_size_msb is the size of the following frame. MUST be <16384. -
ptsDelta
public final long ptsDeltaIfFrameCode.Flag.CODED_PTSis set in the flags of the current frame then this value MUST be ignored.if
FrameCode.Flag.CODED_PTSis not set then pts_delta is the difference between the current pts and last_pts.MUST be <16384 and >-16384.
-
reservedCount
public final long reservedCountNumber of reserved bytes in NUT frame.MUST be <256.
-
matchTimeDelta
public final long matchTimeDeltaThis is the time difference in stream timebase units from the pts at which the output from the decoder has converged independent from the availability of previous frames (that is the frames are virtually identical no matter if decoding started from the very first frame or from this keyframe).If its value is 1-(1<<62) then match_time_delta is unspecified, that is the muxer lacked sufficient information to set it.
A muxer MUST only set it to 1-(1<<62) if it does not know the correct value. That is, it is not allowed to randomly discard known values.
If
FrameCode.Flag.MATCH_TIMEis not set then this value shall be used for match_time_delta, otherwise this value is ignored. MUST be <32768 and >-32768 or =1-(1<<62). -
elisionHeaderIdx
public final long elisionHeaderIdxThe index into the elision_header table. MUST be <128. -
INVALID
-
-
Constructor Details
-
FrameCode
public FrameCode(Set<FrameCode.Flag> flags, int streamId, int dataSizeMul, int dataSizeLsb, long ptsDelta, long reservedCount, long matchTimeDelta, long elisionHeaderIdx) Creates FrameCode.- Parameters:
flags- flagsstreamId- stream iddataSizeMul- data size multiplierdataSizeLsb- data size least significant byteptsDelta- difference between last & current PTSreservedCount- number of reserved bytesmatchTimeDelta- match time deltaelisionHeaderIdx- index into the elision_header table
-
-
Method Details