public class MP4 extends Object implements IMP4
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
MP4()
Default constructor, used by Spring so that parameters may be injected.
|
MP4(File file)
Create MP4 from given file source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flushHeaders()
Flushes Header
|
ITagWriter |
getAppendWriter()
Returns a Writer which is setup to append to the file.
|
Map<?,?> |
getKeyFrameData()
Gets the keyframe data
|
IMetaData<?,?> |
getMetaData()
Returns a map of the metadata
|
ITagReader |
getReader()
Returns a reader to parse and read the tags inside the file.
|
ITagWriter |
getWriter()
Returns a writer that creates a new file or truncates existing contents.
|
boolean |
hasKeyFrameData()
Returns a boolean stating whether a mp4 has keyframedata
|
boolean |
hasMetaData()
Returns a boolean stating whether the mp4 has metadata
|
ITagReader |
readerFromNearestKeyFrame(int seekPoint)
Returns a Reader closest to the nearest keyframe
|
void |
refreshHeaders()
Refreshes the headers.
|
void |
setKeyFrameData(Map<?,?> keyframedata)
Sets the keyframe data of a mp4 file
|
void |
setMetaData(IMetaData<?,?> meta)
Sets the metadata
|
void |
setMetaService(IMetaService service)
Sets the MetaService through Spring
|
ITagWriter |
writerFromNearestKeyFrame(int seekPoint)
Returns a Writer based on the nearest key frame
|
public MP4()
public MP4(File file)
file - File sourcepublic boolean hasMetaData()
hasMetaData in interface IMP4true if file has injected metadata, false otherwisepublic IMetaData<?,?> getMetaData() throws FileNotFoundException
getMetaData in interface IMP4FileNotFoundException - File not foundpublic boolean hasKeyFrameData()
hasKeyFrameData in interface IMP4true if file has keyframe metadata, false otherwisepublic void setKeyFrameData(Map<?,?> keyframedata)
setKeyFrameData in interface IMP4keyframedata - Keyframe metadatapublic Map<?,?> getKeyFrameData()
getKeyFrameData in interface IMP4public void refreshHeaders()
throws IOException
refreshHeaders in interface IMP4IOException - Any I/O exceptionpublic void flushHeaders()
throws IOException
flushHeaders in interface IMP4IOException - Any I/O exceptionpublic ITagReader getReader() throws IOException
getReader in interface IStreamableFileIOException - I/O exceptionpublic ITagReader readerFromNearestKeyFrame(int seekPoint)
readerFromNearestKeyFrame in interface IMP4seekPoint - Point in file we are seeking aroundpublic ITagWriter getWriter() throws IOException
getWriter in interface IStreamableFileIOException - I/O exceptionpublic ITagWriter writerFromNearestKeyFrame(int seekPoint)
writerFromNearestKeyFrame in interface IMP4seekPoint - Point in file we are seeking aroundpublic void setMetaData(IMetaData<?,?> meta) throws IOException
setMetaData in interface IMP4meta - Metadata objectFileNotFoundException - File not foundIOException - Any other I/O exceptionpublic void setMetaService(IMetaService service)
setMetaService in interface IMP4service - Metadata servicepublic ITagWriter getAppendWriter() throws IOException
IStreamableFilegetAppendWriter in interface IStreamableFileIOException - I/O exceptionCopyright © 2005–2017 Red5. All rights reserved.