Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.flagstone.transform
Class FSVideoData

    java.lang.Object
      com.flagstone.transform.FSVideoObject
          com.flagstone.transform.FSVideoData

All Implemented Interfaces:
  java.lang.Cloneable

    public final class FSVideoData

extends FSVideoObject

The FSVideoData class is used to store the data for a single video frame.

Attributes
timestamp | The time in milliseconds at which the sound 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.
codec | Identifies the format of the video data. FSVideo.H263 represents data encoded using the Sorenson modified H263 format.
frameType | The type of frame being displayed, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional.
data | The encoded video data.

# History

The FSVideoData class represents the FLV Tag with the Video Data section from Macromedia's Flash (SWF) File Format Specification. It was added in Flash Video 1 with support for the Sorenson modified H263 format. Support for Macromedia's ScreenVideo format was added when Flash 7 was released.

Field Summary

Fields inherited from class com.flagstone.transform.FSVideoObject
`AudioData, length, MetaData, timestamp, type, VideoData`

Constructor Summary
`FSVideoData(int timestamp, int format, int type, byte[] data)` Constructs a new FSVideoData object specifying the time which the video should be displayed, the video data and the format used to encode it and the type of frame that the video represents - either a key frame, regular frame or an optional frame which can be discarded (H263 format only).

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` | `getCodec()` Gets the scheme used to encode the video data, either FSVideo.H263 for data that was encoded using the modified Sorenson H263 format or FSVideo.ScreenVideo for video that was encoded using Macromedia's ScreenVideo format.
`byte[]` | `getData()` Get the encoded video data.
`int` | `getFrameType()` Gets the type of frame that will be displayed, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional.
`void` | `setCodec(int format)` Sets the format used to encode the video data, either FSVideo.H263 for data that was encoded using the modified Sorenson H263 format or FSVideo.ScreenVideo for video that was encoded using Macromedia's ScreenVideo format.
`void` | `setData(byte[] data)` Sets the encoded video data for the frame.
`void` | `setFrameType(int type)` Sets the type of frame type indicating whether it is a key frame (FSVideo.KeyFrame), a normal frame (FSVideo.Frame) displayed between key frames other whether display of the frame is optional ( FSVideo.Optional).

Methods inherited from class com.flagstone.transform.FSVideoObject
`getTimestamp, getType, name, setTimestamp`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FSVideoData

    public FSVideoData(int timestamp,
                       int format,
                       int type,
                       byte[] data)

  Constructs a new FSVideoData object specifying the time which the video should be displayed, the video data and the format used to encode it and the type of frame that the video represents - either a key frame, regular frame or an optional frame which can be discarded (H263 format only).

  Parameters:
    `timestamp` - the time in milliseconds at which the data should be played.
    `format` - the format used to encode the video either FSVideo.H263 or FSVideo.ScreenVideo.
    `type` - the type of frame being displayed, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional.
    `data` - an array of bytes containing the video encoded using the format indicated in the codec attribute, either FSVideo.H263 or FSVideo.ScreenVideo.

Method Detail

### getCodec

    public int getCodec()

  Gets the scheme used to encode the video data, either FSVideo.H263 for data that was encoded using the modified Sorenson H263 format or FSVideo.ScreenVideo for video that was encoded using Macromedia's ScreenVideo format.

  Returns:
    the format used to encode the video either FSVideo.H263 or FSVideo.ScreenVideo.

### setCodec

    public void setCodec(int format)

  Sets the format used to encode the video data, either FSVideo.H263 for data that was encoded using the modified Sorenson H263 format or FSVideo.ScreenVideo for video that was encoded using Macromedia's ScreenVideo format.

  Parameters:
    `format` - the format used to encode the video either FSVideo.H263 or FSVideo.ScreenVideo.

### getFrameType

    public int getFrameType()

  Gets the type of frame that will be displayed, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional. The latter is used only to indicate disposable frame and is only used with the Sorenson modified H263 format.

  Returns:
    the type of frame, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional.

### setFrameType

    public void setFrameType(int type)

  Sets the type of frame type indicating whether it is a key frame (FSVideo.KeyFrame), a normal frame (FSVideo.Frame) displayed between key frames other whether display of the frame is optional ( FSVideo.Optional). The latter is used only with video encoded using the Sorenson modified H263 format.

  Parameters:
    `type` - the type of frame being displayed, either FSVideo.KeyFrame, FSVideo.Frame or FSVideo.Optional.

### getData

    public byte[] getData()

  Get the encoded video data.

  Returns:
    an array of bytes encoded using the format indicated in the codec attribute, either FSVideo.H263 or FSVideo.ScreenVideo.

### setData

    public void setData(byte[] data)

  Sets the encoded video data for the frame.

  Parameters:
    `data` - an array of bytes containing the video encoded using the format indicated in the codec attribute, either FSVideo.H263 or FSVideo.ScreenVideo.

### clone

    public java.lang.Object clone()

  Description copied from class: `FSVideoObject`
  Creates a deep copy of the entire object.

  Overrides:
    `clone` in class `FSVideoObject`
  Returns:
    a copy of the object.

### equals

    public boolean equals(java.lang.Object anObject)

  Overrides:
    `equals` in class `FSVideoObject`

### appendDescription

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

  Overrides:
    `appendDescription` in class `FSVideoObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD