Closed
Bug 833280
Opened 12 years ago
Closed 12 years ago
[Camera] Wrong Camera flash sequence
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect, P3)
Tracking
(blocking-b2g:leo+, b2g18+ fixed)
People
(Reporter: leo.bugzilla.gaia, Assigned: ben.tian)
References
()
Details
(Whiteboard: [TD-8124][POVB][leo])
Attachments
(2 files)
357 bytes,
patch
|
djf
:
review-
|
Details | Diff | Splinter Review |
180 bytes,
patch
|
djf
:
review+
|
Details | Diff | Splinter Review |
1. Title : Wrong Camera flash sequence
2. Precondition :
3. Tester's Action : Idle - camera - flash icon - touch
4. Detailed Symptom (ENG.) : Current order of camera flash: Flash off> Auto flash> Flash on> Auto Flash> Flash off.
5. Detailed Symptom (KOR.) : Flash off> Auto flash> Flash on> Auto Flash> Flash off 의 순서대로 변경됨 (On다음이 off가 아니라 Auto이다.)
6. Expected : Expected order for camera flash: Flash off> Auto flash> Flash on > Flash off.
7.Reproducibility: Y
1)Frequency Rate : 100%
8.Comparison Results :
1)Model Comparing :
9. Attached files: Attach video
1)Log :
2)Test Contents :
3)Video file :
10. Tel:
For Still Image capture only three flash modes should be used:
1. Flash Off, 2. Auto Flash, 3. Flash On
For camcorder mode, only two flash modes:
1. Flash Off, 2. Always Flash Off.
Changes were made and Will commit to master git.
Comment 2•12 years ago
|
||
The easy workaround is to continue to press the icon, so not blocking. Tracking+ to accept the fix. Thanks in advance for your patch!
blocking-b2g: leo? → -
tracking-b2g18:
--- → +
Attachment #724311 -
Flags: review?(dietrich)
Comment 4•12 years ago
|
||
Comment on attachment 724311 [details] [diff] [review]
Patch for Bug 833280: Fixed Camera flash sequence for both image and video captures
djf, not sure if you want to look this over while daleharvey is OoO.
Attachment #724311 -
Flags: review?(dietrich) → review?(dflanagan)
Comment 5•12 years ago
|
||
I can review the code, but I don't have a camera with a flash, so I can't test it. We'll need someone else to give the final go ahead to land it.
Comment 6•12 years ago
|
||
Comment on attachment 724311 [details] [diff] [review]
Patch for Bug 833280: Fixed Camera flash sequence for both image and video captures
The existing code in the camera app for dealing with flash modes is (I think) from the days before we had any hardware to test it on. It is as generic as possible and just cycles through the list of modes that the hardware reports it supports.
It was a hack to begin with and this patch attempts to make it more intelligent by layering more hacks on top of the original hack. The patch seems brittle because it assumes that the hardware will always return the camera modes in the same order, so I'm not convinced that this will work correctly on all phones.
Mike: can we make the assumption that all phones that have a flash will support 'on', 'off', 'auto', and 'torch' modes? Or do we have to check for 'torch' support separately from 'on' and 'auto'?
I'd suggest that we modify the app to maintain two separate flash modes for photos and videos. And even check for flash support separately for the two modes.
If the hardware supports 'on' and 'auto', then we display a flash button in picture mode. If it supports 'torch', then we display a button in video mode.
I think we can get rid of the _flashModes[] array entirely. We just need to check capabilities.flashModes in enableCameraFeatures()
Attachment #724311 -
Flags: review?(dflanagan) → review-
Comment 8•12 years ago
|
||
(In reply to David Flanagan [:djf] from comment #6)
>
> Mike: can we make the assumption that all phones that have a flash will
> support 'on', 'off', 'auto', and 'torch' modes? Or do we have to check for
> 'torch' support separately from 'on' and 'auto'?
djf: the driver can return pretty much anything it likes, even combinations that don't make sense; BUT in the past I've seen what you've described: either no flash support, or { on, off, auto, torch }.
I actually have a Nexus S handy. It has a flash, so I can test any patches.
Flags: needinfo?(mhabicher)
Updated•12 years ago
|
Target Milestone: --- → Leo QE1 (5may)
Comment 9•12 years ago
|
||
leo+ and POVB since this should be fixed on the driver side
blocking-b2g: - → leo+
Whiteboard: [TD-8124] → [TD-8124][POVB][leo]
Comment 10•12 years ago
|
||
Flash Device can support various mode, But why are you willing to make a limitation in driver side? I cannot understand. Application can get device information. It shouuld be fixed on the application side.
All other applications are working like that.
Updated•12 years ago
|
Priority: -- → P3
Comment 11•12 years ago
|
||
I attempted to test the above patch using a Nexus S, but am blocked on the following issues: bug 865243 and bug 865249.
Assignee | ||
Comment 12•12 years ago
|
||
David: I wrote a patch per your suggestion in comment 6. Can you review it?
Changes:
- separate flash types for picture and video
- fix the inconsistency of 'auto' flash icon for 'torch' mode by showing 'on' flash icon instead.
Attachment #741745 -
Flags: review?(dflanagan)
Comment 13•12 years ago
|
||
Comment on attachment 741745 [details] [diff] [review]
link to https://github.com/mozilla-b2g/gaia/pull/9401
I can confirm that on the Nexus S, while taking pictures, the flash button starts at 'on' then cycles through 'off' --> 'auto' --> 'on' --> 'off'. (Maybe we want to start at auto, by default?)
I wasn't able to test 'off'/'torch' modes with video recording, since the switch to video mode seems to be broken on the Nexus S (in b2g18, anyway).
Comment 14•12 years ago
|
||
Comment on attachment 741745 [details] [diff] [review]
link to https://github.com/mozilla-b2g/gaia/pull/9401
I don't have hardware that I can test this on, so I'm assuming that you have tested carefully.
I agree with Mike that the default flash mode should probably be auto, not off.
Also, see github for some suggestions about ways to restructure the code to make it cleaner.
I'd like it if you are able to make some of those changes, but am giving r+ now, so if time is pressing (and if you've tested!) then you can land it as it is if you need to.
Attachment #741745 -
Flags: review?(dflanagan) → review+
Assignee | ||
Comment 15•12 years ago
|
||
David & Mike, thanks for your suggestion. I made following changes and tested on leo & tara. Please let me know if you have further suggestion. I will merge it into master tomorrow.
https://github.com/mozilla-b2g/gaia/pull/9401
Changes:
- set default flash mode 'auto' for camera and 'off' for video
- use capture mode to index camera and video flash states
- move isSubset() into enableCameraFeatures() where it's used
- simplify toggleFlash()
Assignee | ||
Updated•12 years ago
|
Assignee: leo.bugzilla.gaia → btian
Assignee | ||
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Uplifted 758e5907b3c8e1a88bb2947311385bdd45ff21c5 to:
v1-train: 2643e7a5a41608f8424e73c1694196e74f6cb1d2
Updated•11 years ago
|
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
You need to log in
before you can comment on or make changes to this bug.
Description
•