Package com.zakgof.velvetvideo.impl
Class VelvetVideoLib.DemuxerImpl
java.lang.Object
com.zakgof.velvetvideo.impl.VelvetVideoLib.DemuxerImpl
- All Implemented Interfaces:
IDemuxer,java.lang.AutoCloseable,java.lang.Iterable<IDecodedPacket<?>>
- Enclosing class:
- VelvetVideoLib
public class VelvetVideoLib.DemuxerImpl extends java.lang.Object implements IDemuxer
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classVelvetVideoLib.DemuxerImpl.AbstractDecoderStream -
Constructor Summary
Constructors Constructor Description DemuxerImpl(ISeekableInput input) -
Method Summary
Modifier and Type Method Description IAudioDecoderStreamaudioStream(int index)java.util.List<? extends IAudioDecoderStream>audioStreams()voidclose()Closes the demuxer, container file or other handles and frees all the allocated resources.java.util.Iterator<IDecodedPacket<?>>iterator()java.util.Map<java.lang.String,java.lang.String>metadata()IDecodedPacket<?>nextPacket()Decodes and returns next packet in the container.IRawPacketnextRawPacket()Obtains next media packet from the container without decoding it.java.util.stream.Stream<IDecodedPacket<?>>packetStream()IContainerPropertiesproperties()java.util.List<IDecoderStream<?,?,?>>streams()java.lang.StringtoString()IVideoDecoderStreamvideoStream(int index)java.util.List<? extends IVideoDecoderStream>videoStreams()
-
Constructor Details
-
Method Details
-
nextPacket
Description copied from interface:IDemuxerDecodes and returns next packet in the container.- Specified by:
nextPacketin interfaceIDemuxer- Returns:
- next packet or null if end of container reached
-
nextRawPacket
Description copied from interface:IDemuxerObtains next media packet from the container without decoding it.- Specified by:
nextRawPacketin interfaceIDemuxer- Returns:
- raw packet data of null if end of container reached
-
packetStream
- Specified by:
packetStreamin interfaceIDemuxer- Returns:
- stream of packets in the container
-
iterator
- Specified by:
iteratorin interfaceIDemuxer- Specified by:
iteratorin interfacejava.lang.Iterable<IDecodedPacket<?>>- Returns:
- iterator of packets in the container
-
videoStreams
- Specified by:
videoStreamsin interfaceIDemuxer- Returns:
- list of container's video streams
-
videoStream
- Specified by:
videoStreamin interfaceIDemuxer- Parameters:
index- of the stream in the container- Returns:
- container's video stream by index, or null if a stream with the specified index does not exist or is not video.
-
audioStreams
- Specified by:
audioStreamsin interfaceIDemuxer- Returns:
- list of container's audio streams
-
audioStream
- Specified by:
audioStreamin interfaceIDemuxer- Parameters:
index- of the stream in the container- Returns:
- container's audio stream by index, or null if a stream with the specified index does not exist or is not audio.
-
streams
-
metadata
public java.util.Map<java.lang.String,java.lang.String> metadata() -
properties
- Specified by:
propertiesin interfaceIDemuxer- Returns:
- container properties
-
close
public void close()Description copied from interface:IDemuxerCloses the demuxer, container file or other handles and frees all the allocated resources. Calling this method is necessary after working with demuxer to avoid resource leaks. -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-