JW Wang
5cb8d6a114
Bug 1311901 - document the internal states of MDSM. r=kaku,kikuo
...
MozReview-Commit-ID: 4fNJcjk6aMI
2016-10-21 11:37:00 +08:00
JW Wang
b954f17b66
Bug 1311267 - DecodingFirstFrameState should override HandleDormant(). r=kikuo
...
MozReview-Commit-ID: LGcvRJF3cNC
2016-10-19 14:25:42 +08:00
JW Wang
0be0c95a3a
Bug 1310140. Part 13 - handle resuming video decoding in various state objects. r=kaku,kamidphish
...
Note StateObject::HandleResumeVideoDecoding() doesn't check mIsReaderSuspended
because if the reader is suspended, MDSM must be in the dormant state and won't
resume video decoding.
MozReview-Commit-ID: FY4rdFmk56C
2016-10-18 14:56:36 +08:00
JW Wang
d1ebe8c51c
Bug 1310140. Part 12 - move the HasVideo() check into HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
If MDSM becomes invisible while decoding metadata, VisibilityChanged() will return early
because mInfo is still nothing. And MDSM will never suspend video decoding if there are no
visibility changes later. We should delay the check util the timer goes off and MDSM
needs to switch on the blank decoder.
MozReview-Commit-ID: Ids9MncpC2l
2016-10-18 14:07:07 +08:00
JW Wang
d653e26d00
Bug 1310140. Part 11 - make StateObject::HandleVideoSuspendTimeout() pure virtual for all sub-classes override it. r=kaku,kamidphish
...
MozReview-Commit-ID: 2uZHm3NZIFV
2016-10-18 13:58:34 +08:00
JW Wang
e77286daa6
Bug 1310140. Part 10 - have SeekingState handle suspend-video-decoding. r=kaku,kamidphish
...
MozReview-Commit-ID: DRGfP3VN2OG
2016-10-18 11:11:38 +08:00
JW Wang
ff96c76b2b
Bug 1310140. Part 9 - add ShutdownState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: GBXL3U1uxFW
2016-10-18 10:55:56 +08:00
JW Wang
89515fd80c
Bug 1310140. Part 8 - add CompletedState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: LOrecImz2Cr
2016-10-18 10:54:39 +08:00
JW Wang
d3410b0e7e
Bug 1310140. Part 7 - add BufferingState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: IAhR9v3svpT
2016-10-18 10:52:24 +08:00
JW Wang
b46b8f2b75
Bug 1310140. Part 6 - have DecodingState handle suspend-video-decoding. r=kaku,kamidphish
...
MozReview-Commit-ID: 3GxHdxZCiwE
2016-10-18 10:48:46 +08:00
JW Wang
87264ba4d6
Bug 1310140. Part 5 - add DecodingFirstFrameState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: 9CAE5XOQFtQ
2016-10-18 10:40:52 +08:00
JW Wang
239f6821ee
Bug 1310140. Part 4 - add DormantState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: GYBC3nS1PlF
2016-10-18 10:35:23 +08:00
JW Wang
a6e0e67157
Bug 1310140. Part 3 - add WaitForCDMState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: 9fPBDrt8Tgi
2016-10-18 10:33:37 +08:00
JW Wang
34353f88a0
Bug 1310140. Part 2 - add DecodeMetadataState::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: 5NCo9ooQEvU
2016-10-18 10:31:17 +08:00
JW Wang
a606d32dd1
Bug 1310140. Part 1 - add StateObject::HandleVideoSuspendTimeout(). r=kaku,kamidphish
...
MozReview-Commit-ID: 1qyDJzogSR8
2016-10-18 10:29:14 +08:00
JW Wang
72bad93267
Bug 1310556 - keep |this| alive to avoid UAF. r=JamesCheng
...
MozReview-Commit-ID: 19glCcrheru
2016-10-17 14:23:52 +08:00
JW Wang
325d83ce24
Bug 1310537 - delay dormant handling until we exit WaitForCDMState. r=kikuo
...
The purpose of dormant state is to release decoders. we can delay handling dormant until we really need to decode.
MozReview-Commit-ID: GW4y8d40DLi
2016-10-14 15:15:18 +08:00
JW Wang
dad492d2c4
Bug 1310594 - MDSM::DumpDebugInfo() should dispatch the printing task immediately. r=kaku
...
MozReview-Commit-ID: 2FQlWJ0YnHJ
2016-10-17 16:22:34 +08:00
JW Wang
7d21e1f32b
Bug 1310086. Part 3 - let SeekingState/ShutdownState::Enter() return a promise. r=kaku
...
MozReview-Commit-ID: 4TvsISriclT
2016-10-13 13:53:32 +08:00
JW Wang
920cf252bc
Bug 1310086. Part 2 - devirtualize StateObject::Enter() so it can have different parameters and return types for each subclass. r=kaku
...
MozReview-Commit-ID: 4RDL99rSIFD
2016-10-12 14:16:40 +08:00
JW Wang
4d6c658a0f
Bug 1310086. Part 1 - add an assertion to StateObject::SetState(). r=kaku
...
It can be proven that SetState() always transitions to a different state except for the seeking state
for it is possible to seek again in the middle of seeking.
MozReview-Commit-ID: 4bdkAelcZoO
2016-10-12 14:04:25 +08:00
JW Wang
58eccb5540
Bug 1309142. Part 2 - add StateObject::HandleShutdown(). r=JamesCheng
...
MozReview-Commit-ID: 64VPA1fxLzF
2016-10-11 16:20:23 +08:00
JW Wang
5fbdf57338
Bug 1309142. Part 1 - move some code to the entry action of ShutdownState. r=JamesCheng
...
MozReview-Commit-ID: 81RgoNaTDVH
2016-10-11 16:10:14 +08:00
JW Wang
d6e4b7ebdf
Bug 1309136 - Move MDSM::MaybeStartBuffering into DecodingState. r=JamesCheng
...
MozReview-Commit-ID: 37cuIsA3j7F
2016-10-11 15:54:33 +08:00
JW Wang
9c058c7a67
Bug 1309116. Part 4 - fix remaining calls to MDSM::SetState() and remove unused functions. r=kaku
...
MozReview-Commit-ID: EytZ8qrQJRn
2016-10-11 14:58:29 +08:00
JW Wang
1de7e5048a
Bug 1309116. Part 3 - replace InitiateSeek() with StateObject::SetState(). r=kaku
...
MozReview-Commit-ID: 3iXZ5r402rz
2016-10-11 14:56:52 +08:00
JW Wang
f2c7cdcc5c
Bug 1309116. Part 2 - rewrite StateObject::SetState using variadic template. r=kaku
...
MozReview-Commit-ID: 3ofT2po9B4Q
2016-10-11 14:41:07 +08:00
JW Wang
1018104b93
Bug 1309116. Part 1 - move some functions out of class definition because we need to see the complete definition when trying to 'new' an object. r=kaku
...
MozReview-Commit-ID: 3pOPiFeAnPI
2016-10-11 14:22:24 +08:00
JW Wang
6e0d206e32
Bug 1306551 - don't update playback position for video-only seek when seek is completed. r=kaku
...
MozReview-Commit-ID: 7vByX0pPNo
2016-10-06 17:06:58 +08:00
JW Wang
89c1b5c383
Bug 1309111 - Some macros are not expanded correctly by MSVC. r=gerald
...
MozReview-Commit-ID: BGJXOgslSt8
2016-10-11 13:28:56 +08:00
JW Wang
f27179e09b
Bug 1307725. Part 8 - move DonePrerolling{Audio,Video} into DecodingState. r=kikuo
...
MozReview-Commit-ID: I173Qo7hH9X
2016-10-05 17:40:01 +08:00
JW Wang
692f75e8d8
Bug 1307725. Part 7 - move mIsPrerolling into DecodingState. r=kikuo
...
MozReview-Commit-ID: kHNnGepY53
2016-10-05 17:30:38 +08:00
JW Wang
2e3b331834
Bug 1307725. Part 6 - move mIsPrerolling out of MDSM::DumpDebugInfo(). r=kikuo
...
MozReview-Commit-ID: 3BkJIRcW5oV
2016-10-05 17:28:13 +08:00
JW Wang
96ba3ae525
Bug 1307725. Part 5 - move the check of mIsPrerolling out of MaybeStartPlayback(). r=kikuo
...
Note CompletedState doesn't need to check this flag because prerolling should be done when entering the COMPLETED state.
MozReview-Commit-ID: 4Z7mFYf7wdR
2016-10-05 17:21:47 +08:00
JW Wang
91dc00dc0c
Bug 1307725. Part 4 - move MaybeStopPrerolling() into DecodingState. r=kikuo
...
MozReview-Commit-ID: JiedugPhOMU
2016-10-05 17:15:27 +08:00
JW Wang
54f5fa06b5
Bug 1307725. Part 3 - add StateObject::HandleWaitingForData to handle NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA. r=kikuo
...
MozReview-Commit-ID: 9SO9cwVMQK7
2016-10-05 17:11:41 +08:00
JW Wang
9865c14004
Bug 1307725. Part 2 - handle prerolling in DecodingState::HandleEndOfStream() and move it to the public section. r=kikuo
...
MozReview-Commit-ID: DMlLV8KLXvQ
2016-10-05 17:07:55 +08:00
JW Wang
bc596e90c0
Bug 1307725. Part 1 - add StateObject::HandleAudioCaptured() to handle audio capture. r=kikuo
...
MozReview-Commit-ID: JoBQSte4MML
2016-10-05 17:03:08 +08:00
JW Wang
f346fc169b
Bug 1308603 - add some assertions to debug crash. r=kaku
...
MozReview-Commit-ID: DpWRbgwIzla
2016-10-11 11:11:42 +08:00
JW Wang
7e5d2fdbea
Bug 1308078. Part 2 - no need to store mQueuedSeek in WaitForCDMState::HandleDormant. r=kaku
...
Because we haven't decoded any data and are at position 0, there is no need to seek when exiting the dormant state.
MozReview-Commit-ID: AKAcqW3HfRN
2016-10-06 15:11:45 +08:00
JW Wang
b84f380548
Bug 1308078. Part 1 - Don't decode metadata again when exiting the dormant state. r=kaku
...
MozReview-Commit-ID: JBzxcePE8F8
2016-10-06 14:57:29 +08:00
JW Wang
9d76a59f25
Bug 1308071. Part 3 - early return from VisibilityChanged() if mInfo is nothing. r=kaku
...
VisibilityChanged() could be called before reading metadata.
MozReview-Commit-ID: F3OIiC4mXo3
2016-10-06 11:28:01 +08:00
JW Wang
d24645898b
Bug 1308071. Part 2 - remove unused members. r=kaku
...
MozReview-Commit-ID: J3OHVA3VeXA
2016-10-06 11:26:29 +08:00
JW Wang
b38758f54c
Bug 1308071. Part 1 - Change the type of MDSM::mInfo to Maybe<MediaInfo>. r=kaku
...
MozReview-Commit-ID: 4rJfO1w9jYr
2016-10-06 11:25:24 +08:00
JW Wang
637fac9190
Bug 1308066 - remove mLowDataThresholdUsecs. r=kikuo
...
MozReview-Commit-ID: ZM2v6rsX2U
2016-10-05 16:17:17 +08:00
JW Wang
5e563ff354
Bug 1308065 - move mBufferingWait into BufferingState. r=kikuo
...
MozReview-Commit-ID: 9xs2OKcmg95
2016-10-05 16:15:17 +08:00
JW Wang
2e1b597346
Bug 1307699. Part 9 - replace mCurrentSeek with mSeekJob. r=kaku
...
MozReview-Commit-ID: KJVP7BExVEm
2016-10-05 15:33:44 +08:00
JW Wang
2d8b7f8140
Bug 1307699. Part 8 - move mCurrentSeek into SeekingState. r=kaku
...
MozReview-Commit-ID: LXzyK4U01VG
2016-10-05 15:25:56 +08:00
JW Wang
e4057d73d0
Bug 1307699. Part 7 - remove null-checks for mSeekTask which is guaranteed to be non-null by Enter(). r=kaku
...
Also we don't nullify mSeekTask in Exit() because the state object will be deleted soon after Exit().
MozReview-Commit-ID: 9wTJ5yiZbhD
2016-10-05 15:18:31 +08:00
JW Wang
da314ce4af
Bug 1307699. Part 6 - remove comments that are no longer valid. r=kaku
...
MozReview-Commit-ID: 3HYk4raLgDh
2016-10-05 15:15:57 +08:00