|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.FSVideo
public final class FSVideo
FSVideo is a container class for the objects that represents the data structures in a Flash video file. It is very similar to the FSMovie class for flash (.swf) files and provides a simple API for decoding and encoding files and accessing the objects that represent the different data structures used for audio and video data.
Field Summary | |
---|---|
static int |
Frame
Indicates a frame is a normal frame (one displayed between key frames) in the video stream. |
static int |
H263
Indicates that the video data was encoded using the Sorenson modified H263 format. |
static int |
KeyFrame
Indicates a frame is a key frame in the video stream. |
static int |
Optional
Indicates a frame is an optional frame - one that may be deleted to maintain real-time display of the video stream. |
static int |
ScreenVideo
Indicates that the video data was encoded using Macromedia's ScreenVideo format. |
Constructor Summary | |
---|---|
FSVideo()
Constructs an FSVideo object with no objects. |
|
FSVideo(byte[] data)
Constructs an FSVideo object and decodes the binary data presented in the byte array to generate an array of objects representing the Flash Video data. |
|
FSVideo(java.lang.String fileName)
Constructs an FSVideo object and decodes the contents of the specified file to generate an array of objects representing the video file. |
Method Summary | |
---|---|
void |
add(java.util.ArrayList array)
Adds the array of object to the Video. |
void |
add(FSVideoObject anObject)
Adds the object to the Movie. |
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. |
java.lang.Object |
clone()
Creates a deep copy of the entire video. |
void |
decodeFromData(byte[] bytes)
Decodes the binary Flash Video data stored in the byte array. |
void |
decodeFromFile(java.lang.String fileName)
Decodes the contents of the specified file. |
byte[] |
encode()
Returns the encoded representation of the array of objects that this Video contains. |
void |
encodeToFile(java.lang.String fileName)
Encodes the array of objects and writes the data to the specified file. |
boolean |
equals(java.lang.Object anObject)
Returns true if anObject is equal to this one. |
java.util.ArrayList |
getObjects()
Gets the array of video objects. |
int |
getVersion()
Gets the number representing the version of Flash Video that the video represents. |
void |
setObjects(java.util.ArrayList anArray)
Sets the array of objects contained in the Movie. |
void |
setVersion(int aNumber)
Sets the Flash Video version. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int H263
public static final int ScreenVideo
public static final int KeyFrame
public static final int Frame
public static final int Optional
Constructor Detail |
---|
public FSVideo()
public FSVideo(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException, java.util.zip.DataFormatException
fileName
- the path to the Flash Video file that will be parsed.
java.io.FileNotFoundException
- -
if an error occurs while reading the file.
java.util.zip.DataFormatException
- -
if the file does not contain Flash data.
java.io.IOException
- -
if an error occurs while reading and decoding the file.public FSVideo(byte[] data) throws java.io.IOException, java.util.zip.DataFormatException
data
- an array of bytes containing the Flash Video binary data.
java.util.zip.DataFormatException
- -
if the file does not contain Flash data.
java.io.IOException
- -
if an error occurs while reading and decoding the data.Method Detail |
---|
public int getVersion()
public void setVersion(int aNumber)
aNumber
- the version of the Flash Video file format that this object
utilises.public java.util.ArrayList getObjects()
public void setObjects(java.util.ArrayList anArray)
anArray
- the array of objects that describe a coder.public void add(FSVideoObject anObject)
anObject
- the object to be added to the coder.public void add(java.util.ArrayList array)
array
- an array of FSVideoObjects that will be added to the video in
the order they are in the array.public void decodeFromFile(java.lang.String fileName) throws java.io.FileNotFoundException, java.util.zip.DataFormatException, java.io.IOException
fileName
- the path to the Flash Video file that will be parsed.
java.io.FileNotFoundException
- -
if an error occurs while reading the file.
java.util.zip.DataFormatException
- -
if the file does not contain Flash data.
java.io.IOException
- -
if an error occurs while reading and decoding the file.public void decodeFromData(byte[] bytes) throws java.util.zip.DataFormatException, java.io.IOException
bytes
- an array of bytes that contain the encoded Flash Video
objects.
java.util.zip.DataFormatException
- -
if the file does not contain Flash data.
java.io.IOException
- -
if an error occurs while reading and decoding the file.public void encodeToFile(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
fileName
- the path to the file that the video will be encoded to.
java.io.FileNotFoundException
- -
if an error occurs while reading the file.
java.io.IOException
- -
if an error occurs while encoding and writing the file.public byte[] encode() throws java.io.IOException
java.io.IOException
- if an error occurs while the data is being decoded.public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
public void appendDescription(java.lang.StringBuffer buffer, int depth)
buffer
- a StringBuffer to which the description of each object is
appended.depth
- the maximum level of nesting up to which objects will be
displayed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |