Closed
Bug 1307725
Opened 9 years ago
Closed 9 years ago
Move MDSM::mIsPrerolling into DecodingState
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla52
| Tracking | Status | |
|---|---|---|
| firefox52 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(8 files)
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
|
58 bytes,
text/x-review-board-request
|
kikuo
:
review+
|
Details |
Prerolling is the concern of DecodingState. Other states don't need to worry about it.
| Assignee | ||
Updated•9 years ago
|
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8799590 -
Flags: review?(kikuo)
Attachment #8799591 -
Flags: review?(kikuo)
Attachment #8799592 -
Flags: review?(kikuo)
Attachment #8799593 -
Flags: review?(kikuo)
Attachment #8799594 -
Flags: review?(kikuo)
Attachment #8799595 -
Flags: review?(kikuo)
Attachment #8799596 -
Flags: review?(kikuo)
Attachment #8799597 -
Flags: review?(kikuo)
Comment 9•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799590 [details]
Bug 1307725. Part 1 - add StateObject::HandleAudioCaptured() to handle audio capture.
https://reviewboard.mozilla.org/r/84712/#review83364
::: dom/media/MediaDecoderStateMachine.cpp
(Diff revision 1)
> - ScheduleStateMachine();
>
> // Don't buffer as much when audio is captured because we don't need to worry
> // about high latency audio devices.
> mAmpleAudioThresholdUsecs = mAudioCaptured ?
> detail::AMPLE_AUDIO_USECS / 2 :
> detail::AMPLE_AUDIO_USECS;
>
> - MaybeStopPrerolling();
> + mStateObj->HandleAudioCaptured();
The logic seems inequivalent to me here.
It's possible for |SetAudioCapture| being invoked in any state. Then by a call to |ScheduleStateMachine|, Further actions are expected if MDSM is entering either "Decodeing" or "Complete" state in the next cycle.
But now, you're assuming |HandleAudioCaptured| should do nothing (return false) in states other than "Decoding" and "Complete".
Would you elobarte on this ?
| Assignee | ||
Comment 10•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799590 [details]
Bug 1307725. Part 1 - add StateObject::HandleAudioCaptured() to handle audio capture.
https://reviewboard.mozilla.org/r/84712/#review83372
::: dom/media/MediaDecoderStateMachine.cpp
(Diff revision 1)
> - ScheduleStateMachine();
>
> // Don't buffer as much when audio is captured because we don't need to worry
> // about high latency audio devices.
> mAmpleAudioThresholdUsecs = mAudioCaptured ?
> detail::AMPLE_AUDIO_USECS / 2 :
> detail::AMPLE_AUDIO_USECS;
>
> - MaybeStopPrerolling();
> + mStateObj->HandleAudioCaptured();
ScheduleStateMachine() is called to start the media sink when the state is DECODING or COMPLETED. For other states, there is nothing to do. That is why the default implementation of HandleAudioCaptured() returns false and does nothing.
As you can see, ScheduleStateMachine() only makes sense for the state objects which implement Step(), e.g. BufferingState, DecodingState and CompletedState. And BufferingState doesn't care about switching media sinks.
Comment 11•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799590 [details]
Bug 1307725. Part 1 - add StateObject::HandleAudioCaptured() to handle audio capture.
https://reviewboard.mozilla.org/r/84712/#review83392
Attachment #8799590 -
Flags: review?(kikuo) → review+
Comment 12•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799591 [details]
Bug 1307725. Part 2 - handle prerolling in DecodingState::HandleEndOfStream() and move it to the public section.
https://reviewboard.mozilla.org/r/84714/#review83434
Attachment #8799591 -
Flags: review?(kikuo) → review+
Comment 13•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799594 [details]
Bug 1307725. Part 5 - move the check of mIsPrerolling out of MaybeStartPlayback().
https://reviewboard.mozilla.org/r/84720/#review83444
Attachment #8799594 -
Flags: review?(kikuo) → review+
Comment 14•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799595 [details]
Bug 1307725. Part 6 - move mIsPrerolling out of MDSM::DumpDebugInfo().
https://reviewboard.mozilla.org/r/84722/#review83452
Attachment #8799595 -
Flags: review?(kikuo) → review+
Comment 15•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799593 [details]
Bug 1307725. Part 4 - move MaybeStopPrerolling() into DecodingState.
https://reviewboard.mozilla.org/r/84718/#review83722
Attachment #8799593 -
Flags: review?(kikuo) → review+
Comment 16•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799592 [details]
Bug 1307725. Part 3 - add StateObject::HandleWaitingForData to handle NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA.
https://reviewboard.mozilla.org/r/84716/#review83724
Attachment #8799592 -
Flags: review?(kikuo) → review+
Comment 17•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799596 [details]
Bug 1307725. Part 7 - move mIsPrerolling into DecodingState.
https://reviewboard.mozilla.org/r/84724/#review83732
Attachment #8799596 -
Flags: review?(kikuo) → review+
Comment 18•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8799597 [details]
Bug 1307725. Part 8 - move DonePrerolling{Audio,Video} into DecodingState.
https://reviewboard.mozilla.org/r/84726/#review83734
looks good to me !
Attachment #8799597 -
Flags: review?(kikuo) → review+
| Assignee | ||
Comment 19•9 years ago
|
||
Thanks!
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 42•9 years ago
|
||
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/396368d32e74
Part 1 - add StateObject::HandleAudioCaptured() to handle audio capture. r=kikuo
https://hg.mozilla.org/integration/autoland/rev/ba15b92671b5
Part 2 - handle prerolling in DecodingState::HandleEndOfStream() and move it to the public section. r=kikuo
https://hg.mozilla.org/integration/autoland/rev/ffd86d831e2f
Part 3 - add StateObject::HandleWaitingForData to handle NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA. r=kikuo
https://hg.mozilla.org/integration/autoland/rev/77220cbb860a
Part 4 - move MaybeStopPrerolling() into DecodingState. r=kikuo
https://hg.mozilla.org/integration/autoland/rev/dc32593b8ae4
Part 5 - move the check of mIsPrerolling out of MaybeStartPlayback(). r=kikuo
https://hg.mozilla.org/integration/autoland/rev/ae9d99dd6a3d
Part 6 - move mIsPrerolling out of MDSM::DumpDebugInfo(). r=kikuo
https://hg.mozilla.org/integration/autoland/rev/b5c6affddc62
Part 7 - move mIsPrerolling into DecodingState. r=kikuo
https://hg.mozilla.org/integration/autoland/rev/428752cd4bf4
Part 8 - move DonePrerolling{Audio,Video} into DecodingState. r=kikuo
Comment 43•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/396368d32e74
https://hg.mozilla.org/mozilla-central/rev/ba15b92671b5
https://hg.mozilla.org/mozilla-central/rev/ffd86d831e2f
https://hg.mozilla.org/mozilla-central/rev/77220cbb860a
https://hg.mozilla.org/mozilla-central/rev/dc32593b8ae4
https://hg.mozilla.org/mozilla-central/rev/ae9d99dd6a3d
https://hg.mozilla.org/mozilla-central/rev/b5c6affddc62
https://hg.mozilla.org/mozilla-central/rev/428752cd4bf4
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•