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 type
V - 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • cuePoints

      IMetaCue[] cuePoints
      Cue 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 interface IMetaData<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 interface IMetaData<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 interface IMetaData<K,V>
      Returns:
      Video codec id
    • setVideoCodecId

      public void setVideoCodecId(int id)
      Sets the video codec id
      Specified by:
      setVideoCodecId in interface IMetaData<K,V>
      Parameters:
      id - Video codec id
    • getAudioCodecId

      public int getAudioCodecId()
      Specified by:
      getAudioCodecId in interface IMetaData<K,V>
    • setAudioCodecId

      public void setAudioCodecId(int id)
      Specified by:
      setAudioCodecId in interface IMetaData<K,V>
    • getFrameRate

      public double getFrameRate()
      Returns the framerate.
      Specified by:
      getFrameRate in interface IMetaData<K,V>
      Returns:
      FLV framerate in frames per second
    • setFrameRate

      public void setFrameRate(double rate)
      Sets the framerate.
      Specified by:
      setFrameRate in interface IMetaData<K,V>
      Parameters:
      rate - FLV framerate in frames per second
    • getVideoDataRate

      public int getVideoDataRate()
      Returns the videodatarate
      Specified by:
      getVideoDataRate in interface IMetaData<K,V>
      Returns:
      Video data rate
    • setVideoDataRate

      public void setVideoDataRate(int rate)
      Sets the videodatarate
      Specified by:
      setVideoDataRate in interface IMetaData<K,V>
      Parameters:
      rate - Video data rate
    • getWidth

      public int getWidth()
      Returns the width Video width
      Specified by:
      getWidth in interface IMetaData<K,V>
      Returns:
      width
    • setWidth

      public void setWidth(int w)
      Sets the width
      Specified by:
      setWidth in interface IMetaData<K,V>
      Parameters:
      w - Video width
    • getDuration

      public double getDuration()
      Returns the duration.
      Specified by:
      getDuration in interface IMetaData<K,V>
      Returns:
      duration Video duration in seconds
    • setDuration

      public void setDuration(double d)
      Sets the duration.
      Specified by:
      setDuration in interface IMetaData<K,V>
      Parameters:
      d - Video duration in seconds
    • getHeight

      public int getHeight()
      Returns the height
      Specified by:
      getHeight in interface IMetaData<K,V>
      Returns:
      height Video height
    • setHeight

      public void setHeight(int h)
      Sets the height
      Specified by:
      setHeight in interface IMetaData<K,V>
      Parameters:
      h - Video height
    • setMetaCue

      public void setMetaCue(IMetaCue[] cuePoints)
      Sets the Meta Cue Points
      Specified by:
      setMetaCue in interface IMetaData<K,V>
      Parameters:
      cuePoints - The cuePoints to set.
    • getMetaCue

      public IMetaCue[] getMetaCue()
      Return array of cue points
      Specified by:
      getMetaCue in interface IMetaData<K,V>
      Returns:
      Array of cue points
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMap<String,Object>