Closed
Bug 1197669
Opened 9 years ago
Closed 9 years ago
Enable test_mediarecorder_record_gum_video_timeslice.html on B2G platform.
Categories
(Core :: Audio/Video: Recording, defect)
Core
Audio/Video: Recording
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: bechen, Assigned: bechen)
References
Details
Attachments
(3 files, 4 obsolete files)
2.49 KB,
patch
|
bechen
:
review+
|
Details | Diff | Splinter Review |
4.34 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
10.59 KB,
patch
|
bechen
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Now I'm fixing the testcase for b2g, during the fix, I found a timeout issue that the the js is waiting for the onstop event. It might be the same failure at bug 1149842 comment 42.
Assignee | ||
Comment 2•9 years ago
|
||
After discussed with John, we have confirmed that there is a bug in OMXTrackEncoderccpp. The EOS signal may not send into MediaCodec because the dequeue/enqueue buffer may be timeout. I'll fix it too.
Assignee | ||
Comment 3•9 years ago
|
||
1. enable the testcase on b2g/android platform. 2. check the mimetype if the blob is not empty.
Attachment #8652745 -
Flags: review?(jwwang)
Assignee | ||
Comment 4•9 years ago
|
||
1. Ensure the EOS is sent to MediaCodec. Change the |OMXAudioEncoder::Encode| and |OMXVideoEncoder::Encode| 2. mEndOfStream should be protected by monitor.
Attachment #8652748 -
Flags: feedback?(jolin)
Assignee | ||
Comment 5•9 years ago
|
||
In MediaRecorder, ensure the start event comes before any blobs.
Attachment #8652749 -
Flags: review?(jwwang)
Comment 6•9 years ago
|
||
Comment on attachment 8652745 [details] [diff] [review] bug-1197669-part1.v01.patch Review of attachment 8652745 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/test/test_mediarecorder_record_gum_video_timeslice.html @@ +41,5 @@ > 'Event type should dataavailable'); > ok(evt.data.size >= 0, > + 'Blob data size ' + evt.data.size + ' received is greater than or equal to zero'); > + if (evt.data.size > 0) { > + is(mediaRecorder.mimeType, evt.data.type, Why do we check mediaRecorder.mimeType only when evt.data.size > 0?
Comment 7•9 years ago
|
||
Comment on attachment 8652749 [details] [diff] [review] bug-1197669-part3.v01.patch Review of attachment 8652749 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaRecorder.cpp @@ +498,3 @@ > NS_DispatchToMainThread( > new DispatchStartEventRunnable(this, NS_LITERAL_STRING("start"))); > + mIsStartEventFired = true; It is a data race for mIsStartEventFired is accessed on multiple threads.
Attachment #8652749 -
Flags: review?(jwwang) → review-
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #7) > Comment on attachment 8652749 [details] [diff] [review] > bug-1197669-part3.v01.patch > > Review of attachment 8652749 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/media/MediaRecorder.cpp > @@ +498,3 @@ > > NS_DispatchToMainThread( > > new DispatchStartEventRunnable(this, NS_LITERAL_STRING("start"))); > > + mIsStartEventFired = true; > > It is a data race for mIsStartEventFired is accessed on multiple threads. It won't have data race, because |DoSessionEndTask| on mian thread and |Session::Extract| on encoder thread wont exist at the same time. |DoSessionEndTask| only be called when something wrong so there is no |ExtractRunnable| running.
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #6) > Comment on attachment 8652745 [details] [diff] [review] > bug-1197669-part1.v01.patch > > Review of attachment 8652745 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/media/test/test_mediarecorder_record_gum_video_timeslice.html > @@ +41,5 @@ > > 'Event type should dataavailable'); > > ok(evt.data.size >= 0, > > + 'Blob data size ' + evt.data.size + ' received is greater than or equal to zero'); > > + if (evt.data.size > 0) { > > + is(mediaRecorder.mimeType, evt.data.type, > > Why do we check mediaRecorder.mimeType only when evt.data.size > 0? Good question, since we ensure the start event comes before blob, we can also ensure the mediaRecorder.mimeType won't be empty because the mediaRecorder.mimeType was set in |DispatchStartEventRunnable|. So we should able to check mediaRecorder.mimeType even the blob size is 0.
Comment 10•9 years ago
|
||
(In reply to Benjamin Chen [:bechen] from comment #8) > It won't have data race, because |DoSessionEndTask| on mian thread and > |Session::Extract| on encoder thread wont exist at the same time. > |DoSessionEndTask| only be called when something wrong so there is no > |ExtractRunnable| running. Data races are also about memory visibility which is how a change in a memory location in a thread becomes visible to another thread.
Updated•9 years ago
|
Attachment #8652745 -
Flags: review?(jwwang) → review+
Updated•9 years ago
|
Attachment #8652748 -
Flags: feedback?(jolin) → feedback+
Assignee | ||
Comment 11•9 years ago
|
||
Check the blob's mimetype even it is an empty blob.
Attachment #8652745 -
Attachment is obsolete: true
Attachment #8653316 -
Flags: review+
Assignee | ||
Comment 12•9 years ago
|
||
Add comments.
Attachment #8652748 -
Attachment is obsolete: true
Attachment #8653317 -
Flags: review?(jwwang)
Assignee | ||
Comment 13•9 years ago
|
||
Address comment 7, 8, 10. See comment 8, since the |DoSessionEndTask| and |ExtractRunnable| are exclusive, so I can remove |mIsStartEventFired| checking on main thread.
Attachment #8652749 -
Attachment is obsolete: true
Attachment #8653319 -
Flags: review?(jwwang)
Comment 14•9 years ago
|
||
Comment on attachment 8653317 [details] [diff] [review] bug-1197669-part2.v01.patch Review of attachment 8653317 [details] [diff] [review]: ----------------------------------------------------------------- Not familiar with omx code. Maybe Sotaro should review it.
Attachment #8653317 -
Flags: review?(jwwang) → review?(sotaro.ikeda.g)
Updated•9 years ago
|
Attachment #8653319 -
Flags: review?(jwwang) → review+
Comment 15•9 years ago
|
||
Comment on attachment 8653317 [details] [diff] [review] bug-1197669-part2.v01.patch Review of attachment 8653317 [details] [diff] [review]: ----------------------------------------------------------------- Review+ as a short term fix. For a long term, it seems better to fix TrackEncoder's implementation and MediaCodec handling. About MediaCodec handling, it might be better to use kWhatEncoderActivity message to get free input buffer like MediaCodecSource. FYI: MediaCodecSource diagram. https://github.com/sotaroikeda/android-diagrams/blob/master/media/MediaCodecSource_5.1.pdf
Attachment #8653317 -
Flags: review?(sotaro.ikeda.g) → review+
Assignee | ||
Comment 16•9 years ago
|
||
r=sotaro. try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ba9e1d699bba
Attachment #8653317 -
Attachment is obsolete: true
Attachment #8655232 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 17•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/59abc20bd941 https://hg.mozilla.org/integration/mozilla-inbound/rev/1201c1eb56ea https://hg.mozilla.org/integration/mozilla-inbound/rev/ac96586283d6
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
https://hg.mozilla.org/mozilla-central/rev/59abc20bd941 https://hg.mozilla.org/mozilla-central/rev/1201c1eb56ea https://hg.mozilla.org/mozilla-central/rev/ac96586283d6
You need to log in
before you can comment on or make changes to this bug.
Description
•