|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.microedition.amms.GlobalManager
public class GlobalManager
The GlobalManager handles the creation of
EffectModules, SoundSource3Ds and MediaProcessors.
Furthermore, a Spectator can be get from the GlobalManager.
GlobalManager has similar methods as
Controllable has.
It is supposed that
implementations mostly return different subclasses of
EffectControl. These effects will be treated as
global effects concerning all the Players of the application.
Global VolumeControl fetched from
GlobalManager does not send any
VOLUME_CHANGED events to PlayerListeners
(since no global listener mechanism exists).
| Method Summary | ||
|---|---|---|
static EffectModule |
createEffectModule()
Creates an EffectModule. |
|
static MediaProcessor |
createMediaProcessor(String inputType)
Creates a MediaProcessor object. |
|
static SoundSource3D |
createSoundSource3D()
Creates a SoundSource3D. |
|
static Control |
getControl(String controlType)
Obtain the object that implements the specified Control interface. |
|
static Control[] |
getControls()
Obtain the collection of Controls
from the GlobalManager. |
|
static Spectator |
getSpectator()
Gets the Spectator, which represents the listener
in the virtual acoustical space. |
|
static String[] |
getSupportedMediaProcessorInputTypes()
Gets the supported MediaProcessor input content types. |
|
static String[] |
getSupportedSoundSource3DPlayerTypes()
Gets the supported player content types that can be added to a SoundSource3D. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Control[] getControls()
Controls
from the GlobalManager.
Since the GlobalManager can implement multiple
Control interfaces, it is necessary
to check each object against different Control types. For example:
Control cs[]; cs = GlobalManager.getControls(); for (int i = 0; i < cs.length; i++) {if (cs[i] instanceof ControlTypeA)doSomethingA();if (cs[i] instanceof ControlTypeB)doSomethingB();// etc. }
The list of Control objects returned
will not contain any duplicates and the list will not
change over time.
If no Control is supported, a zero length
array is returned.
Control objectspublic static Control getControl(String controlType)
Control interface.
If the specified Control interface is not supported,
then null is returned.
controlType - @return the object that implements the control,
or nullthe class name of the Control.
The class name
should be given either as the fully-qualified name of the class;
or if the package of the class is not given, the package
javax.microedition.media.control is assumed.
IllegalArgumentException - if controlType is null
public static EffectModule createEffectModule()
throws MediaException
EffectModule.
MediaException is thrown if EffectModules are not supported at all.
If they are supported creation will always succeed but the number of active EffectModules,
ones containing a Player in PREFETCHED or STARTED state,
can be limited by the implementation.
EffectModule object that may be used to group Players
MediaException - if creation of EffectModules
is not supported.
public static SoundSource3D createSoundSource3D()
throws MediaException
SoundSource3D.
SoundSource3D object that represents
a virtual sound source and that may be used to group
Players
MediaException - if creation of SoundSource3Ds
is not supportedpublic static String[] getSupportedSoundSource3DPlayerTypes()
SoundSource3D.
Format Definitions for JSR-234 specifies constants (in its "Format" column) for content types
commonly used with
SoundSource3D.
Players supported by SoundSource3D (e.g. "audio/midi") and of device and capture locators that can
be used to create Players supported by
SoundSource3D (e.g. "capture://radio")
public static Spectator getSpectator()
throws MediaException
Spectator, which represents the listener
in the virtual acoustical space.
Spectator, which represents the listener
in the virtual acoustical space
MediaException - if the device does not support Spectator
public static MediaProcessor createMediaProcessor(String inputType)
throws MediaException
MediaProcessor object. The input content type
is passed
as a MIME type as specified in javax.microedition.media.Manager.
Format Definitions for JSR-234 specifies constants (in its "Format" column) for a set of commonly
used content types.
The supported input content types can be obtained by calling
getSupportedMediaProcessorInputTypes().
MediaProcessor to process Images must be created by
using input type "image/raw".
inputType - @return an instance of MediaProcessorthe content type of the source data to be processed
MediaException - if a MediaProcessor could
not be created for the given content typepublic static String[] getSupportedMediaProcessorInputTypes()
MediaProcessor input content types.
Format Definitions for JSR-234 specifies constants (in its "Format" column) for a set of commonly
used content types.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal