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 (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:
-
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
Modifier and TypeFieldDescription(package private) IMetaCue[]
Cue points array.private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Returns a boolean depending on whether the video can seek to enddouble
Returns the duration.double
Returns the framerate.int
Returns the heightIMetaCue[]
Return array of cue pointsint
Returns the video codec idint
Returns the videodatarateint
getWidth()
Returns the width Video widthvoid
setAudioCodecId
(int id) void
setCanSeekToEnd
(boolean b) Sets whether a video can seek to endvoid
setDuration
(double d) Sets the duration.void
setFrameRate
(double rate) Sets the framerate.void
setHeight
(int h) Sets the heightvoid
setMetaCue
(IMetaCue[] cuePoints) Sets the Meta Cue Pointsvoid
setVideoCodecId
(int id) Sets the video codec idvoid
setVideoDataRate
(int rate) Sets the videodataratevoid
setWidth
(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, values
Methods 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:
getCanSeekToEnd
in interfaceIMetaData<K,
V> - Returns:
true
if file is seekable to the end,false
otherwise
-
setCanSeekToEnd
public void setCanSeekToEnd(boolean b) Sets whether a video can seek to end- Specified by:
setCanSeekToEnd
in interfaceIMetaData<K,
V> - Parameters:
b
-true
if file is seekable to the end,false
otherwise
-
getVideoCodecId
public int getVideoCodecId()Returns the video codec id- Specified by:
getVideoCodecId
in interfaceIMetaData<K,
V> - Returns:
- Video codec id
-
setVideoCodecId
public void setVideoCodecId(int id) Sets the video codec id- Specified by:
setVideoCodecId
in interfaceIMetaData<K,
V> - Parameters:
id
- Video codec id
-
getAudioCodecId
public int getAudioCodecId()- Specified by:
getAudioCodecId
in interfaceIMetaData<K,
V>
-
setAudioCodecId
public void setAudioCodecId(int id) - Specified by:
setAudioCodecId
in interfaceIMetaData<K,
V>
-
getFrameRate
public double getFrameRate()Returns the framerate.- Specified by:
getFrameRate
in interfaceIMetaData<K,
V> - Returns:
- FLV framerate in frames per second
-
setFrameRate
public void setFrameRate(double rate) Sets the framerate.- Specified by:
setFrameRate
in interfaceIMetaData<K,
V> - Parameters:
rate
- FLV framerate in frames per second
-
getVideoDataRate
public int getVideoDataRate()Returns the videodatarate- Specified by:
getVideoDataRate
in interfaceIMetaData<K,
V> - Returns:
- Video data rate
-
setVideoDataRate
public void setVideoDataRate(int rate) Sets the videodatarate- Specified by:
setVideoDataRate
in 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:
getDuration
in interfaceIMetaData<K,
V> - Returns:
- duration Video duration in seconds
-
setDuration
public void setDuration(double d) Sets the duration.- Specified by:
setDuration
in 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:
setMetaCue
in interfaceIMetaData<K,
V> - Parameters:
cuePoints
- The cuePoints to set.
-
getMetaCue
Return array of cue points- Specified by:
getMetaCue
in interfaceIMetaData<K,
V> - Returns:
- Array of cue points
-
toString
- Overrides:
toString
in classAbstractMap<String,
Object>
-