Closed Bug 1124139 Opened 9 years ago Closed 9 years ago

Camera preview not visible

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.2+, firefox38 fixed, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S4 (23jan)
blocking-b2g 2.2+
Tracking Status
firefox38 --- fixed
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: RobertC, Assigned: pehrsons)

References

Details

(Keywords: qablocker, regression, smoketest, Whiteboard: [fromAutomation])

Attachments

(3 files, 1 obsolete file)

Attached image camera.png
After launching the camera app the background is black and only the controls are visible.

The issue can be reproduced both manually and with automation. The issue is visible on both 188-1 and 18D-1
Reproduction rate: 5 out of 5

Regression range mozilla-inbound
Last working:
Gaia-Rev        a5c5ac093814a80b0627514c3bd5f9e96c096a4b
Gecko-Rev       https://hg.mozilla.org/integration/mozilla-inbound/rev/93f526d85b47
Build-ID        20150119201051
Version         38.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150119.233332
FW-Date         Mon Jan 19 23:33:42 EST 2015
Bootloader      L1TC10011880

First broken:
Gaia-Rev        a5c5ac093814a80b0627514c3bd5f9e96c096a4b
Gecko-Rev       https://hg.mozilla.org/integration/mozilla-inbound/rev/7460be688f60
Build-ID        20150119235337
Version         38.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150120.031637
FW-Date         Tue Jan 20 03:16:47 EST 2015
Bootloader      L1TC10011880

Gecko diff:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=93f526d85b47&tochange=7460be688f60

STR:
1. open camera app

Expected results:
All controls should be visible and the image seen by the camera should be displayed

Actual result:
The background of the app is black

Note: Taking photos and videos still works and the images are correct.
Flags: needinfo?(mhabicher)
Flags: needinfo?(aosmond)
This issue is causing a lot of failures in our automation: http://jenkins1.qa.scl3.mozilla.com/job/flame-kk-319.mozilla-central.ui.functional.smoke/278/HTML_Report/
All tests that are using camera app are failing because of this.
This is the last good patch: http://hg.mozilla.org/integration/mozilla-inbound/rev/dbdbade50ffa
This is the first broken patch: http://hg.mozilla.org/integration/mozilla-inbound/rev/1b11866ce6dc

Andrea, can you fix this?
Flags: needinfo?(mhabicher) → needinfo?(pehrsons)
(*Andreas -- sorry.)
I'll take a look right away. Just need to reconfig and build for my flame.
Flags: needinfo?(pehrsons)
So CameraPreviewMediaStream doesn't use MSG. That was new land to me.

The problem was that when playing a DOMMediaStream backed by a CameraPreviewMediaStream we would get the camera stream as mSrcStream and attach it to an input port and mPlaybackStream.

They would get added to the MediaStreamGraph but since the MediaStreamGraph didn't have the camera stream it couldn't pull any data from it.

We have to add the video output to the camera stream directly.

This patch will let HTMLMediaElement check for a camera stream, and if that's what we are playing, we'll ignore mPlaybackStream and route mSrcStream through GetSrcMediaStream() instead.

Verified working on flame-kk with base image v188.

Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0a03cc554192
Assignee: nobody → pehrsons
Status: NEW → ASSIGNED
Flags: needinfo?(aosmond)
Attachment #8552954 - Flags: review?(roc)
Comment on attachment 8552954 [details] [diff] [review]
Don't use mPlaybackStream for CameraPreview

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

::: dom/html/HTMLMediaElement.cpp
@@ +2892,5 @@
>    if (!window) {
>      return;
>    }
>  
> +  // XXX This if is a temporary fix as CameraPreviewMediaStream doesn't use MSG

reference a followup bug (per other comment)

::: dom/html/HTMLMediaElement.h
@@ +339,5 @@
>    MediaStream* GetSrcMediaStream() const
>    {
> +    NS_ASSERTION(mSrcStream, "Don't call this when not playing a stream");
> +    if (!mPlaybackStream) {
> +      // XXX Temporary fix as CameraPreviewMediaStream doesn't use MSG

let's file a followup bug to get rid of CameraPreviewMediaStream and reference it here, per mikeh's and my conversation in IRC yesterday in #media
Attachment #8552954 - Flags: review?(roc) → review+
Filed bug 1124630 for removing CameraPreviewMediaStream.
Attachment #8552954 - Attachment is obsolete: true
Attachment #8553053 - Flags: review+
See Also: → 1124630
Blocks: 1124725
https://hg.mozilla.org/mozilla-central/rev/b81bb7730801
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S4 (23jan)
:ktucker, please verify fixed on the latest nightly build for master.
Flags: needinfo?(ktucker)
Verified fixed on Flame Master.
Camera viewfinder is properly visible.

Environmental Variables:
Device: Flame 3.0 Master
BuildID: 20150123010227
Gaia: cba2f0bf49b882e0044c3cc583de8fcf83d2ffa4
Gecko: 494632b9afed
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 38.0a1 (3.0 Master)
Firmware: V18D-1
User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker) → needinfo?(pbylenga)
Flags: needinfo?(pbylenga)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Blocks: 1162639
[Blocking Requested - why for this release]: This bug blocks Bug 1162639. It is b2g-2.2+.
blocking-b2g: --- → 2.2?
Blocking a blocker
blocking-b2g: 2.2? → 2.2+
Please request b2g37 approval on this patch when you get a chance.
Flags: needinfo?(pehrsons)
Comment on attachment 8553053 [details] [diff] [review]
Don't use mPlaybackStream for CameraPreview (carries r=jesup)

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 1073406
User impact if declined: Camera app is all black.
Testing completed: See comment 11, + 4 months on m-c.
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: None
Flags: needinfo?(pehrsons)
Attachment #8553053 - Flags: approval-mozilla-b2g37?
Comment on attachment 8553053 [details] [diff] [review]
Don't use mPlaybackStream for CameraPreview (carries r=jesup)

Approving and requesting QA verify on 2.2
Thanks
Attachment #8553053 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attached video 0129.mp4
According to the STR of Comment 0, this bug has been verified as pass on latest Nightly Flame v2.2(188-1 and 18D-1) and Nexus5 v2.2.
Actual results: All controls are visible and the image seen by the camera is displayed .
See attachment: 0129.mp4
Reproduce rate: 0/20

Device: Flame 2.2(188-1) build (Pass)
Build ID               20150602162502
Gaia Revision          a9aeb08263f1a727136e8ae78425e52431c82770
Gaia Date              2015-06-02 13:04:40
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5b3f1796ddf6
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150602.195401
Firmware Date          Tue Jun  2 19:54:11 EDT 2015
Bootloader             L1TC00011880

Device: Flame 2.2(18D-1) build (Pass)
Build ID               20150602162502
Gaia Revision          a9aeb08263f1a727136e8ae78425e52431c82770
Gaia Date              2015-06-02 13:04:40
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5b3f1796ddf6
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150602.195401
Firmware Date          Tue Jun  2 19:54:11 EDT 2015
Bootloader             L1TC000118D0

Device: Nexus5 2.2 build (Pass)
Build ID               20150602162502
Gaia Revision          a9aeb08263f1a727136e8ae78425e52431c82770
Gaia Date              2015-06-02 13:04:40
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5b3f1796ddf6
Gecko Version          37.0
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150602.193831
Firmware Date          Tue Jun  2 19:38:46 EDT 2015
Bootloader             HHZ12f
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+] [MGSEI-Triage+]
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: