mediaframe.mpeg1
Class DataFrame

java.lang.Object
  |
  +--mediaframe.mpeg1.DataFrame
Direct Known Subclasses:
AudioFrame, VideoFrame

public class DataFrame
extends java.lang.Object

The DataFrame class represents one frame of video or audio data. It contains the link to the first DataBlock with movie's data.


Field Summary
protected  boolean _eof
          True, if the end of movie's file has been reached.
protected  long _time_stamp
          The current time stamp of the frame.
protected  int _type
          The type of the data frame.
static int B_FRAME
          B video frame type.
protected  int file_position
          The file position of the frame.
private  DataBlock firstDataBlock
          The first DataBlock in the list of frame's data blocks.
static int GOP_START
          GOP_START (start of group of pictutes) header frame type.
static int I_FRAME
          I video frame type.
static long MASK
          0xFFFFFFFF (4 bytes) mask for the input data.
static int P_FRAME
          P video frame type.
static int SEQ_START
          SEQ_START (start of sequence) header frame type.
 int size
          The size of this frame in bytes.
static int TYPE_AUDIO
          Audio frame type.
 
Constructor Summary
DataFrame(long time, int file_position)
          Constructs an empty DataFrame with the specified time stamp and file position.
 
Method Summary
 int getFilePosition()
          Gets the file position of the frame.
 DataBlock getFirstDataBlock()
          Gets the first DataBlock in the list of frame's data blocks.
 long getTimeStamp()
          Gets the time stamp of the frame.
 int getType()
          Gets the type of the frame.
 void setType(int type)
          Sets the type of the frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

I_FRAME

public static final int I_FRAME
I video frame type.

See Also:
Constant Field Values

P_FRAME

public static final int P_FRAME
P video frame type.

See Also:
Constant Field Values

B_FRAME

public static final int B_FRAME
B video frame type.

See Also:
Constant Field Values

TYPE_AUDIO

public static final int TYPE_AUDIO
Audio frame type.

See Also:
Constant Field Values

SEQ_START

public static final int SEQ_START
SEQ_START (start of sequence) header frame type.

See Also:
Constant Field Values

GOP_START

public static final int GOP_START
GOP_START (start of group of pictutes) header frame type.

See Also:
Constant Field Values

MASK

public static final long MASK
0xFFFFFFFF (4 bytes) mask for the input data.

See Also:
Constant Field Values

_type

protected int _type
The type of the data frame.


firstDataBlock

private DataBlock firstDataBlock
The first DataBlock in the list of frame's data blocks.


_time_stamp

protected long _time_stamp
The current time stamp of the frame.


file_position

protected int file_position
The file position of the frame.


size

public int size
The size of this frame in bytes.


_eof

protected boolean _eof
True, if the end of movie's file has been reached.

Constructor Detail

DataFrame

public DataFrame(long time,
                 int file_position)
Constructs an empty DataFrame with the specified time stamp and file position.

Parameters:
time - the time stamp of the frame.
file_position - the file position of the frame.
Method Detail

getType

public int getType()
Gets the type of the frame.

Returns:
the type of the frame.

setType

public void setType(int type)
Sets the type of the frame.

Parameters:
type - the type to set.

getFirstDataBlock

public DataBlock getFirstDataBlock()
Gets the first DataBlock in the list of frame's data blocks.

Returns:
the first DataBlock in the list of frame's data blocks.

getTimeStamp

public long getTimeStamp()
Gets the time stamp of the frame.

Returns:
the time stamp of the frame.

getFilePosition

public int getFilePosition()
Gets the file position of the frame.

Returns:
the file position of the frame.