javax.media
Interface PlugIn

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

public abstract interface PlugIn
extends Controls

A base interface for all plug-in classes. A JMF PlugIn is a media processing unit that accepts data in a particular format and processes or presents the data. PlugIns are registered using 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 consumed fully.
static int OUTPUT_BUFFER_NOT_FILLED
          The output buffer chunk was not filled.
 
Method Summary
 void close()
          Closes the plug-in component and releases resources.
 java.lang.String getName()
          Returns a descriptive name for the plug-in.
 void open()
          Opens the plug-in software or hardware component and acquires necessary resources.
 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 consumed fully. The plug-in should update the offset + length fields of the Buffer object. The plug-in would 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 object. The plug-in would be called later with the same output buffer.
Method Detail

getName

public java.lang.String getName()
Returns a descriptive name for the plug-in. This is a user readable string.

open

public void open()
          throws ResourceUnavailableException
Opens the plug-in software or hardware component and acquires necessary resources. If all the needed resources could not be acquired, it throws a ResourceUnavailableException. Buffers should not be passed into the plug-in without first calling this method. All required input and/or output formats have to be set on the plug-in before open is called.

close

public void close()
Closes the plug-in component and releases resources. No more data will be accepted by the plug-in after a call to this method. The plug-in can be reinstated after being closed by calling open.

reset

public void reset()
Resets the state of the plug-in. Typically at end of media or when media is repositioned.