Closed
Bug 1265978
Opened 8 years ago
Closed 8 years ago
Add a method to HTMLMediaElement to print debugging information when mochitest times out
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(4 files, 2 obsolete files)
8.08 KB,
patch
|
jya
:
review+
|
Details | Diff | Splinter Review |
2.61 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
962 bytes,
patch
|
jya
:
review+
|
Details | Diff | Splinter Review |
3.01 KB,
patch
|
jya
:
review+
|
Details | Diff | Splinter Review |
We will add |void mozDumpDebugInfo()| to HTMLMediaElement.webidl. The usage is like: SimpleTest.registerTimeoutFunction(function() { for (var v of document.getElementsByTagName("video")) { v.mozDumpDebugInfo(); } for (var a of document.getElementsByTagName("audio")) { a.mozDumpDebugInfo(); } }); This method will dump object states to PR logs to help debugging.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8744131 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8744132 -
Flags: review?(jyavenard)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8744133 -
Flags: review?(jyavenard)
Comment 4•8 years ago
|
||
Comment on attachment 8744131 [details] [diff] [review] 1265978_part1_add_mozDumpDebugInfo.patch We do not want to expose this to the web. Either condition it on some pref that's set only when running tests or make it chrome-only and call it via SpecialPowers.wrap, or something.
Attachment #8744131 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Updated•8 years ago
|
Attachment #8744133 -
Flags: review?(jyavenard)
Assignee | ||
Comment 5•8 years ago
|
||
Hide the function behind pref "media.test.dumpDebugInfo" which will be preffed on only during testing.
Attachment #8744131 -
Attachment is obsolete: true
Attachment #8744148 -
Flags: review?(bzbarsky)
Comment 6•8 years ago
|
||
Comment on attachment 8744148 [details] [diff] [review] 1265978_part1_add_mozDumpDebugInfo.patch v2 r=me
Attachment #8744148 -
Flags: review?(bzbarsky) → review+
Comment 7•8 years ago
|
||
Comment on attachment 8744132 [details] [diff] [review] 1265978_part2_add_DumpDebugInfo.patch Review of attachment 8744132 [details] [diff] [review]: ----------------------------------------------------------------- could you also display the content of MediaDecoder::GetMozDebugReaderData it will be very useful for MSE debugging.
Attachment #8744132 -
Flags: review?(jyavenard) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Sure. Let me have a try.
Assignee | ||
Comment 9•8 years ago
|
||
Attachment #8744168 -
Flags: review?(jyavenard)
Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8744133 -
Attachment is obsolete: true
Attachment #8744169 -
Flags: review?(jyavenard)
Comment 11•8 years ago
|
||
Comment on attachment 8744168 [details] [diff] [review] 1265978_part2.5_dump_reader.patch Review of attachment 8744168 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaDecoder.cpp @@ +1879,5 @@ > void > MediaDecoder::DumpDebugInfo() > { > DUMP_LOG("metadata: channels=%u rate=%u hasAudio=%d hasVideo=%d, " > "state: mPlayState=%s mIsDormant=%d, mShuttingDown=%d", Do you need an end \n here? (I don't know how that function works)
Attachment #8744168 -
Flags: review?(jyavenard) → review+
Updated•8 years ago
|
Attachment #8744169 -
Flags: review?(jyavenard) → review+
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8744168 [details] [diff] [review] 1265978_part2.5_dump_reader.patch Review of attachment 8744168 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaDecoder.cpp @@ +1879,5 @@ > void > MediaDecoder::DumpDebugInfo() > { > DUMP_LOG("metadata: channels=%u rate=%u hasAudio=%d hasVideo=%d, " > "state: mPlayState=%s mIsDormant=%d, mShuttingDown=%d", DUMP_LOG calls NS_DebugBreak(NS_DEBUG_WARNING, ...) which appends '\n' at the end. https://dxr.mozilla.org/mozilla-central/source/xpcom/base/nsDebugImpl.cpp#370 @@ +1885,5 @@ > PlayStateStr(), mIsDormant, mShuttingDown); > + > + nsString str; > + GetMozDebugReaderData(str); > + DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get()); The string returned by GetMozDebugReaderData() already contains new lines. We insert a '\n' in the middle for pretty print. With '\n' in the middle: [Child 31890] WARNING: Decoder=7f627479f800 reader data: audio decoder: ffmpeg audio decoder audio frames decoded: 35 video decoder: ffmpeg video decoder hardware video decoding: disabled video frames decoded: 71 (skipped:0) Dumping data for demuxer 7f627479fc00: Dumping Audio Track Buffer(audio/mp4a-latm): - mLastAudioTime: 1.625396 NumSamples:53 Size:13628 NextGetSampleIndex:4294967295 NextInsertionIndex:53 Buffered: ranges=[(0.000000, 1.625396), (3.204353, 4.040272)] Dumping Video Track Buffer(video/avc) - mLastVideoTime: 1.696666 NumSamples:72 Size:79426 NextGetSampleIndex:48 NextInsertionIndex:72 Buffered: ranges=[(0.095000, 1.696666), (3.298333, 4.100000)] Without: [Child 31890] WARNING: Decoder=7f627479f800 reader data:audio decoder: ffmpeg audio decoder audio frames decoded: 35 video decoder: ffmpeg video decoder hardware video decoding: disabled video frames decoded: 71 (skipped:0) Dumping data for demuxer 7f627479fc00: Dumping Audio Track Buffer(audio/mp4a-latm): - mLastAudioTime: 1.625396 NumSamples:53 Size:13628 NextGetSampleIndex:4294967295 NextInsertionIndex:53 Buffered: ranges=[(0.000000, 1.625396), (3.204353, 4.040272)] Dumping Video Track Buffer(video/avc) - mLastVideoTime: 1.696666 NumSamples:72 Size:79426 NextGetSampleIndex:48 NextInsertionIndex:72 Buffered: ranges=[(0.095000, 1.696666), (3.298333, 4.100000)]
Comment 13•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b709b8c79756 https://hg.mozilla.org/integration/mozilla-inbound/rev/8dc7d569b770 https://hg.mozilla.org/integration/mozilla-inbound/rev/26fbf6f91bf9 https://hg.mozilla.org/integration/mozilla-inbound/rev/ad66fdaa938a
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b709b8c79756 https://hg.mozilla.org/mozilla-central/rev/8dc7d569b770 https://hg.mozilla.org/mozilla-central/rev/26fbf6f91bf9 https://hg.mozilla.org/mozilla-central/rev/ad66fdaa938a
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•