mp4 playback can't leave dormant on gonk

RESOLVED FIXED in Firefox 43

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ayang, Assigned: ayang)

Tracking

unspecified
mozilla43
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
When decoder enters dormant state before decoding first frame. It can't leave dormant state even set SetDormant(false) because mQueuedSeek is always there without transiting to mPendingSeek.

It's reproduced on gonk but I think the same problem may also exist on other platforms.

[1] https://dxr.mozilla.org/mozilla-central/rev/d6ea652c579992daa9041cc9718bb7c6abefbc91/dom/media/MediaDecoderStateMachine.cpp#1327
(Assignee)

Updated

3 years ago
Blocks: 1123246
You can't enter dormant before decoding the first frame.

so how could you "decoder enters dormant state before decoding first frame" ?
(Assignee)

Comment 2

3 years ago
Created attachment 8645592 [details] [diff] [review]
dispath_task_if_decoding_first_frame

The DispatchDecodeTasksIfNeeded() should not return when decoding first frame.
Attachment #8645592 - Flags: review?(jwwang)
(Assignee)

Comment 3

3 years ago
There must be a mochitest for dormant in gonk, somehow it doesn't work. checking...
Comment on attachment 8645592 [details] [diff] [review]
dispath_task_if_decoding_first_frame

Review of attachment 8645592 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/MediaDecoderStateMachine.cpp
@@ +1507,5 @@
>        mState != DECODER_STATE_SEEKING) {
>      return;
>    }
>  
> +  if (mState == DECODER_STATE_DECODING && !IsDecodingFirstFrame() && mDecodingFrozenAtStateDecoding) {

80 columns formatting
Comment on attachment 8645592 [details] [diff] [review]
dispath_task_if_decoding_first_frame

Review of attachment 8645592 [details] [diff] [review]:
-----------------------------------------------------------------

https://hg.mozilla.org/mozilla-central/file/d6ea652c5799/dom/media/MediaDecoderStateMachine.cpp#l1261
I think we can just remove mDecodingFrozenAtStateDecoding which is an optimization to halt decoding when MDSM expect seek will happen immediately.

https://hg.mozilla.org/mozilla-central/file/d6ea652c5799/dom/media/MediaDecoderStateMachine.cpp#l1327
Since jya has kinda changed the timing to start seeking, MDSM now checks if there is a pending seek in StartDecoding(). This is exactly what mDecodingFrozenAtStateDecoding tries to optimize! Thanks to jya!
Attachment #8645592 - Flags: review?(jwwang) → review-
(Assignee)

Comment 6

3 years ago
Bug 1192733 for test case.
(Assignee)

Comment 7

3 years ago
Created attachment 8645623 [details] [diff] [review]
remove_mDecodingFrozenAtStateDecoding_in_MDSM
Attachment #8645592 - Attachment is obsolete: true
Attachment #8645623 - Flags: review?(jwwang)
Comment on attachment 8645623 [details] [diff] [review]
remove_mDecodingFrozenAtStateDecoding_in_MDSM

Review of attachment 8645623 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #8645623 - Flags: review?(jwwang) → review+
(Assignee)

Comment 9

3 years ago
Created attachment 8646258 [details] [diff] [review]
remove_mDecodingFrozenAtStateDecoding_in_MDSM
Attachment #8645623 - Attachment is obsolete: true
Attachment #8646258 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/633fb9a5405e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Blocks: 1193016
See Also: → bug 1195164
You need to log in before you can comment on or make changes to this bug.