|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.video.ScreenPacket
public final class ScreenPacket
The ScreenVideoPacket class is used to encode or decode a frame of video data using Macromedia's ScreenVideo format.
| Constructor Summary | |
|---|---|
ScreenPacket()
Create a ScreenPacket with no image blocks. |
|
ScreenPacket(boolean key,
int imgWidth,
int imgHeight,
int blkWidth,
int blkHeight,
List<ImageBlock> blocks)
Creates a ScreenVideoPacket. |
|
ScreenPacket(byte[] data)
Decode a screen packet from a block of data. |
|
ScreenPacket(ScreenPacket object)
Creates and initialises a ScreenPacket object using the values copied from another ScreenPacket object. |
|
| Method Summary | |
|---|---|
ScreenPacket |
add(ImageBlock block)
Add an image block to the array that make up the frame. |
ScreenPacket |
copy()
Creates a complete copy of this object. |
byte[] |
encode()
Encode this ScreenPacket. |
int |
getBlockHeight()
Get the height of the blocks in pixels. |
int |
getBlockWidth()
Get the width of the blocks in pixels. |
List<ImageBlock> |
getImageBlocks()
Get the image blocks that have changed in this frame. |
int |
getImageHeight()
Get the height of the frame in pixels. |
int |
getImageWidth()
Get the width of the frame in pixels. |
boolean |
isKeyFrame()
Does the packet contains a key frame. |
void |
setBlockHeight(int height)
Sets the height of the image blocks. |
void |
setBlockWidth(int width)
Sets the width of the image blocks. |
void |
setImageBlocks(List<ImageBlock> blocks)
Set the image blocks that have changed in this frame. |
void |
setImageHeight(int height)
Set the height of the frame in pixels. |
void |
setImageWidth(int width)
Sets the width of the frame. |
void |
setKeyFrame(boolean key)
Sets whether the frame is a key frame (true) or normal one (false). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenPacket(byte[] data)
throws IOException
data - the encoded screen packet data.
IOException - if the data cannot be decoded.public ScreenPacket()
public ScreenPacket(boolean key,
int imgWidth,
int imgHeight,
int blkWidth,
int blkHeight,
List<ImageBlock> blocks)
key - indicates whether the packet contains a key frame.imgWidth - the width of the frame.imgHeight - the height of the frame.blkWidth - the width of the blocks that make up the frame.blkHeight - the height of the blocks that make up the frame.blocks - the array of ImageBlocks that make up the frame.public ScreenPacket(ScreenPacket object)
object - a ScreenPacket object from which the values will be
copied.| Method Detail |
|---|
public ScreenPacket add(ImageBlock block)
block - an ImageBlock. Must not be null.
public boolean isKeyFrame()
public void setKeyFrame(boolean key)
key - a boolean value indicating whether the frame is key (true) or
normal (false.public int getImageWidth()
public void setImageWidth(int width)
width - the width of the frame in pixels.public int getImageHeight()
public void setImageHeight(int height)
height - the image height.public int getBlockWidth()
public void setBlockWidth(int width)
width - the width of the blocks in pixels.public int getBlockHeight()
public void setBlockHeight(int height)
height - the height of the blocks in pixels.public List<ImageBlock> getImageBlocks()
public void setImageBlocks(List<ImageBlock> blocks)
blocks - the array of image blocks. Must not be null.public ScreenPacket copy()
copy in interface Copyable<ScreenPacket>
public byte[] encode()
throws IOException
IOException - if there is an error encoding the blocks.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||