com.flagstone.transform
Class FSVideoObject

java.lang.Object
  extended by com.flagstone.transform.FSVideoObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
FSAudioData, FSVideoData, FSVideoMetaData

public abstract class FSVideoObject
extends java.lang.Object
implements java.lang.Cloneable

The FSVideoObject is the root class for objects that represent each of the tagged data structures that make up the Flash Video file format specification. Each of the major data structures defined in the Flash file format specification start with a header that contains the type identifying the data structure followed by the number of bytes that the body of the encoded data structure occupies in the file. The FSVideoObject manages the encoding and decoding of this information. This class is primarily used internally in the library however the getType() method is useful when manipulating decoded video files. Rather than using the runtime type checking provided in the Java environment the method can be used to identify the class, derived from FSVideoObject, that represents each data structure, improving performance.


Field Summary
static int AudioData
          Type identifying objects containing sound
protected  int length
           
static int MetaData
          Type identifying objects containing meta-data
protected  int timestamp
           
protected  int type
           
static int VideoData
          Type identifying objects containing video
 
Constructor Summary
FSVideoObject(int type, int timestamp)
          Constructs a movie object with the specified type.
 
Method Summary
 void appendDescription(java.lang.StringBuffer buffer, int depth)
           
 java.lang.Object clone()
          Creates a deep copy of the entire object.
 boolean equals(java.lang.Object anObject)
           
 int getTimestamp()
          Gets the timestamp, in milliseconds, relative to the start of the file, when the audio or video will be played.
 int getType()
          Gets the code used that identifies the type of the object when it is encoded.
 java.lang.String name()
          Return the name of the class without the package prefix.
 void setTimestamp(int time)
          Sets the timestamp, in milliseconds, relative to the start of the file, when the audio or video will be played.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AudioData

public static final int AudioData
Type identifying objects containing sound

See Also:
Constant Field Values

VideoData

public static final int VideoData
Type identifying objects containing video

See Also:
Constant Field Values

MetaData

public static final int MetaData
Type identifying objects containing meta-data

See Also:
Constant Field Values

type

protected int type

length

protected int length

timestamp

protected int timestamp
Constructor Detail

FSVideoObject

public FSVideoObject(int type,
                     int timestamp)
Constructs a movie object with the specified type. The timestamp identifies the time, in milliseconds, relative to the start of the file that the audio or video will be played. The timestamp is used exclusively for determining when sound or video will be played. Any internal timing information in the audio or video data is ignored.

Parameters:
type - an identifier indicating the type of movie object.
timestamp - the time in milliseconds at which the data should be played.
Method Detail

getType

public int getType()
Gets the code used that identifies the type of the object when it is encoded.

Returns:
the code used to denote the type of the object.

getTimestamp

public int getTimestamp()
Gets the timestamp, in milliseconds, relative to the start of the file, when the audio or video will be played.

Returns:
the time when the data will be played.

setTimestamp

public void setTimestamp(int time)
Sets the timestamp, in milliseconds, relative to the start of the file, when the audio or video will be played.

Parameters:
time - the time in milliseconds relative to the start of the file.

equals

public boolean equals(java.lang.Object anObject)
Overrides:
equals in class java.lang.Object

name

public java.lang.String name()
Return the name of the class without the package prefix. This method is used when logging events to identify the object being encoded or decoded.

Returns:
the name of the class, e.g. FSDefineShape.

clone

public java.lang.Object clone()
Creates a deep copy of the entire object.

Overrides:
clone in class java.lang.Object
Returns:
a copy of the object.

appendDescription

public void appendDescription(java.lang.StringBuffer buffer,
                              int depth)