|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.PlugInManager | +--javax.media.pim.PlugInManager
This is a PlugIn manager used to search for installed plug-ins and to register new plug-ins.
The recognized plug-in types are listed below. Other custom plug-in types can also be registered.
"demultiplexer"
"codec"
"renderer"
"multiplexer"
"effect"
Field Summary |
Fields inherited from class javax.media.PlugInManager |
CODEC, DEMULTIPLEXER, EFFECT, MULTIPLEXER, RENDERER |
Constructor Summary | |
PlugInManager()
PlugInManager implementation |
Method Summary | |
static boolean |
addPlugIn(java.lang.String className,
Format[] in,
Format[] out,
int type)
Registers a new plug-in. |
static void |
commit()
Commits any changes made to the plug-in list. |
(package private) static java.lang.Class |
getClassForName(java.lang.String className)
|
static java.util.Vector |
getPlugInList(Format input,
Format output,
int type)
Builds a list of plug-ins that satisfy the specified input and output formats. |
static Format[] |
getSupportedInputFormats(java.lang.String className,
int type)
Gets a list of the input formats that the specified plug-in supports. |
static Format[] |
getSupportedOutputFormats(java.lang.String className,
int type)
Gets a list of the output formats that the specified plug-in supports. |
static boolean |
removePlugIn(java.lang.String className,
int type)
Removes an existing plug-in from the registry. |
static void |
setPlugInList(java.util.Vector pluginList,
int type)
Sets the search order for the list of plug-ins. |
Methods inherited from class javax.media.PlugInManager |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PlugInManager()
Method Detail |
static java.lang.Class getClassForName(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.util.Vector getPlugInList(Format input, Format output, int type)
input
is null, then
it returns a list of plug-ins that match the output format and
vice-versa.
input
- The input Format
to be supported by the plug-in.output
- The output Format
to be generated by the plug-in.type
- The type of plug-in to search for, for example:
DEMULTIPLEXER
, CODEC
, EFFECT
,
MULTIPLEXER
, or RENDERER
.
Vector
that contains the plug-in list.public static void setPlugInList(java.util.Vector pluginList, int type)
commit
is
called.
pluginList
- A Vector
that lists the plug-ins in the order that they
should be searched.type
- The type of plug-in contained in the search list, for example:
DEMULTIPLEXER
, CODEC
, EFFECT
,
MULTIPLEXER
, or RENDERER
.commit()
public static void commit() throws java.io.IOException
java.io.IOException
public static boolean addPlugIn(java.lang.String className, Format[] in, Format[] out, int type)
commit
has to be called to make this
addition permanent.
className
- class name of the plug-in classin
- list of supported input formatsout
- list of supported output formatstype
- the plug-in type
true
if the plug-in is registered successfully, false
if it could
not be registered.public static boolean removePlugIn(java.lang.String className, int type)
commit
has
to be called to make this change permanent.
className
- A String
that contains the class name of the plug-in to be removed.type
- The type of the new plug-in, for example:
DEMULTIPLEXER
, CODEC
, EFFECT
,
MULTIPLEXER
, or RENDERER
.
true
if the plug-in is succesfully removed, false
if
no plug-in with the specified name could be found.public static Format[] getSupportedInputFormats(java.lang.String className, int type)
PlugInManager
className
- The plug-in class name. For example: com.sun.media.codec.MPEG
type
- The type of the specified plug-in, for example:
DEMULTIPLEXER
, CODEC
, EFFECT
,
MULTIPLEXER
, or RENDERER
.
Format
objects that the specified plug-in can accept
as input. Returns an array of zero elements if
specified plug-in is not registered or has no inputs.public static Format[] getSupportedOutputFormats(java.lang.String className, int type)
PlugInManager
className
- The plug-in class name. For example: com.sun.media.codec.MPEG
type
- The type of the specified plug-in, for example:
DEMULTIPLEXER
, CODEC
, EFFECT
,
MULTIPLEXER
, or RENDERER
.
Format
objects that the specified plug-in can generate
as output. Returns an array of zero elements if
specified plug-in is not registered or has no outputs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |