javax.media
Interface PlugIn

All Known Subinterfaces:
Codec, Demultiplexer, Effect, Multiplexer, Renderer, VideoRenderer

public interface PlugIn
extends Controls

The base interface for JMF plug-ins. A PlugIn is a media processing unit that accepts data in a particular format and processes or presents the data. Plug-ins are registered through the PlugInManager.

Since:
JMF 2.0

Field Summary
static int BUFFER_PROCESSED_FAILED
          The input Buffer could not be handled.
static int BUFFER_PROCESSED_OK
          The input Buffer was converted successfully to output.
static int INPUT_BUFFER_NOT_CONSUMED
          The input Buffer chunk was not fully consumed.
static int OUTPUT_BUFFER_NOT_FILLED
          The output Buffer chunk was not filled.
static int PLUGIN_TERMINATED
          The processing of the given buffer has caused the plugin to terminate.
 
Method Summary
 void close()
          Closes the plug-in component and releases the resources it was using.
 java.lang.String getName()
          Gets the name of this plug-in as a human-readable string.
 void open()
          Opens the plug-in software or hardware component and acquires the resources that the plug-in needs to operate.
 void reset()
          Resets the state of the plug-in.
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Field Detail

BUFFER_PROCESSED_OK

public static final int BUFFER_PROCESSED_OK
The input Buffer was converted successfully to output.

BUFFER_PROCESSED_FAILED

public static final int BUFFER_PROCESSED_FAILED
The input Buffer could not be handled.

INPUT_BUFFER_NOT_CONSUMED

public static final int INPUT_BUFFER_NOT_CONSUMED
The input Buffer chunk was not fully consumed. The plug-in should update the offset + length fields of the Buffer. The plug-in will be called later with the same input Buffer.

OUTPUT_BUFFER_NOT_FILLED

public static final int OUTPUT_BUFFER_NOT_FILLED
The output Buffer chunk was not filled. The plug-in should update the offset + length fields of the Buffer. The plug-in will be called later with the same output Buffer.

PLUGIN_TERMINATED

public static final int PLUGIN_TERMINATED
The processing of the given buffer has caused the plugin to terminate. The plugin will not be able to continue further processing.
Method Detail

getName

public java.lang.String getName()
Gets the name of this plug-in as a human-readable string.
Returns:
A String that contains the descriptive name of the plug-in.

open

public void open()
          throws ResourceUnavailableException
Opens the plug-in software or hardware component and acquires the resources that the plug-in needs to operate. All required input and/or output formats have to be set on the plug-in before open is called. Buffers should not be passed into the plug-in without first calling this method.
Throws:
ResourceUnavailableException - If all of the required resources cannot be acquired.

close

public void close()
Closes the plug-in component and releases the resources it was using. No more data will be accepted by the plug-in after close is called. A closed plug-in can be reinstated by calling open again.

reset

public void reset()
Resets the state of the plug-in. The reset method is typically called if the end of media is reached or the media is repositioned.


Submit a bug or feature
Copyright 1999-2001 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.