To support mochitests, report change in video decode suspend state via
events mozentervideosuspend/mozexitvideosuspend.
MozReview-Commit-ID: EwMduLzcMVg
--HG--
extra : rebase_source : 5f1fed90964fae182f06d9fb480491728c5f1c97
The duration in the MediaDecoder is the canonical. It has as such a more up to date value than the mirror.
Under some circumstances, the MDSM may have reached the end of media playback before the duration mirror had time to update. So perform the currentTime adjustment in the MediaDecoder instead.
MozReview-Commit-ID: 1RFr4mT5LpA
--HG--
extra : rebase_source : 3151d86561b53d5d1922c7c16f042792bfd47283
1. Called from SourceBuffer::AppendDataCompletedWithSuccess() where mMediaSource->GetDecoder() is not null.
2. Called from MediaDecoder::ResourceCallback::NotifyBytesDownloaded() which is disconnected in Shutdown().
MozReview-Commit-ID: 103pxZP02Bb
--HG--
extra : rebase_source : 72e8a9c29d5ca6a4932de3a119497b05bfadbe68
1. Called from SourceBuffer::AppendDataCompletedWithSuccess() where mMediaSource->GetDecoder() is not null so this must happen before Shutdown().
2. Called from SourceBuffer::Ended() where mMediaSource->GetDecoder() is not null.
3. Called from MediaDecoder::ResourceCallback::TimerCallback() which is canceled in Disconnect().
MozReview-Commit-ID: 5dqVuOcrABy
--HG--
extra : rebase_source : a134f552c4fae2317cbf93dc1e861199d4c91346
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.
MozReview-Commit-ID: 5bqEMpemwuR
--HG--
extra : transplant_source : %008z%D8W%EE%87%8E%E9/%2CT%26%EBvo%AE%099%A6
1. It is called from OnSeekResolved() which asserts !IsShutdown().
2. It is called from UpdateLogicalPosition which asserts !IsShutdown().
MozReview-Commit-ID: J8iuHdUamLS
--HG--
extra : rebase_source : 97215383aa7c409f8b63f5a6726b81df53252227
1. It is called from DormantTimerExpired(). The timer is canceled in Shutdown().
2. It is called from NotifyOwnerActivityChanged() which happens before Shutdown().
3. It is called from Play() which happens before Shutdown().
4. It is called from Seek() which happens before Shutdown().
MozReview-Commit-ID: EnKHF61FBXf
--HG--
extra : rebase_source : 04df59b6722c8340e5163a00eb916442799cfcf1
We don't need to check IsShutdown() which is a subset of |mPlayState != PLAY_STATE_PAUSED && !IsEnded()|.
MozReview-Commit-ID: BjYoLOLuPfC
--HG--
extra : rebase_source : 0d04b30a8bf955faed4907f77f0da29e0ccc011d
1. It is called from DurationChanged() which returns early when IsShutdown() is true.
2. It is called from Play() when IsEnded() is true.
MozReview-Commit-ID: Ixy5OMZHxIm
--HG--
extra : rebase_source : 4cd7229084c6af8b7123ee6c85156ef4932308f3
1. It is called from ChangeState() when IsEnded() is true.
2. It is called from OnMetadataUpdate(). The callback is disconnected in Shutdown().
MozReview-Commit-ID: 8m4jtcl91hT
--HG--
extra : rebase_source : 0988128ec6d05f07ab7b072cc70a9c2970c829c5
1. Pause() is called from HTMLMediaElement and happens before Shutdown().
2. Pause() is called from SetPlaybackRate() which is called from HTMLMediaElement.
MozReview-Commit-ID: DDr7Bg8jkF2
--HG--
extra : rebase_source : 8b8a4fdc914d0bce7572d9a1ccb0f530bdba062c
FireTimeUpdate() is only called from UpdateLogicalPositionInternal() which returns early when IsShutdown() is true.
MozReview-Commit-ID: 4GZwrI85aXj
--HG--
extra : rebase_source : 9d7cbd571fd794369c833723ea5fc50a26380e51
1. ConstructMediaTracks() is called from ChangeState() when |mPlayState == PLAY_STATE_PLAYING|.
2. ConstructMediaTracks() is called from MetadataLoaded() which asserts |!IsShutdown()|.
MozReview-Commit-ID: 6OaPYcCOCii
--HG--
extra : rebase_source : 9db9e841fe8a0d797a39cd527abf4f4e95b67131
1. It is called from DormantTimerExpired(). The timer is canceled in Shutdown().
2. It is called from NotifyOwnerActivityChanged() which happens before Shutdown().
3. It is called from Play() which happens before Shutdown().
4. It is called from Seek() which happens before Shutdown().
MozReview-Commit-ID: EnKHF61FBXf
--HG--
extra : rebase_source : 04df59b6722c8340e5163a00eb916442799cfcf1
We don't need to check IsShutdown() which is a subset of |mPlayState != PLAY_STATE_PAUSED && !IsEnded()|.
MozReview-Commit-ID: BjYoLOLuPfC
--HG--
extra : rebase_source : 0d04b30a8bf955faed4907f77f0da29e0ccc011d
1. It is called from DurationChanged() which returns early when IsShutdown() is true.
2. It is called from Play() when IsEnded() is true.
MozReview-Commit-ID: Ixy5OMZHxIm
--HG--
extra : rebase_source : 4cd7229084c6af8b7123ee6c85156ef4932308f3
1. It is called from ChangeState() when IsEnded() is true.
2. It is called from OnMetadataUpdate(). The callback is disconnected in Shutdown().
MozReview-Commit-ID: 8m4jtcl91hT
--HG--
extra : rebase_source : 0988128ec6d05f07ab7b072cc70a9c2970c829c5
1. Pause() is called from HTMLMediaElement and happens before Shutdown().
2. Pause() is called from SetPlaybackRate() which is called from HTMLMediaElement.
MozReview-Commit-ID: DDr7Bg8jkF2
--HG--
extra : rebase_source : 8b8a4fdc914d0bce7572d9a1ccb0f530bdba062c
FireTimeUpdate() is only called from UpdateLogicalPositionInternal() which returns early when IsShutdown() is true.
MozReview-Commit-ID: 4GZwrI85aXj
--HG--
extra : rebase_source : 9d7cbd571fd794369c833723ea5fc50a26380e51
1. ConstructMediaTracks() is called from ChangeState() when |mPlayState == PLAY_STATE_PLAYING|.
2. ConstructMediaTracks() is called from MetadataLoaded() which asserts |!IsShutdown()|.
MozReview-Commit-ID: 6OaPYcCOCii
--HG--
extra : rebase_source : 9db9e841fe8a0d797a39cd527abf4f4e95b67131