Package org.red5.io.flv.meta
Class MetaData<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.red5.io.flv.meta.MetaData<K,V>
-
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>,IMeta,IMetaData<Object,Object>
public class MetaData<K,V> extends HashMap<String,Object> implements IMetaData<Object,Object>
MetaData Implementation- Author:
- The Red5 Project, Dominick Accattato (daccattato@gmail.com) Example: // private boolean canSeekToEnd = true; // private int videocodecid = 4; // private int framerate = 15; // private int videodatarate = 600; // private int height; // private int width = 320; // private double duration = 7.347;
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description MetaData()MetaData constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAudioCodecId()booleangetCanSeekToEnd()Returns a boolean depending on whether the video can seek to enddoublegetDuration()Returns the duration.doublegetFrameRate()Returns the framerate.intgetHeight()Returns the heightIMetaCue[]getMetaCue()Return array of cue pointsintgetVideoCodecId()Returns the video codec idintgetVideoDataRate()Returns the videodatarateintgetWidth()Returns the width Video widthvoidsetAudioCodecId(int id)voidsetCanSeekToEnd(boolean b)Sets whether a video can seek to endvoidsetDuration(double d)Sets the duration.voidsetFrameRate(double rate)Sets the framerate.voidsetHeight(int h)Sets the heightvoidsetMetaCue(IMetaCue[] cuePoints)Sets the Meta Cue PointsvoidsetVideoCodecId(int id)Sets the video codec idvoidsetVideoDataRate(int rate)Sets the videodataratevoidsetWidth(int w)Sets the widthStringtoString()-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
-
-
-
Method Detail
-
getCanSeekToEnd
public boolean getCanSeekToEnd()
Returns a boolean depending on whether the video can seek to end- Specified by:
getCanSeekToEndin interfaceIMetaData<K,V>- Returns:
trueif file is seekable to the end,falseotherwise
-
setCanSeekToEnd
public void setCanSeekToEnd(boolean b)
Sets whether a video can seek to end- Specified by:
setCanSeekToEndin interfaceIMetaData<K,V>- Parameters:
b-trueif file is seekable to the end,falseotherwise
-
getVideoCodecId
public int getVideoCodecId()
Returns the video codec id- Specified by:
getVideoCodecIdin interfaceIMetaData<K,V>- Returns:
- Video codec id
-
setVideoCodecId
public void setVideoCodecId(int id)
Sets the video codec id- Specified by:
setVideoCodecIdin interfaceIMetaData<K,V>- Parameters:
id- Video codec id
-
getAudioCodecId
public int getAudioCodecId()
- Specified by:
getAudioCodecIdin interfaceIMetaData<K,V>
-
setAudioCodecId
public void setAudioCodecId(int id)
- Specified by:
setAudioCodecIdin interfaceIMetaData<K,V>
-
getFrameRate
public double getFrameRate()
Returns the framerate.- Specified by:
getFrameRatein interfaceIMetaData<K,V>- Returns:
- FLV framerate in frames per second
-
setFrameRate
public void setFrameRate(double rate)
Sets the framerate.- Specified by:
setFrameRatein interfaceIMetaData<K,V>- Parameters:
rate- FLV framerate in frames per second
-
getVideoDataRate
public int getVideoDataRate()
Returns the videodatarate- Specified by:
getVideoDataRatein interfaceIMetaData<K,V>- Returns:
- Video data rate
-
setVideoDataRate
public void setVideoDataRate(int rate)
Sets the videodatarate- Specified by:
setVideoDataRatein interfaceIMetaData<K,V>- Parameters:
rate- Video data rate
-
getWidth
public int getWidth()
Returns the width Video width
-
setWidth
public void setWidth(int w)
Sets the width
-
getDuration
public double getDuration()
Returns the duration.- Specified by:
getDurationin interfaceIMetaData<K,V>- Returns:
- duration Video duration in seconds
-
setDuration
public void setDuration(double d)
Sets the duration.- Specified by:
setDurationin interfaceIMetaData<K,V>- Parameters:
d- Video duration in seconds
-
getHeight
public int getHeight()
Returns the height
-
setHeight
public void setHeight(int h)
Sets the height
-
setMetaCue
public void setMetaCue(IMetaCue[] cuePoints)
Sets the Meta Cue Points- Specified by:
setMetaCuein interfaceIMetaData<K,V>- Parameters:
cuePoints- The cuePoints to set.
-
getMetaCue
public IMetaCue[] getMetaCue()
Return array of cue points- Specified by:
getMetaCuein interfaceIMetaData<K,V>- Returns:
- Array of cue points
-
toString
public String toString()
- Overrides:
toStringin classAbstractMap<String,Object>
-
-