Package org.red5.io.flv.meta
Class MetaData<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> IMeta,IMetaData<Object,Object>
MetaData Implementation
- Author:
- The Red5 Project, Dominick Accattato ([email protected]) 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:
-
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> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) IMetaCue[]Cue points array.private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns a boolean depending on whether the video can seek to enddoubleReturns the duration.doubleReturns the framerate.intReturns the heightIMetaCue[]Return array of cue pointsintReturns the video codec idintReturns 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 widthtoString()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, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
cuePoints
IMetaCue[] cuePointsCue points array. Cue points can be injected on fly like any other data even on client-side.
-
-
Constructor Details
-
MetaData
public MetaData()MetaData constructor
-
-
Method Details
-
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
Sets the Meta Cue Points- Specified by:
setMetaCuein interfaceIMetaData<K,V> - Parameters:
cuePoints- The cuePoints to set.
-
getMetaCue
Return array of cue points- Specified by:
getMetaCuein interfaceIMetaData<K,V> - Returns:
- Array of cue points
-
toString
- Overrides:
toStringin classAbstractMap<String,Object>
-