Closed Bug 985430 Opened 11 years ago Closed 11 years ago

Consider orientation when selecting camera preview size

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lanker, Unassigned)

Details

Attachments

(1 file)

The orientation of the viewport and the orientation of the supported viewfinder sizes of the platform don't always match. This wasn't considered when doing the matching of the requested size with the supported sizes. This could lead to that the resolution of the viewfinder becomes very low (in our case, the lowest one supported by the platform).
Attachment #8393459 - Flags: review?(dflanagan)
Fredrik, I think the bug you're reporting is a symptom of a more general issue where we need to be taking .sensorAngle property of the camera into account. We fixed this in the 1.3 codebase, but have not done so in the 1.4 codebase yet. See bug 965145. The current code only works for devices where the sensorAngle is 90 degrees. On those devices preview sizes are always reported with width > height. And the camera app locks the orientation to portrait mode and we set vw to the viewport height and vh to the viewport width, so vw should always be > vh, right? Anyway, I assume this means that you're working on a device with sensorAngle 0. I'd love to have a patch that fixes this in the most general way, and would be delighted if you wanted to work on bug 965145. Note also that our preview related code is in flux right now, so this is a difficult time to be working on this, but I welcome all the help we can get. Setting needinfo for Justin because I think he's the one who knows that particular code the best. Needinfo for Fredrik also. I don't want to set r- on this patch, but do want to discuss it more.
Flags: needinfo?(jdarcangelo)
Flags: needinfo?(fredrik.lanker)
Fredrik, Justin believes the patches pending on the camera-new-features branch will make this particular bug go away for you, because preview size will be selected by comparing to picture size, so the reference frames should be the same. Maybe you can try that branch out and see. Or wait a couple of days and those patches will land on master. Meanwhile, if I'm right that your device has a sensorAngle of 0, then you may be seeing other problems like sideways images in the viewfinder. That will be addressed by by bug 965145 which Justin is working on now. I'm going to go ahead and clear your review request because I believe that between our pending patches and 965145 your patch will no longer be necessary. If I'm wrong about that, feel free to bring this back up.
Flags: needinfo?(jdarcangelo)
Attachment #8393459 - Flags: review?(dflanagan)
Great, sounds good! I'll keep an eye on bug 965145 and the camera-new-features branch. I guess we can close this then? Thank you.
Flags: needinfo?(fredrik.lanker)
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: