Package org.red5.io.flv.meta
Class MetaService
java.lang.Object
org.red5.io.flv.meta.MetaService
- All Implemented Interfaces:
IMetaService
MetaService represents a MetaData service in Spring
- Author:
- The Red5 Project, Dominick Accattato (daccattato@gmail.com), Luke Hubbard, Codegent Ltd (luke@codegent.com)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Returns the file being accessedprivate static int
getTimeInMilliseconds
(IMetaCue metaCue) Returns a timestamp of cue point in millisecondsprivate static ITag
injectMetaCue
(IMetaCue meta, ITag tag) Injects metadata (Cue Points) into a tagprivate static ITag
injectMetaData
(IMetaData<?, ?> meta, ITag tag) Injects metadata (other than Cue points) into a tagstatic IMeta
Merges the two Meta objectsIMetaCue[]
Read the Meta Cue PointsMetaData<?,
?> readMetaData
(org.apache.mina.core.buffer.IoBuffer buffer) Read the MetaDatavoid
Media file to be accessedvoid
Initiates writing of the MetaDatavoid
Writes the Meta Cue Pointsvoid
writeMetaData
(IMetaData<?, ?> metaData) Writes the MetaData
-
Field Details
-
log
protected static org.slf4j.Logger log -
file
File fileSource file
-
-
Constructor Details
-
MetaService
public MetaService()MetaService constructor -
MetaService
-
-
Method Details
-
write
Initiates writing of the MetaData- Specified by:
write
in interfaceIMetaService
- Parameters:
meta
- Metadata- Throws:
IOException
- I/O exception
-
mergeMeta
Merges the two Meta objects- Parameters:
metaData1
- First metadata objectmetaData2
- Second metadata object- Returns:
- Merged metadata
-
injectMetaData
Injects metadata (other than Cue points) into a tag- Parameters:
meta
- Metadatatag
- Tag- Returns:
- New tag with injected metadata
-
injectMetaCue
Injects metadata (Cue Points) into a tag- Parameters:
meta
- Metadata (cue points)tag
- Tag- Returns:
- ITag tag New tag with injected metadata
-
getTimeInMilliseconds
Returns a timestamp of cue point in milliseconds- Parameters:
metaCue
- Cue point- Returns:
- int time Timestamp of given cue point (in milliseconds)
-
writeMetaData
Writes the MetaData- Specified by:
writeMetaData
in interfaceIMetaService
- Parameters:
metaData
- Metadata
-
writeMetaCue
public void writeMetaCue()Writes the Meta Cue Points- Specified by:
writeMetaCue
in interfaceIMetaService
-
getFile
Description copied from interface:IMetaService
Returns the file being accessed- Specified by:
getFile
in interfaceIMetaService
- Returns:
- Returns the file.
-
setFile
Description copied from interface:IMetaService
Media file to be accessed- Specified by:
setFile
in interfaceIMetaService
- Parameters:
file
- The file to set.
-
readMetaData
Read the MetaData- Specified by:
readMetaData
in interfaceIMetaService
- Parameters:
buffer
- IoBuffer source- Returns:
- metaData Metadata
-
readMetaCue
Read the Meta Cue Points- Specified by:
readMetaCue
in interfaceIMetaService
- Returns:
- Meta cue points
-