Class H264NalConsumingTrack
- java.lang.Object
-
- org.mp4parser.streaming.input.AbstractStreamingTrack
-
- org.mp4parser.streaming.input.h264.AbstractH264Track
-
- org.mp4parser.streaming.input.h264.H264NalConsumingTrack
-
- All Implemented Interfaces:
Closeable,AutoCloseable,StreamingTrack
- Direct Known Subclasses:
H264AnnexBTrack
public abstract class H264NalConsumingTrack extends AbstractH264Track
-
-
Field Summary
-
Fields inherited from class org.mp4parser.streaming.input.AbstractStreamingTrack
sampleSink, tkhd, trackExtensions
-
-
Constructor Summary
Constructors Constructor Description H264NalConsumingTrack()
-
Method Summary
Modifier and Type Method Description voidclose()voidconfigure()protected voidconsumeNal(ByteBuffer nal)protected org.mp4parser.streaming.input.h264.PictureOrderCountType0SampleExtensioncreatePictureOrderCountType0SampleExtension(SliceHeader sliceHeader)protected StreamingSamplecreateSample(List<ByteBuffer> nals, SliceHeader sliceHeader, H264NalUnitHeader nu)protected SampleFlagsSampleExtensioncreateSampleFlagsSampleExtension(H264NalUnitHeader nu, SliceHeader sliceHeader)StringgetHandler()StringgetLanguage()static H264NalUnitHeadergetNalUnitHeader(ByteBuffer nal)SampleDescriptionBoxgetSampleDescriptionBox()longgetTimescale()Gets the time scale of the track.protected voidhandlePPS(ByteBuffer nal)protected voidhandleSPS(ByteBuffer data)protected voidpushSample(StreamingSample ss, boolean all, boolean force)voidsetFrametick(int frametick)voidsetTimescale(int timescale)-
Methods inherited from class org.mp4parser.streaming.input.AbstractStreamingTrack
addTrackExtension, getTrackExtension, removeTrackExtension, setSampleSink
-
-
-
-
Method Detail
-
getNalUnitHeader
public static H264NalUnitHeader getNalUnitHeader(ByteBuffer nal)
-
consumeNal
protected void consumeNal(ByteBuffer nal) throws IOException
- Throws:
IOException
-
pushSample
protected void pushSample(StreamingSample ss, boolean all, boolean force) throws IOException
- Throws:
IOException
-
createSampleFlagsSampleExtension
protected SampleFlagsSampleExtension createSampleFlagsSampleExtension(H264NalUnitHeader nu, SliceHeader sliceHeader)
-
createPictureOrderCountType0SampleExtension
protected org.mp4parser.streaming.input.h264.PictureOrderCountType0SampleExtension createPictureOrderCountType0SampleExtension(SliceHeader sliceHeader)
-
createSample
protected StreamingSample createSample(List<ByteBuffer> nals, SliceHeader sliceHeader, H264NalUnitHeader nu) throws IOException
- Throws:
IOException
-
setFrametick
public void setFrametick(int frametick)
-
configure
public void configure()
-
getTimescale
public long getTimescale()
Description copied from interface:StreamingTrackGets the time scale of the track. Typically called by the SampleSink. Might throw IllegalStateException if called before the first sample has been pushed into the SampleSink.- Returns:
- the track's time scale
-
setTimescale
public void setTimescale(int timescale)
-
getSampleDescriptionBox
public SampleDescriptionBox getSampleDescriptionBox()
-
getHandler
public String getHandler()
-
getLanguage
public String getLanguage()
-
handlePPS
protected void handlePPS(ByteBuffer nal)
-
handleSPS
protected void handleSPS(ByteBuffer data)
-
close
public void close() throws IOException- Throws:
IOException
-
-