org.mobicents.media
Class Frame

java.lang.Object
  extended by org.mobicents.media.Frame
All Implemented Interfaces:
java.io.Serializable

public class Frame
extends java.lang.Object
implements java.io.Serializable

Author:
kulikov
See Also:
Serialized Form

Constructor Summary
Frame(byte[] data, double duration)
          Creates new instance of media frame.
 
Method Summary
 byte[] getData()
          Gets media data.
 double getDuration()
          Gets duration of this frame.
 java.lang.Object getMediaData()
          Gets the reference to MetaData object which describes this frame.
 void setData(byte[] data)
          Modifies media data associated with this frame.
 void setMetaData(java.lang.Object metaData)
          Assigns meta data with this frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Frame

public Frame(byte[] data,
             double duration)
Creates new instance of media frame.

Parameters:
data - the media data.
duration - the duration of media frame.
Method Detail

getMediaData

public java.lang.Object getMediaData()
Gets the reference to MetaData object which describes this frame.

Returns:
the meta data object or null if not asigned.

setMetaData

public void setMetaData(java.lang.Object metaData)
Assigns meta data with this frame.

Parameters:
metaData - the metadata object.

getData

public byte[] getData()
Gets media data.

Returns:
array of bytes which holds media data.

setData

public void setData(byte[] data)
Modifies media data associated with this frame.

Parameters:
data - the media data.

getDuration

public double getDuration()
Gets duration of this frame.

Returns:
the duration in milliseconds.


Copyright © 2010. All Rights Reserved.