org.gagravarr.vorbis
Class VorbisPacket
java.lang.Object
org.gagravarr.ogg.HighLevelOggStreamPacket
org.gagravarr.vorbis.VorbisPacket
- Direct Known Subclasses:
- VorbisAudioData, VorbisComments, VorbisInfo, VorbisSetup
public abstract class VorbisPacket
- extends HighLevelOggStreamPacket
Parent of all Vorbis packets
Method Summary |
static VorbisPacket |
create(OggPacket packet)
Creates the appropriate VorbisPacket
instance based on the type. |
protected abstract int |
getHeaderSize()
How big is the header on this packet?
For Metadata packets it's normally 7 bytes,
otherwise for audio packets there is no header. |
static boolean |
isVorbisStream(OggPacket firstPacket)
Does this packet (the first in the stream) contain
the magic string indicating that it's a vorbis
one? |
protected void |
populateMetadataHeader(byte[] b,
int type,
int dataLength)
Popupulates the metadata packet header,
which is "#vorbis" where # is the type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_INFO
public static final int TYPE_INFO
- See Also:
- Constant Field Values
TYPE_COMMENTS
public static final int TYPE_COMMENTS
- See Also:
- Constant Field Values
TYPE_SETUP
public static final int TYPE_SETUP
- See Also:
- Constant Field Values
HEADER_LENGTH_METADATA
protected static final int HEADER_LENGTH_METADATA
- See Also:
- Constant Field Values
HEADER_LENGTH_AUDIO
protected static final int HEADER_LENGTH_AUDIO
- See Also:
- Constant Field Values
VorbisPacket
protected VorbisPacket(OggPacket oggPacket)
VorbisPacket
protected VorbisPacket()
getHeaderSize
protected abstract int getHeaderSize()
- How big is the header on this packet?
For Metadata packets it's normally 7 bytes,
otherwise for audio packets there is no header.
populateMetadataHeader
protected void populateMetadataHeader(byte[] b,
int type,
int dataLength)
- Popupulates the metadata packet header,
which is "#vorbis" where # is the type.
isVorbisStream
public static boolean isVorbisStream(OggPacket firstPacket)
- Does this packet (the first in the stream) contain
the magic string indicating that it's a vorbis
one?
create
public static VorbisPacket create(OggPacket packet)
- Creates the appropriate
VorbisPacket
instance based on the type.
Copyright © 2012. All Rights Reserved.