|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--mediaframe.mpeg1.MovieScreen
The MovieScreen class represents a panel on which the movie is shown.
| Field Summary | |
boolean |
appletStarted
True if the applet is started. |
java.awt.image.ColorModel |
colorModel
The Color model for the movie picture. |
int |
currentBufferingPercent
The current "buffering" percent. |
(package private) Element |
elem
The Element object with the pixels of the current frame. |
static int |
ENDED
"Ended" state of the player. |
static int |
ErrNum
The code of last error. |
static int |
ERROR
"Error" state of the player. |
private java.awt.Font |
ERROR_FONT
The font of the text to print errors. |
private java.awt.Graphics |
graphics
The graphics context to paint the movie screen. |
private boolean |
java2_platform
Flag, eguals true, if the current JRE is java2. |
static int |
L_STOPPING
"Stopped" after locking state of the player. |
private long |
lastPts
Presentation timestamp for last frame (reqd when estimating). |
static int |
LOCKED
"Locked" state of the player. |
boolean |
movieDestroy
True if the applet's destroy method has been called. |
int |
movieState
The state of the player. |
private io_tool |
mpeg_stream
The tool for accessing the mpeg bit stream. |
static java.lang.String |
Msg
The message text of last error. |
private long |
now
The current playing time in milliseconds. |
static int |
PAUSED
"Paused" state of the player. |
private static int[] |
picLags
1/picrate, delay in milliseconds between frames. |
java.awt.Image |
Picture
The movie picture. |
static int |
PLAYED
"Played" state of the player. |
boolean |
playing
The current playing status. |
int |
post_screen_delay
The delay in milliseconds between end images to show. |
boolean |
post_screen_loop
True if end images are looped. |
private boolean |
post_started
True if movie end image animation is showing. |
java.awt.Image[] |
postImage
The array of end images. |
private int |
postImageIndex
Current image index for end images. |
int |
pre_screen_delay
The delay in milliseconds between startup images to show. |
boolean |
pre_screen_loop
True if startup images are looped. |
private boolean |
pre_started
True if the startup image animation is showing. |
java.awt.Image[] |
preImage
The array of startup images. |
private int |
preImageIndex
Current image index for startup images. |
private long |
pts
The time in milliseconds of the current frame to play. |
static int |
REBUFFERING
"Re-buffering" state of the player. |
int |
scanSize
The current size of the scan line. |
java.awt.Image |
screen
The image for double buffering. |
private java.lang.Thread |
screen_thread
The thread for playing startup or end image animation. |
java.awt.image.MemoryImageSource |
source
The producer to produce pixels for the movie picture. |
long |
startPlayingTime
The start time of the movie playback. |
long |
startPrintingBandwidth
The start time when the 'detecting bandwith' message is shown. |
long |
startTime
The start playing time. |
static int |
STARTUP
"Startup" state of the player. |
static int |
STOPPED
"Stopped" state of the player. |
private java.awt.Font |
TEXT_BI_FONT
The bold font of the text to print messages. |
private java.awt.Font |
TEXT_FONT
The font of the text to print messages. |
private MPEG1 |
videoPlayer
The main applet's object. |
private boolean |
windows_platform
Flag, eguals true, if the current os is Windows. |
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
MovieScreen(MPEG1 videoPlayer)
Constructs a MovieScreen using the specified applet object.
|
|
| Method Summary | |
private int |
getLag()
Calculates amount of intra-frame delay from current picRate. |
void |
init(io_tool _mpeg_stream)
Inits this MovieScreen object with the specified tool for accessing the mpeg bit stream. |
void |
myPaint()
Draws the movie screen. |
boolean |
nextFrame()
Pauses the movie playback or calibrates the playing time depending from the state of the player (playing, pausing, etc), the current playing time and the current time of the frame. |
void |
paint(java.awt.Graphics g)
Paints the controls and applet's detecting bandwidth/buffering text on the screen's graphics context and calls to the method that paints the movie's frame and prints other text/error messages. |
private void |
paintScreen(java.awt.Graphics g)
Paints the movie's frame on the screen's graphics context and prints text/error messages (f.e. rebuffering information or MediaFrame locked error). |
void |
repaint()
Redraws the movie screen. |
void |
run()
The main thread's method (enter point) that plays startup or end image animation of the applet. |
void |
setElement(Element _elem)
Sets the Element object with the pixels of the current frame. |
void |
start()
Starts playing startup or end image animation of the applet. |
void |
stop()
Stops playing startup or end image animation of the applet. |
void |
update(java.awt.Graphics g)
Stub, overwrites the "update()" method of Panel (does nothing). |
void |
write(java.lang.String s,
int x,
int y)
Prints the string on the screen. |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
Element elem
Element object with the pixels of the current frame.
private io_tool mpeg_stream
public java.awt.Image Picture
public java.awt.Image screen
public java.awt.image.MemoryImageSource source
public java.awt.image.ColorModel colorModel
public int scanSize
public int currentBufferingPercent
public boolean playing
public static int ErrNum
public static java.lang.String Msg
public boolean appletStarted
private int preImageIndex
private int postImageIndex
public java.awt.Image[] preImage
public java.awt.Image[] postImage
public int pre_screen_delay
public int post_screen_delay
public boolean pre_screen_loop
public boolean post_screen_loop
public long startPlayingTime
public long startPrintingBandwidth
private boolean pre_started
private boolean post_started
public static final int STARTUP
public static final int PLAYED
public static final int PAUSED
public static final int STOPPED
public static final int ENDED
public static final int ERROR
public static final int LOCKED
public static final int L_STOPPING
public static final int REBUFFERING
public int movieState
public long startTime
private java.awt.Font TEXT_FONT
private java.awt.Font TEXT_BI_FONT
private boolean windows_platform
private boolean java2_platform
private java.awt.Font ERROR_FONT
public boolean movieDestroy
private long now
private long pts
private long lastPts
private MPEG1 videoPlayer
private static int[] picLags
private java.awt.Graphics graphics
private volatile java.lang.Thread screen_thread
| Constructor Detail |
public MovieScreen(MPEG1 videoPlayer)
MovieScreen using the specified applet object.
Adds mouse listener to the applet
and if necessary fixs the netscape bug under linux platform with the italic fonts.
videoPlayer - the applet object.| Method Detail |
public void init(io_tool _mpeg_stream)
MovieScreen object with the specified tool for accessing the mpeg bit stream.
_mpeg_stream - the tool for accessing the mpeg bit stream.public void setElement(Element _elem)
Element object with the pixels of the current frame.
_elem - the Element object with the pixels of the current frame.private int getLag()
public void update(java.awt.Graphics g)
update in class java.awt.Containerg - the graphics context to paint.public void myPaint()
public void write(java.lang.String s,
int x,
int y)
s - the string to print.x - the x coordinate of the string's first character (left baseline point).y - the y coordinate of the string's first character (left baseline point).public void repaint()
repaint in class java.awt.Componentpublic void paint(java.awt.Graphics g)
paint in class java.awt.Containerg - the graphics context to paint.private void paintScreen(java.awt.Graphics g)
g - the graphics context to paint.
public boolean nextFrame()
throws java.lang.InterruptedException
java.lang.InterruptedException - raises if another process interrupts the current process.public void start()
public void run()
run in interface java.lang.Runnablepublic void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||