Closed Bug 977756 Opened 6 years ago Closed 5 years ago

[Camera] Expose maxZoom on CameraControl

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

Attachments

(1 file, 3 obsolete files)

Expose the AOSP CameraParameters::KEY_MAX_ZOOM value to JS.

We didn't do this before because we thought it was a static value that conveyed the length of the KEY_ZOOM_RATIOS list; but it looks like it may dynamically change to reflect the highest possible zoom given the current preview settings.
Preliminary version of patch; more mochitests forthcoming.

try-server push: https://tbpl.mozilla.org/?tree=Try&rev=873ffc615e59&showall=1
Attachment #8383971 - Flags: feedback?(jdarcangelo)
Attachment #8383971 - Attachment is obsolete: true
Attachment #8383971 - Flags: feedback?(jdarcangelo)
Comment on attachment 8384932 [details] [diff] [review]
Expose preview zoom limit attribute, v2

try-server push: https://tbpl.mozilla.org/?tree=Try&rev=c81fd9cf5f94
Attachment #8384932 - Attachment description: WIP - expose preview zoom limit attribute, v2 → Expose preview zoom limit attribute, v2
Attachment #8384932 - Flags: review?(dhylands)
Attachment #8384932 - Flags: feedback?(jdarcangelo)
Comment on attachment 8384932 [details] [diff] [review]
Expose preview zoom limit attribute, v2

Review of attachment 8384932 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.
Attachment #8384932 - Flags: review?(dhylands) → review+
Fix JB build breakage; carrying r+ forward.

try-server push: https://tbpl.mozilla.org/?tree=Try&rev=bb2129b7d477&showall=1
Attachment #8384932 - Attachment is obsolete: true
Attachment #8384932 - Flags: feedback?(jdarcangelo)
Attachment #8385364 - Flags: review+
Attachment #8385364 - Flags: feedback?(jdarcangelo)
Comment on attachment 8385364 [details] [diff] [review]
WIP - expose preview zoom limit attribute, v3 r=dhylands

From http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getMaxZoom() :

`This value may change in different preview size. Applications should call this again after setting preview size.`

However, with this patch, it seems to always return the maximum value from the `zoomRatios` array (which is `4.0` on helix and nexus4). This seems to be incorrect behavior because the `zoom` attribute only affects the preview up to a certain point (depending on the `previewSize`) and then it stops causing any further visual changes to the preview after that point.

I seem to have found a formula for determining what the maximum `zoom` is for the current `previewSize` without this attribute. See bug 933902 for specifics.
Attachment #8385364 - Flags: feedback?(jdarcangelo)
See Also: → 979595
I've confirmed Justin's findings in comment 6: the value returned by KEY_MAX_ZOOM never changes. I don't think there's much more to do here given that this parameter is essentially returning capabilities.zoomRatios.length.
No longer blocks: 980484
Depends on: 980484
Only the DOM-facing changes; the Gecko-only changes have been bumped to bug 980484.
Attachment #8385364 - Attachment is obsolete: true
Attachment #8387001 - Flags: review+
I'm closing this because it doesn't work the way we need it to. Nothing more to see here.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.