public class JAWTRenderer extends AbstractRenderer<javax.media.format.VideoFormat> implements javax.media.renderer.VideoRenderer
inputFormat
EMPTY_CONTROLS
Constructor and Description |
---|
JAWTRenderer()
Initializes a new JAWTRenderer instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addNotify(long handle,
java.awt.Component component) |
void |
close()
Closes this PlugIn and releases the resources it has retained
during its execution.
|
java.awt.Rectangle |
getBounds()
Gets the region in the component of this VideoRenderer where the
video is rendered.
|
java.awt.Component |
getComponent()
Gets the AWT Component into which this VideoRenderer
draws.
|
long |
getHandle()
Gets the handle to the native counterpart of this JAWTRenderer.
|
java.lang.Object |
getHandleLock()
Gets the Object which synchronizes the access to the handle to
the native counterpart of this JAWTRenderer.
|
java.lang.String |
getName()
Gets the human-readable name of this PlugIn.
|
javax.media.Format[] |
getSupportedInputFormats()
Gets the list of input Formats supported by this
Renderer.
|
void |
open()
Opens this PlugIn and acquires the resources that it needs to
operate.
|
(package private) static boolean |
paint(long handle,
java.awt.Component component,
java.awt.Graphics g,
int zOrder)
Paints a specific Component which is the AWT Component
of a JAWTRenderer specified by the handle to its native
counterpart.
|
int |
process(javax.media.Buffer buffer)
Processes the data provided in a specific Buffer and renders it
to the output device represented by this Renderer.
|
(package private) static boolean |
process(long handle,
java.awt.Component component,
int[] data,
int offset,
int length,
int width,
int height)
Processes the data provided in a specific int array with a
specific offset and length and renders it to the output device
represented by a JAWTRenderer specified by the handle to it
native counterpart.
|
(package private) static void |
removeNotify(long handle,
java.awt.Component component) |
void |
setBounds(java.awt.Rectangle bounds)
Sets the region in the component of this VideoRenderer where the
video is to be rendered.
|
boolean |
setComponent(java.awt.Component component)
Sets the AWT Component into which this VideoRenderer is
to draw.
|
javax.media.Format |
setInputFormat(javax.media.Format format)
Sets the Format of the input to be processed by this
Renderer.
|
void |
start()
Starts the rendering process.
|
void |
stop()
Stops the rendering process.
|
reset, useThreadPriority
getControls
getControl, getControl, queryInterface, queryInterface
static void addNotify(long handle, java.awt.Component component)
static boolean paint(long handle, java.awt.Component component, java.awt.Graphics g, int zOrder)
handle
- the handle to the native counterpart of a
JAWTRenderer which is to draw into the specified AWT
Componentcomponent
- the AWT Component into which the
JAWTRenderer and its native counterpart specified by
handle are to draw. The platform-specific info of
component is guaranteed to be valid only during the execution of
paint.g
- the Graphics context into which the drawing is to be
performedzOrder
- static boolean process(long handle, java.awt.Component component, int[] data, int offset, int length, int width, int height)
handle
- the handle to the native counterpart of a
JAWTRenderer to process the specified data and render itcomponent
- the AWT component into which the specified
JAWTRenderer and its native counterpart drawdata
- an int array which contains the data to be processed
and renderedoffset
- the index in data at which the data to be
processed and rendered startslength
- the number of elements in data starting at
offset which represent the data to be processed and renderedwidth
- the width of the video frame in dataheight
- the height of the video frame in datastatic void removeNotify(long handle, java.awt.Component component)
public void close()
close
in interface javax.media.PlugIn
public java.awt.Rectangle getBounds()
getBounds
in interface javax.media.renderer.VideoRenderer
public java.awt.Component getComponent()
getComponent
in interface javax.media.renderer.VideoRenderer
public long getHandle()
public java.lang.Object getHandleLock()
public java.lang.String getName()
getName
in interface javax.media.PlugIn
public javax.media.Format[] getSupportedInputFormats()
getSupportedInputFormats
in interface javax.media.Renderer
public void open() throws javax.media.ResourceUnavailableException
open
in interface javax.media.PlugIn
javax.media.ResourceUnavailableException
- if there is a problem during openingpublic int process(javax.media.Buffer buffer)
process
in interface javax.media.Renderer
buffer
- a Buffer containing the data to be processed and
renderedpublic void setBounds(java.awt.Rectangle bounds)
setBounds
in interface javax.media.renderer.VideoRenderer
bounds
- the region in the component of this VideoRenderer
where the video is to be rendered; null if the entire component
is to be usedpublic boolean setComponent(java.awt.Component component)
setComponent
in interface javax.media.renderer.VideoRenderer
component
- the AWT Component into which this
VideoRenderer is to drawpublic javax.media.Format setInputFormat(javax.media.Format format)
setInputFormat
in interface javax.media.Renderer
setInputFormat
in class AbstractRenderer<javax.media.format.VideoFormat>
format
- the Format to be set as the Format of the
input to be processed by this Rendererpublic void start()
start
in interface javax.media.Renderer
public void stop()
stop
in interface javax.media.Renderer
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.