mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Try looking up multimedia controls under alternate names to potentially improve interoperability
git-svn-id: https://zxing.googlecode.com/svn/trunk@500 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2a9feb1f49
commit
45ba99787e
|
@ -39,6 +39,9 @@ final class AdvancedMultimediaManager implements MultimediaManager {
|
||||||
public void setFocus(Controllable player) {
|
public void setFocus(Controllable player) {
|
||||||
FocusControl focusControl = (FocusControl)
|
FocusControl focusControl = (FocusControl)
|
||||||
player.getControl("javax.microedition.amms.control.camera.FocusControl");
|
player.getControl("javax.microedition.amms.control.camera.FocusControl");
|
||||||
|
if (focusControl == null) {
|
||||||
|
focusControl = (FocusControl) player.getControl("FocusControl");
|
||||||
|
}
|
||||||
if (focusControl != null) {
|
if (focusControl != null) {
|
||||||
try {
|
try {
|
||||||
if (focusControl.isMacroSupported() && !focusControl.getMacro()) {
|
if (focusControl.isMacroSupported() && !focusControl.getMacro()) {
|
||||||
|
@ -61,6 +64,9 @@ final class AdvancedMultimediaManager implements MultimediaManager {
|
||||||
|
|
||||||
public void setZoom(Controllable player) {
|
public void setZoom(Controllable player) {
|
||||||
ZoomControl zoomControl = (ZoomControl) player.getControl("javax.microedition.amms.control.camera.ZoomControl");
|
ZoomControl zoomControl = (ZoomControl) player.getControl("javax.microedition.amms.control.camera.ZoomControl");
|
||||||
|
if (zoomControl == null) {
|
||||||
|
zoomControl = (ZoomControl) player.getControl("ZoomControl");
|
||||||
|
}
|
||||||
if (zoomControl != null) {
|
if (zoomControl != null) {
|
||||||
// We zoom in if possible to encourage the viewer to take a snapshot from a greater distance.
|
// We zoom in if possible to encourage the viewer to take a snapshot from a greater distance.
|
||||||
// This is a crude way of dealing with the fact that many phone cameras will not focus at a
|
// This is a crude way of dealing with the fact that many phone cameras will not focus at a
|
||||||
|
@ -80,6 +86,9 @@ final class AdvancedMultimediaManager implements MultimediaManager {
|
||||||
public void setExposure(Controllable player) {
|
public void setExposure(Controllable player) {
|
||||||
ExposureControl exposureControl =
|
ExposureControl exposureControl =
|
||||||
(ExposureControl) player.getControl("javax.microedition.amms.control.camera.ExposureControl");
|
(ExposureControl) player.getControl("javax.microedition.amms.control.camera.ExposureControl");
|
||||||
|
if (exposureControl == null) {
|
||||||
|
exposureControl = (ExposureControl) player.getControl("ExposureControl");
|
||||||
|
}
|
||||||
if (exposureControl != null) {
|
if (exposureControl != null) {
|
||||||
|
|
||||||
int[] supportedISOs = exposureControl.getSupportedISOs();
|
int[] supportedISOs = exposureControl.getSupportedISOs();
|
||||||
|
|
Loading…
Reference in a new issue