javax.media
Interface Renderer

All Known Subinterfaces:
VideoRenderer

public interface Renderer
extends PlugIn

A Renderer is a media processing unit that renders input media to a pre-defined destination, such as the screen or system speaker. It has one input and no outputs--rendering is the final stage of the media processing pipeline.

If a Renderer implements the Clock interface, it can be used by a Player as the master time base for synchronization. In this case, the Renderer should update the media time and time-base time as it processes the media.

Since:
JMF 2.0

Fields inherited from interface javax.media.PlugIn
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
Method Summary
 Format[] getSupportedInputFormats()
          Lists the input formats supported by this Renderer.
 int process(Buffer buffer)
          Processes the data and renders it to the output device represented by this Renderer.
 Format setInputFormat(Format format)
          Sets the Format of the input data.
 void start()
          Initiates the rendering process.
 void stop()
          Halts the rendering process.
 
Methods inherited from interface javax.media.PlugIn
close, getName, open, reset
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Method Detail

getSupportedInputFormats

public Format[] getSupportedInputFormats()
Lists the input formats supported by this Renderer.
Returns:
An array of Format objects that represent the input formats supported by this Renderer.

setInputFormat

public Format setInputFormat(Format format)
Sets the Format of the input data.
Returns:
The Format that was set. This is typically the supported Format that most closely matches the specified Format. If possible, the format fields that were not specified are set to the preferred values in the returned Format. Returns null if the specified Format is not supported.

start

public void start()
Initiates the rendering process. When start is called, the renderer begins rendering any data available in its internal buffers.

stop

public void stop()
Halts the rendering process.

process

public int process(Buffer buffer)
Processes the data and renders it to the output device represented by this Renderer.
Returns:
BUFFER_PROCESSED_OK if the processing is successful. Other possible return codes are defined in PlugIn.
See Also:
PlugIn


Submit a bug or feature
Copyright 1994-2004 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.