public class MP3Reader extends Object implements ITagReader, IKeyFrameDataAnalyzer
IKeyFrameDataAnalyzer.KeyFrameMeta
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log
Logger
|
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 |
searchNextFrame()
Search for next frame sync word.
|
void |
setFrameCache(IKeyFrameMetaCache frameCache) |
public MP3Reader(File file) throws IOException
file
- file inputIOException
public boolean hasVideo()
hasVideo
in interface ITagReader
false
public void setFrameCache(IKeyFrameMetaCache frameCache)
public void searchNextFrame()
public IStreamableFile getFile()
getFile
in interface ITagReader
public int getOffset()
getOffset
in interface ITagReader
public long getBytesRead()
getBytesRead
in interface ITagReader
public long getDuration()
getDuration
in interface ITagReader
public long getTotalBytes()
getTotalBytes
in interface ITagReader
public boolean hasMoreTags()
hasMoreTags
in interface ITagReader
public ITag readTag()
readTag
in interface ITagReader
public void close()
close
in interface ITagReader
public void decodeHeader()
decodeHeader
in interface ITagReader
public void position(long pos)
position
in interface ITagReader
pos
- File position to move topublic IKeyFrameDataAnalyzer.KeyFrameMeta analyzeKeyFrames()
analyzeKeyFrames
in interface IKeyFrameDataAnalyzer
Copyright © 2006-2012 The Red5 Project