|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
de.jarnbjo.ogg
Interface LogicalOggStream
- All Known Implementing Classes:
- LogicalOggStreamImpl
public interface LogicalOggStream
Interface providing access to a logical Ogg stream as part of a physical Ogg stream.
| Field Summary | |
|---|---|
static String |
FORMAT_FLAC
|
static String |
FORMAT_THEORA
|
static String |
FORMAT_UNKNOWN
|
static String |
FORMAT_VORBIS
|
| Method Summary | |
|---|---|
void |
close()
Closes this stream. |
String |
getFormat()
|
long |
getMaximumGranulePosition()
This method does not work if the physical Ogg stream is not seekable. |
byte[] |
getNextOggPacket()
Note: To read from the stream, you must use either this method or the method getNextOggPage. |
OggPage |
getNextOggPage()
Note: To read from the stream, you must use either this method or the method getNextOggPacket. |
long |
getTime()
|
boolean |
isOpen()
Checks if this stream is open for reading. |
void |
reset()
Sets the stream's position to the beginning of the stream. |
void |
setTime(long granulePosition)
This method is invoked on all logical streams when calling the same method on the physical stream. |
| Field Detail |
|---|
FORMAT_UNKNOWN
static final String FORMAT_UNKNOWN
- See Also:
- Constant Field Values
FORMAT_VORBIS
static final String FORMAT_VORBIS
- See Also:
- Constant Field Values
FORMAT_FLAC
static final String FORMAT_FLAC
- See Also:
- Constant Field Values
FORMAT_THEORA
static final String FORMAT_THEORA
- See Also:
- Constant Field Values
| Method Detail |
|---|
getNextOggPage
OggPage getNextOggPage() throws OggFormatException, IOException
- Note: To read from the stream, you must use either
this method or the method
getNextOggPacket. Mixing calls to the two methods will cause data corruption.- Returns:
- the next Ogg page
- Throws:
OggFormatException- if the ogg stream is corruptedIOException- if some other IO error occurs- See Also:
getNextOggPacket()
getNextOggPacket
byte[] getNextOggPacket() throws OggFormatException, IOException
- Note: To read from the stream, you must use either
this method or the method
getNextOggPage. Mixing calls to the two methods will cause data corruption.- Returns:
- the next packet as a byte array
- Throws:
OggFormatException- if the ogg stream is corruptedIOException- if some other IO error occurs- See Also:
getNextOggPage()
isOpen
boolean isOpen()
- Checks if this stream is open for reading.
- Returns:
trueif this stream is open for reading,falseotherwise
close
void close() throws IOException
- Closes this stream. After invoking this method, no further access
to the streams data is possible.
- Throws:
IOException- if an IO error occurs
reset
void reset() throws OggFormatException, IOException
- Sets the stream's position to the beginning of the stream.
This method does not work if the physical Ogg stream is not
seekable.
- Throws:
OggFormatException- if the ogg stream is corruptedIOException- if some other IO error occurs
getMaximumGranulePosition
long getMaximumGranulePosition()
- This method does not work if the physical Ogg stream is not
seekable.
- Returns:
- the granule position of the last page within this stream
setTime
void setTime(long granulePosition) throws IOException
- This method is invoked on all logical streams when
calling the same method on the physical stream. The
same restrictions as mentioned there apply.
This method does not work if the physical Ogg stream is not
seekable.
- Parameters:
granulePosition-- Throws:
IOException- if an IO error occurs- See Also:
PhysicalOggStream.setTime(long)
getTime
long getTime()
- Returns:
- the last parsed granule position of this stream
getFormat
String getFormat()
- Returns:
- the content type of this stream
- See Also:
FORMAT_UNKNOWN,FORMAT_VORBIS,FORMAT_FLAC,FORMAT_THEORA
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2007-2011 shredzone.org. All Rights Reserved.