Closed Bug 1165825 Opened 5 years ago Closed 5 years ago

MediaCodecReader: testcase test_playback.html failed.

Categories

(Core :: Audio/Video, defect)

Unspecified
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bechen, Assigned: bechen)

References

Details

Attachments

(1 file, 1 obsolete file)

STR:
Enable MediaCodec preference.
Run dom/media/test/test_playback.html on kk-emulator.

Testcase will timeout, seems something wrong while playing mp3 file.

[07:58:49.426] owl-funnier-id3.mp3-54 got ended
[07:58:49.563] owl-funnier-id3.mp3-54 got emptied
[07:58:49.572] vbr-head.mp3-56 got play
[07:58:49.573] vbr-head.mp3-56 got waiting
[07:58:49.574] owl-funnier-id3.mp3-54 got loadstart
[07:58:49.580] owl-funnier-id3.mp3-54 got error
[07:58:49.583] vbr-head.mp3-56 got loadstart
TEST-PASS | unknown test url | vbr-head.mp3: Name should match #3
[07:58:49.635] vbr-head.mp3-56 got suspend
TEST-PASS | unknown test url | vbr-head.mp3: Name should match #1
TEST-PASS | unknown test url | vbr-head.mp3 duration (10.03102) should be around 10
TEST-PASS | unknown test url | vbr-head.mp3 isEncrypted should be true if we have decryption keys
[07:58:50.44]  vbr-head.mp3-56 got loadedmetadata
[07:58:50.74]  vbr-head.mp3-56 got loadeddata
[07:58:50.75]  vbr-head.mp3-56 got canplay
[07:58:50.76]  vbr-head.mp3-56 got playing
[07:58:50.77]  vbr-head.mp3-56 got canplaythrough
After I print some log in MediaCodecReader, I found that there are 2 kinds of timeout.

1. In EnsureCodecFormatParsed() function, the return value of dequeueOutputBuffer is INFO_FORMAT_CHANGED.
Then no ERROR_END_OF_STREAM signal in DecodeAudioDataSync()

2. In EnsureCodecFormatParsed() function the return value of dequeueOutputBuffer is ERROR_END_OF_STREAM then INFO_FORMAT_CHANGED.
Still no ERROR_END_OF_STREAM signal in DecodeAudioDataSync().

So the patch in bug 1154194 may need modify again.
Correct the comment 1.
2. In EnsureCodecFormatParsed() function the return value of dequeueOutputBuffer is -11 then INFO_FORMAT_CHANGED.
Still no ERROR_END_OF_STREAM signal in DecodeAudioDataSync().
The root cause is that in EnsureCodecFormatParsed(), we do not release the bufferIndex which contains INFO_FORMAT_CHANGED, so the INFO_FORMAT_CHANGED buffer still keeps there. Makes the DecodeAudioDataTask() decode nothing and no response for the mAudioPromise.
Attached patch bug-1165825.v01.patch (obsolete) — Splinter Review
1. Release the buffer which contain INFO_FORMAT_CHANGED (comment 3)
2. If the DecodeVideoFrameSync and DecodeAudioDataSync doesn't decode a valid sample, re-trigger the task again because we still hold a MediaPromise.
(In testcase, the dequeueOutputBuffer might return OK but there is no valid DataBuffer.)
Attachment #8613445 - Flags: review?(sotaro.ikeda.g)
Attachment #8613445 - Flags: review?(sotaro.ikeda.g) → review+
r=sotaro
try server: https://treeherder.mozilla.org/#/jobs?repo=try&revision=12ac876bd965
Attachment #8613445 - Attachment is obsolete: true
Attachment #8613950 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/52661b02eaad
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.