|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EffectControl
is an interface for controlling an abstract filter with various preset settings.
Individual effects might have various parameters.
The effects can be turned on and off by using the setEnabled
method. By default, effects are disabled.
Player
(or EffectModule
) will be stopped
instead. An effect which is not enforced can be dropped
if the system runs out of resources without stopping the associated Player
or EffectModule
. This automatic dropping does, however, not
affect the enabled state of the EffectControl
(set/getEnabled).
Enforcing affects only the LIVE part of the processing; the RECORD part is always "enforced". The enforcing setting of an EffectControl of a MediaProcessor does not affect in any way.
Field Summary | |
static int |
SCOPE_LIVE_AND_RECORD
A constant used to identify both parts of the effect queue. |
static int |
SCOPE_LIVE_ONLY
A constant used to identify the live part of the effect queue. |
static int |
SCOPE_RECORD_ONLY
A constant used to identify the recording part of the effect queue. |
Method Summary | |
java.lang.String |
getPreset()
Gets the current preset. |
java.lang.String[] |
getPresetNames()
Gets the available preset names. |
int |
getScope()
Returns the scope in which the effect is present. |
boolean |
isEnabled()
Returns true if the effect is enabled and false otherwise. |
boolean |
isEnforced()
Returns the current enforced setting of the effect. |
void |
setEnabled(boolean enable)
Enables/disables the effect. |
void |
setEnforced(boolean enforced)
Enforces the effect to be in use. |
void |
setPreset(java.lang.String preset)
Sets the effect according to the given preset. |
void |
setScope(int scope)
Sets the scope of the effect. |
Field Detail |
public static final int SCOPE_LIVE_ONLY
public static final int SCOPE_RECORD_ONLY
public static final int SCOPE_LIVE_AND_RECORD
Method Detail |
public void setEnabled(boolean enable)
enable
- true
to enable the effect, false
to disable it
java.lang.IllegalStateException
- if the effect
cannot be enabled in this state of the playersetScope(int)
public boolean isEnabled()
true
if the effect is enabled,
false
if notpublic void setScope(int scope) throws javax.microedition.media.MediaException
If this is an EffectControl of the MediaProcessor, the scope setting does not affect in anything.
scope
- SCOPE_LIVE_ONLY
,
SCOPE_RECORD_ONLY
or SCOPE_LIVE_AND_RECORD
.
javax.microedition.media.MediaException
- if the given scope is not supportedgetScope()
public int getScope()
SCOPE_LIVE_ONLY
,
SCOPE_RECORD_ONLY
or SCOPE_LIVE_AND_RECORD
setScope(int)
public void setEnforced(boolean enforced)
If this is an EffectControl of a MediaProcessor, the enforced setting does not affect in any way.
enforced
- true
if the effect is essential and cannot be dropped,
false
if the effect can be dropped if the system runs out of resourcessetScope(int)
public boolean isEnforced()
true
if the effect is an enforced effect, false
if notsetEnforced(boolean)
public void setPreset(java.lang.String preset)
preset
- the new preset that will be taken into use
java.lang.IllegalArgumentException
- if the preset
is not available or it is nullgetPreset()
public java.lang.String getPreset()
setPreset(java.lang.String)
public java.lang.String[] getPresetNames()
|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |