|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jarnbjo.ogg.OggPage
de.jarnbjo.jmf.OggJmfPage
public class OggJmfPage
An instance of this class represents an ogg page read from an ogg file
or network stream. It has no public constructor, but instances can be
created by the create methods, supplying a JMF stream or
a RandomAccessFile
which is positioned at the beginning of an Ogg page.
Furtheron, the class provides methods for accessing the raw page data, as well as data attributes like segmenting information, sequence number, stream serial number, chechsum and wether this page is the beginning or end of a logical bitstream (BOS, EOS) and if the page data starts with a continued packet or a fresh data packet.
| Method Summary | |
|---|---|
static OggJmfPage |
create(PullSourceStream source)
This method is called to read data from the current position in the specified channel and create a new OggPage instance based on the data read. |
static OggJmfPage |
create(PullSourceStream source,
boolean skipData)
|
long |
getAbsoluteGranulePosition()
Returns the absolute granule position of the last complete packet contained in this Ogg page, or -1 if the page contains a single packet, which is not completed on this page. |
byte[] |
getData()
|
byte[] |
getHeader()
|
int |
getPageCheckSum()
Return the check sum of this ogg page. |
int |
getPageSequenceNumber()
Return the sequnce number of this ogg page. |
int[] |
getSegmentLengths()
|
int[] |
getSegmentOffsets()
|
byte[] |
getSegmentTable()
|
int |
getStreamSerialNumber()
Returns the stream serial number of this ogg page. |
int |
getTotalLength()
|
boolean |
isBos()
|
boolean |
isContinued()
|
boolean |
isEos()
|
boolean |
isFresh()
|
| Methods inherited from class de.jarnbjo.ogg.OggPage |
|---|
create, create, create, create, create, create |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static OggJmfPage create(PullSourceStream source)
throws java.io.IOException,
EndOfOggStreamException,
OggFormatException
skipData is set to true,
the actual page segments (page data) is skipped instead of read into
memory. This mode is useful when scanning through an ogg file to find
page boundaries and make a list of the granule positions of each page.
source - the byte channel from which the ogg page is generatedskipData - if set to true, the actual page data is not read into memory
FormatException - if the data read from the specified channel is not matching the specification for an ogg page
EndOfStreamException - if it is not possible to read an entire ogg page from the specified channel
java.io.IOException - if some other IO error is detected when reading from the channel
EndOfOggStreamException
OggFormatExceptioncreate(ReadableByteChannel)
public static OggJmfPage create(PullSourceStream source,
boolean skipData)
throws java.io.IOException,
EndOfOggStreamException,
OggFormatException
java.io.IOException
EndOfOggStreamException
OggFormatExceptionpublic long getAbsoluteGranulePosition()
getAbsoluteGranulePosition in class OggPagepublic int getStreamSerialNumber()
getStreamSerialNumber in class OggPagepublic int getPageSequenceNumber()
getPageSequenceNumber in class OggPagepublic int getPageCheckSum()
getPageCheckSum in class OggPagepublic int getTotalLength()
getTotalLength in class OggPagepublic byte[] getData()
getData in class OggPagepublic byte[] getHeader()
getHeader in class OggPagepublic byte[] getSegmentTable()
getSegmentTable in class OggPagepublic int[] getSegmentOffsets()
getSegmentOffsets in class OggPagepublic int[] getSegmentLengths()
getSegmentLengths in class OggPagepublic boolean isContinued()
isContinued in class OggPagetrue if this page begins with a continued packetpublic boolean isFresh()
isFresh in class OggPagetrue if this page begins with a fresh packetpublic boolean isBos()
isBos in class OggPagetrue if this page is the beginning of a logical streampublic boolean isEos()
isEos in class OggPagetrue if this page is the end of a logical stream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||