Closed
Bug 996513
Opened 11 years ago
Closed 11 years ago
[Flame][Camera] front camera can not work in master branch
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)
People
(Reporter: viralwang, Assigned: justindarc)
References
Details
(Whiteboard: [CR 651554])
Attachments
(1 file)
rear camera works fine but we can't preview and take picture by front camera.
Comment 1•11 years ago
|
||
When Camera app switches to front camera, mVideoOutputs.Length() indicates 0. It means no SetCurrentFrame() is called to VideoFrameContainer.
http://lxr.mozilla.org/mozilla-central/source/dom/camera/CameraPreviewMediaStream.cpp#111
Comment 2•11 years ago
|
||
When switching between front/back camera, Camera app should called Camera.prototype.loadStreamInto to plugs Video Stream into Video Element. But currently it was called only when back to front or the first launch of Camera app. This function was called by calling ViewfinderController.prototype.onCameraConfigured(). I need someone's help to figure out why onCameraConfigured() doesn't been called for front->back case.
Comment 3•11 years ago
|
||
@dwi2, Can you have a look for me based on Comment 2? Thanks.
Flags: needinfo?(tzhuang)
Updated•11 years ago
|
Flags: needinfo?(jdarcangelo)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jdarcangelo
Flags: needinfo?(jdarcangelo)
Assignee | ||
Comment 4•11 years ago
|
||
Mike: This is a pretty simple patch, can you review? Basically, it just ensures that `undefined` does not get passed to `mozCamera` as a flash mode. I'm not sure if this resolves the issue or not as I do not have a Flame or QRD to test with. Thanks!
Attachment #8407694 -
Flags: review?(mhabicher)
Comment 5•11 years ago
|
||
Comment on attachment 8407694 [details] [review]
pull-request (master)
lgtm.
Attachment #8407694 -
Flags: review?(mhabicher) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Mike: Did you happen to check if this fixes the issue on Flame or QRD? I don't have one to test with.
Flags: needinfo?(mhabicher)
Comment 7•11 years ago
|
||
(In reply to Justin D'Arcangelo [:justindarc] from comment #4)
> Created attachment 8407694 [details] [review]
> pull-request (master)
>
> Mike: This is a pretty simple patch, can you review? Basically, it just
> ensures that `undefined` does not get passed to `mozCamera` as a flash mode.
> I'm not sure if this resolves the issue or not as I do not have a Flame or
> QRD to test with. Thanks!
Thanks for looking into the issue. After trying your patch on Flame, it doesn't fix the problem. As I mentioned in Comment 2, Camera.prototype.loadStreamInto() should be called to plugs Video Stream into Video Element when switching between front/back camera. Currently I can only see it been called when front->back or the first launch of Camera app.
It seems there is an event named 'camera:configured' to hook up onCameraConfigured in viewfinder.js to call this.startStream(). Camera app should receive this event when switching between front/back. Because I am not familiar with this part and you may help to figure it out. Thanks.
Flags: needinfo?(jdarcangelo)
Assignee | ||
Comment 8•11 years ago
|
||
Vincent: Thanks for testing this. I was thinking maybe the stream wasn't being loaded because of the 'undefined' flash mode being set on the front camera. Can you post a logcat for me to look at since I don't have a Flame to test with.
Flags: needinfo?(mhabicher)
Flags: needinfo?(jdarcangelo)
Comment 9•11 years ago
|
||
(In reply to Justin D'Arcangelo [:justindarc] from comment #8)
> Vincent: Thanks for testing this. I was thinking maybe the stream wasn't
> being loaded because of the 'undefined' flash mode being set on the front
> camera. Can you post a logcat for me to look at since I don't have a Flame
> to test with.
I have to say sorry that I got different result when I test your patch on my device. My device used the older native library from partner and seems still not working with your patch. After synced with Viral, we had verified that your patch works with newer native library. Here to thanks for your great help. :)
Reporter | ||
Comment 10•11 years ago
|
||
yes, the patch can fix this bug! (base image is v10D rom)
Flags: needinfo?(tzhuang)
Assignee | ||
Comment 11•11 years ago
|
||
Thanks for the feedback and testing this out!
Landed on master:
https://github.com/mozilla-b2g/gaia/commit/3bb6bff45a5744bdabdbaf5c4aa4ca0a8dd2c9dd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
blocking-b2g: --- → 1.4+
Comment 14•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [CR 651554]
Comment 15•11 years ago
|
||
Today's aurora, Open_C - camera still launches to a black screen... I believe we should wait for tomorrow to retest this.
Device: Open_C
BuildID: 20140423000203
Gaia: 25d53d442cbf17c150575c98979e957ae040e023
Gecko: 2d1b4d36eef9
Version: 30.0a2
Comment 16•11 years ago
|
||
retested on the latest Gaia (b6a41ee9e2934fe9692da6fb1cb310cb759e9870) and the issue still reproduces, filed new bug 1000567
You need to log in
before you can comment on or make changes to this bug.
Description
•