×
Namespaces

Variants
Actions
Revision as of 11:19, 29 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Series 40 6th Edition: Accessing Camera Capability with Advanced Multimedia Supplements API (JSR-234)

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested withCompatibilityArticle
Created: r2j7 (12 Mar 2009)
Last edited: hamishwillee (29 Jul 2013)

Advanced Multimedia Supplements API (AMMS) (JSR-234) builds on the framework established in the Mobile Media API (MMAPI) (JSR-135) by adding many new Controls in javax.microedition.amms.control and it’s subpackages. In Nokia platforms, the support for AMMS has been partially enabled as subpackages. More specifically, both Series 40 (starting from Series 40 5th Edition) and S60 (starting from S60 3rd Edition, Feature Pack 1) include support for two full Control subpackages:

  • 3D Audio: javax.microedition.amms.control.audio3d
  • Music:javax.microedition.amms.control.audioeffect


Support for Camera Capability controls in Series 40 6th Edition

In addition in Series 40, support for AMMS Camera Capability subpackage, javax.microedition.amms.control.camera, is introduced starting from Series 40 6th Edition.

The support for the Camera subpackage is partial as some Series 40 6th Edition devices support two of six Camera controls, and in addition, one of the controls, ExposureControl, is excluded from Series 40 6th Edition. In addition to the controls of Camera subpackage, the support for ImageFormatControl is included for setting image format of camera images (This control is the precondition for using Camera subpackage as defined by JSR 234 specification).

More specifically, support for the Camera subpackage in Series 40 6th Edition stands for:

  • the minimum set of Camera controls supported by Series 40 6th Edition devices includes:
    • CameraControl: javax.microedition.amms.control.camera.CameraControl
    • SnapshotControl: javax.microedition.amms.control.camera.SnapshotControl
  • the maximum set of Camera controls supported by Series 40 6th Edition devices includes:
    • CameraControl: javax.microedition.amms.control.camera.CameraControl
    • FlashControl: javax.microedition.amms.control.camera.FlashControl
    • FocusControl: javax.microedition.amms.control.camera.FocusControl
    • SnapshotControl: javax.microedition.amms.control.camera.SnapshotControl
    • ZoomControl: javax.microedition.amms.control.camera.ZoomControl


  • The supported set of Camera controls for each Series 40 device with AMMS API (JSR-234) can be checked with the search engine for device specifications on Nokia Developer web site. To check the support, select a device and click 'APIs' to open the API info box. For JSR 234 Advanced Multimedia Supplements 1.1 (camera) of the device, the 'Notes' row on the bottom of the 'APIs' info box defines either one of the following set of Camera controls supported by the device:
    • contains CameraControl, SnapshotControl
    • contains CameraControl, SnapshotControl, FlashControl, FocusControl and ZoomControl
  • support for ExposureControl (javax.microedition.amms.control.ExposureControl) is not enabled in Series 40 6th Edition


Using Camera Capability controls in Series 40 6th Edition

Accordingly to JSR 234 specification, the Camera controls can be provided by using a MMAPI Player object. For Series 40 devices, the Player object for camera capture can be created as follows:

//NOTE: Series 40 specific locator for camera capture
Player player = Manager.createPlayer(“capture://image”);
player.realize();

For implementing Camera controls, the related classes need to be imported for application:

//Imports all classes for the existing Camera controls
import javax.microedition.amms.control.camera.*;
// For controlling the setting of the image format
import javax.microedition.amms.control.ImageFormatControl;

The created Player object can provide supported Camera controls and ImageFormatControl by using getControl():

CameraControl cameraCntrl = 
(CameraControl) player.getControl("javax.microedition.amms.control.camera.CameraControl");
 
SnapshotControl snapshotCntrl =
(SnapshotControl) player.getControl("javax.microedition.amms.control.camera.SnapshotControl");
 
FlashControl flashCntrl =
(FlashControl) player.getControl("javax.microedition.amms.control.camera.FlashControl");
 
FocusControl focusCntrl =
(FocusControl) player.getControl("javax.microedition.amms.control.camera.FocusControl");
 
ImageFormatControl imageCntrl =
(ImageFormatControl) player.getControl("javax.microedition.amms.control.ImageFormatControl");
 
ZoomControl zoomCntrl =
(ZoomControl) player.getControl("javax.microedition.amms.control.camera.ZoomControl");

The returned Camera controls can be now used for accessing and setting control specific Camera capabilities.

For using the Camera capabilities, please see the Javadocs of JSR-234 AMMS API in Nokia Developer’s Library: http://library.developer.nokia.com/index.jsp?topic=/Java_Developers_Library/GUID-D3E35E6F-0C45-48ED-B09D-F716E14C1C02/javax/microedition/amms/control/camera/package-summary.html


Resources

This page was last modified on 29 July 2013, at 11:19.
105 page views in the last 30 days.
×