[Camera][Gecko] Supported preview and image size fix

RESOLVED FIXED in 2.1 S4 (12sep)

Status

P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: shinuk153, Assigned: mikeh)

Tracking

unspecified
2.1 S4 (12sep)
ARM
Gonk (Firefox OS)
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(b2g-v2.1 affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

Steps to reproduce:

Start Camera > Select 2448x2448 resolution for photo.

Test platform provides supported pic sizes:
3264x2448,3264x1836,3200x2400,3200x1920,2592x1944,2560x1920,2448x2448,...


Actual results:

CameraControl sets '3264x1836' instead of '2448x2448', because the target area of '3264x1836' is the same as '2448x2448'.


Expected results:

CameraControl should set exact image resolution, '2448x2448'.
(Reporter)

Updated

4 years ago
OS: All → Gonk (Firefox OS)
Priority: -- → P2
Hardware: All → ARM
Assignee: nobody → mhabicher
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Created attachment 8486033 [details] [diff] [review]
Improve (picture) size picker, v1

shinuk, does this fix your problem with frame sizes?

try-server push: https://tbpl.mozilla.org/?tree=Try&rev=6964e8bd4e60
Attachment #8486033 - Flags: review?(aosmond)
Attachment #8486033 - Flags: feedback?(shinuk153)
Comment on attachment 8486033 [details] [diff] [review]
Improve (picture) size picker, v1

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

::: dom/camera/GonkCameraControl.cpp
@@ +807,3 @@
>      DOM_CAMERA_LOGE("Supported picture size is too big, no change\n");
>      return NS_ERROR_FAILURE;
>    }

Do we still need this check? It returns an error if it doesn't find a "best" match, and it never initializes best to these defaults.
Attachment #8486033 - Flags: review?(aosmond) → review+
Comment on attachment 8486033 [details] [diff] [review]
Improve (picture) size picker, v1

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

::: dom/camera/GonkCameraControl.cpp
@@ +807,3 @@
>      DOM_CAMERA_LOGE("Supported picture size is too big, no change\n");
>      return NS_ERROR_FAILURE;
>    }

Wait never mind, this is just a sanity check. I was confusing this with the smallestDeltaIndex / smallestDelta initializers...

Updated

4 years ago
Target Milestone: --- → 2.1 S4 (12sep)
https://hg.mozilla.org/mozilla-central/rev/d16fa2d4ce86
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
(Reporter)

Comment 6

4 years ago
Comment on attachment 8486033 [details] [diff] [review]
Improve (picture) size picker, v1

This fixes my issue with picture & preview sizes.

Thanks.
Attachment #8486033 - Flags: feedback?(shinuk153) → feedback+
[Blocking Requested - why for this release]: This change in combination with bug 1098660 resolves the issue in bug 1078435 (which is blocking for 2.1 already).

Videos may be recorded with static/corrupt portions in the upper quarter of the display preview and saved recording. This happens when one uses the software home button and has been reported on other devices; it depends on the preview resolution and recording profiles available on the device and this change fixes the selection algorithms to ensure a compatible pairs are used.
Blocks: 1078435, 1098660
blocking-b2g: --- → 2.1?
status-b2g-v2.1: --- → affected
blocking-b2g: 2.1? → 2.1+
Note that this no longer is desired to resolve bug 1078435. We will solve it in gaia in a much simpler fashion.
blocking-b2g: 2.1+ → ---
You need to log in before you can comment on or make changes to this bug.