|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.io.m4a.impl.M4AReader
public class M4AReader
A Reader is used to read the contents of a M4A file. NOTE: This class is not implemented as threading-safe. The caller should make sure the threading-safety.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
M4AReader(File f)
Creates M4A reader from file input stream, sets up metadata generation flag. |
|
M4AReader(IoBuffer buffer)
Accepts mapped file bytes to construct internal members. |
|
| Method Summary | |
|---|---|
void |
analyzeFrames()
Performs frame analysis and generates metadata for use in seeking. |
void |
close()
Closes the reader and free any allocated memory. |
void |
decodeHeader()
This handles the moov atom being at the beginning or end of the file, so the mdat may also be before or after the moov atom. |
String |
getAudioCodecId()
|
long |
getBytesRead()
Returns the amount of bytes read |
long |
getDuration()
Return length in seconds |
IStreamableFile |
getFile()
Return the file that is loaded. |
IoBuffer |
getFileData()
Returns the file buffer. |
int |
getOffset()
Returns the offet length |
long |
getTotalBytes()
Get the total readable bytes in a file or ByteBuffer |
boolean |
hasMoreTags()
Returns a boolean stating whether the FLV has more tags |
boolean |
hasVideo()
Check if the reader also has video tags. |
void |
position(long pos)
Put the current position to pos. |
ITag |
readTag()
Packages media data for return to providers. |
ITag |
readTagHeader()
|
void |
setAudioCodecId(String audioCodecId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public M4AReader(File f)
throws IOException
f - File input stream
IOException
public M4AReader(IoBuffer buffer)
throws IOException
buffer - Byte buffer
IOException| Method Detail |
|---|
public void decodeHeader()
decodeHeader in interface ITagReaderpublic long getTotalBytes()
ITagReader
getTotalBytes in interface ITagReaderpublic boolean hasVideo()
hasVideo in interface ITagReaderpublic IoBuffer getFileData()
public IStreamableFile getFile()
getFile in interface ITagReaderpublic int getOffset()
getOffset in interface ITagReaderpublic long getBytesRead()
getBytesRead in interface ITagReaderpublic long getDuration()
getDuration in interface ITagReaderpublic String getAudioCodecId()
public boolean hasMoreTags()
hasMoreTags in interface ITagReaderpublic ITag readTag()
readTag in interface ITagReaderpublic void analyzeFrames()
public void position(long pos)
position in interface ITagReaderpos - position to move to in file / channelpublic void close()
close in interface ITagReaderpublic void setAudioCodecId(String audioCodecId)
public ITag readTagHeader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||