1.0: Final Release

javax.microedition.amms.control.camera
Interface CameraControl

All Superinterfaces:
javax.microedition.media.Control

public interface CameraControl
extends javax.microedition.media.Control

CameraControl controls the features of the camera device. A Player that plays captured stream from a camera may provide a CameraControl via its getControl and getControls methods.


Field Summary
static int ROTATE_LEFT
          Counter-clockwise rotation by 90 degrees.
static int ROTATE_NONE
          No rotation.
static int ROTATE_RIGHT
          Clockwise rotation by 90 degrees.
static int UNKNOWN
          Unknown value.
 
Method Summary
 void enableShutterFeedback(boolean enable)
          Toggles the native shutter sound and visual shutter feedback on and off.
 int getCameraRotation()
          Returns the rotation of the camera device.
 java.lang.String getExposureMode()
          Returns the current exposure mode of the camera device.
 int getStillResolution()
          Gets the current still image resolution.
 java.lang.String[] getSupportedExposureModes()
          Returns a list of exposure modes supported by the camera device.
 int[] getSupportedStillResolutions()
          Returns supported still image resolutions.
 int[] getSupportedVideoResolutions()
          Returns supported video resolutions.
 int getVideoResolution()
          Gets the current video resolution.
 boolean isShutterFeedbackEnabled()
          Gets the setting of the native shutter feedback.
 void setExposureMode(java.lang.String mode)
          Sets the exposure mode of the camera device.
 void setStillResolution(int index)
          Sets the still image resolution.
 void setVideoResolution(int index)
          Sets the video resolution.
 

Field Detail

ROTATE_LEFT

public static final int ROTATE_LEFT
Counter-clockwise rotation by 90 degrees.

See Also:
Constant Field Values

ROTATE_RIGHT

public static final int ROTATE_RIGHT
Clockwise rotation by 90 degrees.

See Also:
Constant Field Values

ROTATE_NONE

public static final int ROTATE_NONE
No rotation.

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
Unknown value.

See Also:
Constant Field Values
Method Detail

getCameraRotation

public int getCameraRotation()
Returns the rotation of the camera device. There might be a sensor in the device that can sense the actual rotation of the camera device. Rotation refers to the direction the specific camera is pointing to.

Returns:
rotation of the camera device or UNKNOWN if unknown. ROTATE_NONE, ROTATE_LEFT, ROTATE_RIGHT or UNKNOWN.

enableShutterFeedback

public void enableShutterFeedback(boolean enable)
                           throws javax.microedition.media.MediaException
Toggles the native shutter sound and visual shutter feedback on and off.

Parameters:
enable - true to enable the shutter feedback, false to disable it
Throws:
javax.microedition.media.MediaException - if setting of the shutter feedback is not possible
java.lang.SecurityException - if setting of the shutter feedback is not allowed

isShutterFeedbackEnabled

public boolean isShutterFeedbackEnabled()
Gets the setting of the native shutter feedback.

Returns:
true if the shutter feedback is enabled, false if the shutter feedback is disabled

getSupportedExposureModes

public java.lang.String[] getSupportedExposureModes()
Returns a list of exposure modes supported by the camera device. Available exposure modes might include:

Returns:
supported exposure modes
See Also:
ExposureControl

setExposureMode

public void setExposureMode(java.lang.String mode)
Sets the exposure mode of the camera device. A method call with null parameter will be ignored.

A more fine-grained control of the exposure might be available via ExposureControl. In that case, setting the preset exposure mode here will propably cause a change in the settings of the ExposureControl.

Parameters:
mode - new exposure mode
Throws:
java.lang.IllegalArgumentException - if the mode is not among the supported exposure modes
See Also:
getSupportedExposureModes(), ExposureControl

getExposureMode

public java.lang.String getExposureMode()
Returns the current exposure mode of the camera device.

Returns:
the current exposure mode of the camera device

getSupportedVideoResolutions

public int[] getSupportedVideoResolutions()
Returns supported video resolutions.

Returns:
supported video resolutions as x, y pairs. For example, if the camera supports 1024x768 and 640x480 video resolutions, [1024, 768, 640, 480] will be returned.

getSupportedStillResolutions

public int[] getSupportedStillResolutions()
Returns supported still image resolutions.

Returns:
supported still resolutions as x, y pairs. For example, if the camera supports 1024x768 and 640x480 still resolutions, [1024, 768, 640, 480] will be returned.

setVideoResolution

public void setVideoResolution(int index)
Sets the video resolution.

Parameters:
index - the index of the video resolution to be set. Index 0 refers to the first pair returned by getSupportedVideoResolutions() and index 1 refers to the second pair and so on.
Throws:
java.lang.IllegalArgumentException - if the given resolution is not supported.

setStillResolution

public void setStillResolution(int index)
Sets the still image resolution.

Parameters:
index - the index of the video resolution to be set. Index 0 refers to the first pair returned by getSupportedStillResolutions() and index 1 refers to the second pair and so on.
Throws:
java.lang.IllegalArgumentException - if the given resolution is not supported

getVideoResolution

public int getVideoResolution()
Gets the current video resolution.

Returns:
the index of the current video resolution. Index 0 refers to the first pair returned by getSupportedVideoResolutions() and index 1 refers to the second pair and so on. Returns -1 if no video resolutions are supported.

getStillResolution

public int getStillResolution()
Gets the current still image resolution.

Returns:
the index of the current still resolution. Index 0 refers to the first pair returned by getSupportedStillResolutions() and index 1 refers to the second pair and so on. Returns -1 if no still resolutions are supported.

1.0: Final Release

Copyright © 2004-2005 Nokia Corporation. See the Copyright for details.