Closed
Bug 968144
Opened 11 years ago
Closed 11 years ago
[B2G getUserMedia] camera frame buffer doesn't return to camera HAL when preview stopping
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: ayang, Assigned: ayang)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
Enable video gUM and try http://mozilla.github.io/webrtc-landing/gum_test.html few times.
The camera HAL will be deadlock when preview stopping due to the preview buffer dones't return to camera HAL.
I've created a hack according to following analysis from log. I'll discuss with :slee later.
----
3049 02-05 08:30:50.864 I/PRLog ( 195): 40968[443c6700]: queueBuffer: E
==> camera could already get stop command at this point.
3050 02-05 08:30:50.864 I/PRLog ( 195): 40968[443c6700]: GonkNativeWindow::getCurrentBuffer
3051 02-05 08:30:50.864 I/PRLog ( 195): 40968[443c6700]: android::CameraGraphicBuffer::CameraGraphicBuffer(android::GonkNativeWindow*, uint32_t, uint32_t, mozilla::layers::SurfaceDescriptor):316 : this=45a4f8d0
3052 02-05 08:30:50.864 I/PRLog ( 195): 40968[443c6700]: bool mozilla::DOMCameraPreview::ReceiveFrame(void*, mozilla::ImageFormat, void (*)(mozilla::layers::Image*, void*, uint32_t, uint32_t)):186 : this=448f0420
3053 02-05 08:30:50.864 I/PRLog ( 195): 40968[443c6700]: queueBuffer: X
3054 02-05 08:30:50.864 V/EmulatedCamera_Device( 40): Select: Select, fd -1
3055 02-05 08:30:50.905 I/PRLog ( 195): 41200[43de4980]: dequeueBuffer: E
3056 02-05 08:30:50.905 I/PRLog ( 195): 41200[43de4980]: dequeueBuffer: Try again
==> fail to dequeue because camera received stop command
3057 02-05 08:30:50.944 I/Gecko ( 195): [Child 195] WARNING: nsWindow::GetNativeData not implemented for this type: file /home/alfredo/mozilla/mozilla-central/widget/xpwidgets/PuppetWidget.cpp, line 714
3058 02-05 08:30:50.954 I/Gecko ( 195): [Child 195] WARNING: We don't support transparent content with displayports, force it to be opqaue: file /home/alfredo/mozilla/mozilla-central/layout/base/nsDisplayList.cpp, line 1214
3059 02-05 08:30:51.064 I/PRLog ( 195): 1074414728[40222080]: Listener removed on purpose, mFinished = 1
3060 02-05 08:30:51.064 I/PRLog ( 195): 1074414728[40222080]: Sent recording-window-ended for window 4 (outer 1)
3061 02-05 08:30:51.064 I/PRLog ( 195): 1074414728[40222080]: mozilla::StopPreviewTask::StopPreviewTask(mozilla::CameraControlImpl*):573 : this=45af8fd0
3062 02-05 08:30:51.064 I/PRLog ( 195): 63968[4430ee00]: virtual nsresult mozilla::StopPreviewTask::Run():583
3063 02-05 08:30:51.064 I/PRLog ( 195): 63968[4430ee00]: nsresult mozilla::nsGonkCameraControl::StopPreviewInternal(bool): stopping preview (mDOMPreview=448f0420)
3064 02-05 08:30:51.064 I/PRLog ( 195): 63968[4430ee00]: void android::GonkCameraHardware::StopPreview():322 : this=44d72ac0
3065 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): disableMessage: msg_type = 0x10
3066 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): CAMERA_MSG_PREVIEW_FRAME
3067 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): **** Currently enabled messages:
3068 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): CAMERA_MSG_ERROR
3069 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): CAMERA_MSG_FOCUS
3070 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): CAMERA_MSG_ZOOM
3071 02-05 08:30:51.064 V/EmulatedCamera_CallbackNotifier( 40): CAMERA_MSG_PREVIEW_METADATA
3072 02-05 08:30:51.064 V/EmulatedCamera_Camera( 40): doStopPreview
3073 02-05 08:30:51.064 V/EmulatedCamera_Device( 40): stopDeliveringFrames
3074 02-05 08:30:51.064 V/EmulatedCamera_Device( 40): stopWorkerThread
3075 02-05 08:30:51.064 V/EmulatedCamera_Device( 40): Stopping emulated camera device's worker thread...
3076 02-05 08:30:51.064 V/EmulatedCamera_Device( 40): Requesting to stop worker thread!!!
==> camera HAL waits for buffer returning, but it won't happen.
Assignee | ||
Comment 1•11 years ago
|
||
Updated•11 years ago
|
Blocks: b2g-getusermedia
Assignee | ||
Comment 2•11 years ago
|
||
With help from :slee, here is the patch.
Attachment #8370689 -
Attachment is obsolete: true
Attachment #8371211 -
Flags: review?(rjesup)
Updated•11 years ago
|
Attachment #8371211 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #8371211 -
Attachment is patch: true
Comment 4•11 years ago
|
||
Assignee: nobody → ayang
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•