javax.microedition.amms.control.camera
Interface CameraControl

All Superinterfaces:
Control

public interface CameraControl
extends 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.

Since:
BlackBerry API 5.0.0

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.
 String getExposureMode()
          Returns the current exposure mode of the camera device.
 int getStillResolution()
          Gets the current still image resolution.
 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(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

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

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ROTATE_RIGHT

static final int ROTATE_RIGHT
Clockwise rotation by 90 degrees.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ROTATE_NONE

static final int ROTATE_NONE
No rotation.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

UNKNOWN

static final int UNKNOWN
Unknown value.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0


Method Detail

getCameraRotation

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.
Since:
BlackBerry API 5.0.0

enableShutterFeedback

void enableShutterFeedback(boolean enable)
                           throws 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:
MediaException - if setting of the shutter feedback is not possible
SecurityException - if setting of the shutter feedback is not allowed
Since:
BlackBerry API 5.0.0

isShutterFeedbackEnabled

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
Since:
BlackBerry API 5.0.0

getSupportedExposureModes

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
Since:
BlackBerry API 5.0.0

setExposureMode

void setExposureMode(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:
IllegalArgumentException - @see ExposureControl if the mode is not among the supported exposure modes
Since:
BlackBerry API 5.0.0

getExposureMode

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

Returns:
the current exposure mode of the camera device
Since:
BlackBerry API 5.0.0

getSupportedVideoResolutions

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.
Since:
BlackBerry API 5.0.0

getSupportedStillResolutions

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.
Since:
BlackBerry API 5.0.0

setVideoResolution

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 CameraControl.getSupportedVideoResolutions() and index 1 refers to the second pair and so on.
Throws:
IllegalArgumentException - if the given resolution is not supported.
IllegalStateException - if changing resolution is not supported during recording or playback.
Since:
BlackBerry API 5.0.0

setStillResolution

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 CameraControl.getSupportedStillResolutions() and index 1 refers to the second pair and so on.
Throws:
IllegalArgumentException - if the given resolution is not supported
Since:
BlackBerry API 5.0.0

getVideoResolution

int getVideoResolution()
Gets the current video resolution.

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

getStillResolution

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 CameraControl.getSupportedStillResolutions() and index 1 refers to the second pair and so on. Returns -1 if no still resolutions are supported.
Since:
BlackBerry API 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.