|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mediaframe.mpeg1.Element
The class "Element" stores the information of a single frame. Exactly "MAXELEMENT" objects of this class exist in an array "EL_ARR[]" which is used in wrap around manner. The pixels are given as YUV values and they are then translated into the Java-AWT RGB model.
| Field Summary | |
private static int |
CB_DIFF_FAC
The coefficient for Cb value for G color calculation (0.34414 * 2^12). |
private static int |
CB_FAC
The coefficient for Cb value for B color calculation (1.772*2^12). |
private static int |
CR_DIFF_FAC
The coefficient for Cr value for G color calculation (0.71414 * 2^12). |
private static int |
CR_FAC
The coefficient for Cr value for R color calculation (1.402*2^12). |
private static int |
CY_FAC
The coefficient for Y' value for colors calculation (1.023*2^12). |
int |
Frame_idx
Notice the frame number (display order). |
int |
Frame_type
The type of the frame (I, B or P). |
private int |
h
The height dimension of the frame pixels array. |
private int |
picRate
The amount of frames per second. |
int[] |
Pix_Map
The pixels in Java RGB model. |
private long |
pts
Presentation timestamp (in milliseconds). |
private int |
sc_x
The width screen dimension. |
private int |
sc_y
The height screen dimension. |
private boolean |
scaled_x
Flag, indicates that the frame should be scaled by width. |
private boolean |
scaled_y
Flag, indicates that the frame should be scaled by height. |
private long |
step_x
The x step (equals to w / sc_x) between pixel columns. |
private long |
step_y
The y step (equals to h / sc_y) between pixel rows. |
private int |
w
The width dimension of the frame pixels array. |
| Constructor Summary | |
(package private) |
Element(MPEG1 app,
java.awt.image.ColorModel cm,
int w,
int h,
int o_w,
int o_h,
int sc_x,
int sc_y)
Constructs an Element object.
|
| Method Summary | |
protected int |
getPicRate()
Gets the amount of frames per second value. |
protected long |
getPts()
Gets the time in milliseconds that this element is to be displayed. |
void |
Make_Picture(int[][] Pixels)
The method "Make_Picture" is called every time the scanner has decoded a frame. |
protected void |
setPicRate(int _picRate)
Sets the amount of frames per second. |
protected void |
setPts(long presentation_time_stamp)
Sets the time in milliseconds that this element is to be displayed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int Frame_idx
public int Frame_type
public int[] Pix_Map
private static final int CY_FAC
private static final int CR_FAC
private static final int CB_FAC
private static final int CR_DIFF_FAC
private static final int CB_DIFF_FAC
private int w
private int h
private boolean scaled_x
private boolean scaled_y
private int sc_x
private int sc_y
private long step_x
private long step_y
private long pts
private int picRate
| Constructor Detail |
Element(MPEG1 app,
java.awt.image.ColorModel cm,
int w,
int h,
int o_w,
int o_h,
int sc_x,
int sc_y)
Element object.
Notices the frame sizes and produces an image and an array to store the RGB pixel values.
The Applet (app) object is necessary to call the "createImage" routine.
app - the applet (app) object.cm - the color model of the screen (RGB).w - the width dimension of the frame pixels array.h - the height dimension of the frame pixels array.o_w - the width dimension of the movie frame.o_h - the height dimension of the movie frame.sc_x - the width screen dimension.sc_y - the height screen dimension.| Method Detail |
protected long getPts()
protected void setPts(long presentation_time_stamp)
presentation_time_stamp - the time in milliseconds to set.protected void setPicRate(int _picRate)
_picRate - the amount of frames per second to set.protected int getPicRate()
public void Make_Picture(int[][] Pixels)
Pixels - the array of pixels as YUV values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||