public class MP3Reader extends Object implements ITagReader, IKeyFrameDataAnalyzer
IKeyFrameDataAnalyzer.KeyFrameMeta| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
MP3Reader(File file)
Creates reader from file input stream
|
| Modifier and Type | Method and Description |
|---|---|
IKeyFrameDataAnalyzer.KeyFrameMeta |
analyzeKeyFrames()
Analyze and return keyframe metadata.
|
void |
close()
Closes the reader and free any allocated memory.
|
void |
decodeHeader()
Decode the header of the stream;
|
long |
getBytesRead()
Returns the amount of bytes read
|
long |
getDuration()
Return length in seconds
|
IStreamableFile |
getFile()
Return the file that is loaded.
|
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()
A MP3 stream never has video.
|
void |
position(long pos)
Move the reader pointer to given position in file.
|
ITag |
readTag()
Returns a Tag object
|
void |
setFrameCache(IKeyFrameMetaCache frameCache) |
public MP3Reader(File file) throws IOException
file - file inputIOException - on IO errorpublic boolean hasVideo()
hasVideo in interface ITagReaderfalsepublic void setFrameCache(IKeyFrameMetaCache frameCache)
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 long getTotalBytes()
getTotalBytes in interface ITagReaderpublic boolean hasMoreTags()
hasMoreTags in interface ITagReaderpublic ITag readTag()
readTag in interface ITagReaderpublic void close()
close in interface ITagReaderpublic void decodeHeader()
decodeHeader in interface ITagReaderpublic void position(long pos)
position in interface ITagReaderpos - File position to move topublic IKeyFrameDataAnalyzer.KeyFrameMeta analyzeKeyFrames()
analyzeKeyFrames in interface IKeyFrameDataAnalyzerCopyright © 2005–2017 Red5. All rights reserved.