Package com.zakgof.velvetvideo
Interface IDecodedPacket<S extends IDecoderStream<?,?,?>>
- Type Parameters:
S- media decoder stream type,IAudioDecoderStreamorIVideoDecoderStream
- All Known Subinterfaces:
IAudioFrame,IVideoFrame
public interface IDecodedPacket<S extends IDecoderStream<?,?,?>>
Decoded media data frame.
-
Method Summary
Modifier and Type Method Description default IAudioFrameasAudio()default IVideoFrameasVideo()default booleanis(MediaType mediaType)Checks if media is of a specific type.longnanoduration()longnanostamp()Sstream()MediaTypetype()
-
Method Details
-
type
MediaType type()- Returns:
- media type, video or audio
-
is
Checks if media is of a specific type.- Parameters:
mediaType- suggested video type- Returns:
- true is type matches, false if not
-
asVideo
- Returns:
IVideoFramefor this packet, or null if the packet is not video
-
asAudio
- Returns:
IAudioFramefor this packet, or null if the packet is not audio
-
stream
S stream()- Returns:
- media stream
-
nanostamp
long nanostamp()- Returns:
- time offset of this frame from the stream start, in nanoseconds
-
nanoduration
long nanoduration()- Returns:
- duration of this frame, in nanoseconds
-