Package org.red5.io.mp4
Interface IMP4
-
- All Superinterfaces:
IStreamableFile
- All Known Implementing Classes:
MP4
public interface IMP4 extends IStreamableFile
Represents MP4 file- Author:
- Paul Gregoire (mondain@gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidflushHeaders()Flushes HeaderMap<?,?>getKeyFrameData()Gets the keyframe dataIMetaData<?,?>getMetaData()Returns a map of the metadatabooleanhasKeyFrameData()Returns a boolean stating whether a mp4 has keyframedatabooleanhasMetaData()Returns a boolean stating whether the mp4 has metadataITagReaderreaderFromNearestKeyFrame(int seekPoint)Returns a Reader closest to the nearest keyframevoidrefreshHeaders()Refreshes the headers.voidsetKeyFrameData(Map<?,?> keyframedata)Sets the keyframe data of a mp4 filevoidsetMetaData(IMetaData<?,?> metadata)Sets the metadatavoidsetMetaService(IMetaService service)Sets the MetaService through SpringITagWriterwriterFromNearestKeyFrame(int seekPoint)Returns a Writer based on the nearest key frame-
Methods inherited from interface org.red5.io.IStreamableFile
getAppendWriter, getReader, getWriter
-
-
-
-
Method Detail
-
hasMetaData
boolean hasMetaData()
Returns a boolean stating whether the mp4 has metadata- Returns:
- boolean
trueif file has injected metadata,falseotherwise
-
setMetaData
void setMetaData(IMetaData<?,?> metadata) throws FileNotFoundException, IOException
Sets the metadata- Parameters:
metadata- Metadata object- Throws:
FileNotFoundException- File not foundIOException- Any other I/O exception
-
setMetaService
void setMetaService(IMetaService service)
Sets the MetaService through Spring- Parameters:
service- Metadata service
-
getMetaData
IMetaData<?,?> getMetaData() throws FileNotFoundException
Returns a map of the metadata- Returns:
- metadata File metadata
- Throws:
FileNotFoundException- File not found
-
hasKeyFrameData
boolean hasKeyFrameData()
Returns a boolean stating whether a mp4 has keyframedata- Returns:
- boolean
trueif file has keyframe metadata,falseotherwise
-
setKeyFrameData
void setKeyFrameData(Map<?,?> keyframedata)
Sets the keyframe data of a mp4 file- Parameters:
keyframedata- Keyframe metadata
-
getKeyFrameData
Map<?,?> getKeyFrameData()
Gets the keyframe data- Returns:
- keyframedata Keyframe metadata
-
refreshHeaders
void refreshHeaders() throws IOExceptionRefreshes the headers. Usually used after data is added to the mp4 file- Throws:
IOException- Any I/O exception
-
flushHeaders
void flushHeaders() throws IOExceptionFlushes Header- Throws:
IOException- Any I/O exception
-
readerFromNearestKeyFrame
ITagReader readerFromNearestKeyFrame(int seekPoint)
Returns a Reader closest to the nearest keyframe- Parameters:
seekPoint- Point in file we are seeking around- Returns:
- reader Tag reader closest to that point
-
writerFromNearestKeyFrame
ITagWriter writerFromNearestKeyFrame(int seekPoint)
Returns a Writer based on the nearest key frame- Parameters:
seekPoint- Point in file we are seeking around- Returns:
- writer Tag writer closest to that point
-
-