Closed Bug 962878 Opened 11 years ago Closed 10 years ago

Fix bugs & re-enable test_mediarecorder_record_4ch_audiocontext.html on emulators

Categories

(Core :: Audio/Video: Recording, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jsmith, Assigned: bechen)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 3 obsolete files)

In bug 916135, we managed to get a large amount of content/media mochitests enabled. However, test_mediarecord_4ch_audiocontext.html could not be enabled. We should debug why that test can't be ran cleanly on emulators, fix the issues, and get the test enabled on emulators.
Blocks: 889772
I will investigate these disabled bugs one by one and try to fix them.
Assignee: nobody → jwwang
Component: Video/Audio → Video/Audio: Recording
logs: https://tbpl.mozilla.org/php/getParsedLog.php?id=35266509&tree=Try&full=1#error0 01:05:23 INFO - 1764 INFO TEST-START | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html 01:05:23 INFO - 1765 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.start 01:05:23 INFO - 1766 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4521 01:05:23 INFO - 1767 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4322 01:05:23 INFO - 1768 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4300 01:05:23 INFO - 1769 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4295 01:05:58 INFO - 1770 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4237 01:05:58 INFO - 1771 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=4169 01:05:58 INFO - 1772 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=395 01:05:58 INFO - 1773 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.ondataavailable, data.size=0 01:05:58 INFO - 1774 ERROR TEST-UNEXPECTED-FAIL | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | check blob has data 01:05:58 INFO - 1775 INFO TEST-INFO | /tests/content/media/test/test_mediarecorder_record_4ch_audiocontext.html | MediaRecorder.onstop http://hg.mozilla.org/mozilla-central/file/49191bc5ad7a/content/media/MediaRecorder.cpp ExtractRunnable::Run() mSession->Extract() will send 'dataavailable' callback asynchronously if timing condition is met. And the callback will be sent again if mSession->mEncoder->IsShutdown() is false. Therefore it could send 'dataavailable' twice in the last recording run. And you will see the last blob size is zero which will fail the test. This test will be fixed when bug 956997 is landed.
Depends on: 956997
Bug 956997 won't be fixed. We still need to fix this bug now.
No longer depends on: 956997
Hi Benjamin, Please take this bug.
Assignee: jwwang → bechen
Status: NEW → ASSIGNED
Attached patch bug-962878.patch (obsolete) (deleted) — Splinter Review
Comment on attachment 8441815 [details] [diff] [review] bug-962878.patch Review of attachment 8441815 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for this patch and it looks good for me. Remember to change the patch title.
Attachment #8441815 - Flags: feedback+
Obviously the ExtractRunnable::Run will dispatch two successive |PushBlobRunnable| tasks to main thread if mSession->mEncoder->IsShutdown() is TRUE. And then the second |PushBlobRunnable| task will easily push a blob with no data. By apply the patch, we can eliminate this case, but essentially we still not resolve the issue "blob must have data" since the testcase written "ok(e.data.size > 0, 'check blob has data');". It is because the MediaRecorder push a blob with a timeslice, and the MediaStream will be stop unpredictably. Once the MediaRecorder push a blob when meet the timeslice and immediately the MediaStream is stopped, TrackEncoders can not guarantee there is still enough raw data can be encoded and output. Neither the muxer. Result in the MediaRecorder pwill ush an empty blob.
Attached patch bug-962878.patch (obsolete) (deleted) — Splinter Review
One more thing done in this patch: Adjust the code flow in Session:Extract because the |mEncoder->GetEncodedData();| should take some times if encoding loading is heavy.
Attachment #8441815 - Attachment is obsolete: true
Attached patch bug-962878-testcase.patch (obsolete) (deleted) — Splinter Review
Modify the testcase because we can not ensure the blob always has data.
Attachment #8443274 - Flags: review?(roc)
Attachment #8443275 - Flags: review?(rlin)
Hi Roc: Did you finish the review of the patch? Or just press the wrong button r+ on the testcase? Try server result looks good: https://tbpl.mozilla.org/?tree=Try&rev=2ea92b35f2b7
Flags: needinfo?(roc)
Attached patch bug-962878.patch (deleted) — Splinter Review
r=roc
Attachment #8443274 - Attachment is obsolete: true
Attachment #8444976 - Flags: review+
Attached patch bug-962878-testcase.patch (deleted) — Splinter Review
r=roc
Attachment #8443275 - Attachment is obsolete: true
Attachment #8444977 - Flags: review+
Hi sheriff: Please help to check in these two patches. Thanks.
Flags: needinfo?(roc)
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: