JW Wang
5f4ffc9dd2
Bug 1362910. P2 - fix callers. r=gerald
...
Since RefPtr<T>&& can't be converted to T* implicitly, we need to change
T* to RefPtr<T> in resolve/reject callbacks to make it compile again.
We should review the changes later to look for the opportunity to
optimize away unnecessary AddRef/Release pairs.
MozReview-Commit-ID: 22rHQ8dhxJv
2017-05-11 08:30:39 +08:00
JW Wang
4a39105d5a
Bug 1361756 - don't reset decoders when entering dormant. r=kaku
...
Resetting decoders somehow cause the WebM demuxer to seek and initiate
network download which is blocked by the site for invisible media elements.
See comment 5 for how this blocks playback.
We work around this issue by not resetting decoders when entering dormant
since we will reset them anyway during seeking when exiting dormant.
This change is a workaround for this bug though. However it is also an
improvement for the dormant state in general since it removes unnecessary
works to improve performance.
MozReview-Commit-ID: KtbpQlrO8J
2017-05-05 11:14:46 +08:00
Chris Pearce
1857e3bb8e
Bug 1361629 - Only call timeBeginPeriod/timeEndPeriod when media playback starts/stops. r=jwwang
...
MozReview-Commit-ID: B3YCoGMY5Ab
2017-05-04 16:54:19 +12:00
Sebastian Hengst
c0c0daeb09
Backed out changeset a39a98ffb29b (bug 1359058) for failing mochitest dom/canvas/test/webgl-conf/generated/test_conformance__textures__misc__texture-npot-video.html on Windows. r=backout
2017-05-05 00:34:05 +02:00
JW Wang
0dd6e48a0c
Bug 1359058: P1. handle EOS during seeking. r=jya
...
MozReview-Commit-ID: DPT3t1pi6o1
2017-04-26 11:32:50 +08:00
JW Wang
bed26355de
Bug 1361263 - allow InvokeAsync() to accept a member function which is pass-by-reference. r=gerald
...
StoreCopyPassByRRef<> ensures a copy is stored in the runnable.
We don't have to worry about the concern of bug 1300476.
MozReview-Commit-ID: DHqlzlVLBFV
2017-04-30 15:37:19 +08:00
Kaku Kuo
588b5bfa9e
Bug 1358057 P1 - don't use fastseek while resuming video decoder to the last frame; r=jwwang
...
MozReview-Commit-ID: Luat2cPO33F
2017-04-25 16:01:43 +08:00
JW Wang
90a0fb1db0
Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
...
MozReview-Commit-ID: 5FAVNo32fl7
2017-04-25 14:57:55 +08:00
JW Wang
c4ccd10c57
Bug 1358972. P2 - remove MediaDecoder::mEstimatedDuration and its friends which is never modified. r=kaku
...
MozReview-Commit-ID: 7W331tookXV
2017-04-17 17:20:06 +08:00
JW Wang
d24c707be3
Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
...
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.
MozReview-Commit-ID: LRz9d4yKBYJ
2017-04-24 17:33:05 +08:00
JW Wang
b447b29002
Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
...
MozReview-Commit-ID: 4bVeqIuWO2O
2017-04-14 17:13:36 +08:00
JW Wang
49c8a33ce8
Bug 1356502. P2 - let VideoData::UpdateTimestamp() take a TimeUnit instead of ambiguous int64_t. r=gerald
...
MozReview-Commit-ID: G17uLSrjBrR
2017-04-14 14:17:04 +08:00
JW Wang
3d95d557fb
Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
...
MozReview-Commit-ID: DBQELBs32Ad
2017-04-14 14:14:08 +08:00
Kaku Kuo
9032c1c47b
Bug 1355031 P2 - make sure that VideoOnlySeekBegin and VideoOnlySeekCompleted are always dispatched in pair; r=jwwang
...
MozReview-Commit-ID: FV03vlMtjS3
2017-04-10 17:33:38 +08:00
Kaku Kuo
6b214a05f3
Bug 1355031 P1 - adjust the event order; r=jwwang
...
(EnterVideoSuspend/ExitVideoSuspend) event pair and (VideoOnlySeekBegin/VideoOnlySeekCompleted) event pair should not interleave each other.
MozReview-Commit-ID: HehMIls11nc
2017-04-10 17:32:39 +08:00
JW Wang
3185b16e06
Bug 1353644 - change the type of EXHAUSTED_DATA_MARGIN_USECS to TimeUnit. r=kaku
...
MozReview-Commit-ID: CXc9DjoUc4m
2017-03-29 15:04:50 +08:00
Kaku Kuo
96351de5ff
Bug 1354465 P1 - dispatch a mozvideoonlyseekbegin event while starting a video-only seek; r=jwwang
...
MozReview-Commit-ID: 6PjQs88vUV2
2017-04-07 16:11:34 +08:00
JW Wang
121311236c
Bug 1353607. P12 - replace |TimeUnit::ToMicroseconds()*double| with |TimeUnit::MultDouble()|. r=kikuo
...
MozReview-Commit-ID: 3QIBCCNf5G0
2017-03-29 15:00:46 +08:00
JW Wang
acf3547403
Bug 1353607. P11 - use TimeUnit in RecomputeDuration(). r=kikuo
...
MozReview-Commit-ID: F16erI0580V
2017-03-29 14:52:08 +08:00
JW Wang
218f131478
Bug 1353607. P10 - use TimeUnit in DropAudioUpToSeekTarget(). r=kikuo
...
MozReview-Commit-ID: 42HtGkCUsYI
2017-03-29 14:46:15 +08:00
JW Wang
d8efb886ee
Bug 1353607. P9 - change the underlying type of mCurrentPosition to TimeUnit. r=kikuo
...
MozReview-Commit-ID: ffquOIFlp3
2017-03-28 18:13:22 +08:00
JW Wang
955f28dc02
Bug 1353607. P7 - remove the unused function. r=kikuo
...
MozReview-Commit-ID: AWf7ritkbJ5
2017-03-28 17:29:24 +08:00
JW Wang
58b3101e9b
Bug 1353607. P6 - use TimeUnit in CheckSlowDecoding(). r=kikuo
...
MozReview-Commit-ID: 524aRA1uUaQ
2017-03-28 17:27:56 +08:00
JW Wang
b3d4c8b3af
Bug 1353607. P5 - change the type of mDecodedAudioEndTime/mDecodedVideoEndTime to TimeUnit. r=kikuo
...
MozReview-Commit-ID: 2bVQD5BViU4
2017-03-28 17:20:17 +08:00
JW Wang
1ab2ec60d3
Bug 1353607. P4 - change the type of mFragmentEndTime to TimeUnit. r=kikuo
...
MozReview-Commit-ID: FhUZMpXokSt
2017-03-28 17:14:01 +08:00
JW Wang
c89dafdd13
Bug 1353607. P3 - use TimeUnit in ScheduleStateMachineIn(). r=kikuo
...
MozReview-Commit-ID: 5mfquK9TiDa
2017-03-28 17:10:59 +08:00
JW Wang
fd7e768385
Bug 1353607. P2 - let GetDecodedAudioDuration() return a TimeUnit. r=kikuo
...
MozReview-Commit-ID: 5pLyACshP3e
2017-03-28 16:54:39 +08:00
Kaku Kuo
bbefc8df79
Bug 1352934 - make the seek operation at StateObject::HandleResumeVideoDecoding() unobservable; r=jwwang
...
The seeking operation WAS unobservable before Bug 1309494.
It was changed to be observable because I want the "canplay" event, which will be dispatched after the seeking operation is done,
to notify our video controller to cancel the throbber(which will be shown if the decoder resuming cannot be done in 250 ms).
Now, we can change the seeking operatoin back to unobservable thanks to bug 1350852.
In bug 1350852, we dispatche a specific "mozvideoonlyseekcompleted" event to cancel the throbber.
MozReview-Commit-ID: Ke9sqDPotAB
2017-04-06 15:14:37 +08:00
Kaku Kuo
77e8fbff1f
Bug 1349097 P2 - let CompletedState::HandleResumeVideoDecoding() seek to the last video frame; r=jwwang
...
StateObject::HandleResumeVideoDecoding() seeks to the current media time, however, if the playback had
ended and we would like to resume its video decoder, we should seek to the last video frame since the
audio might be longer than the video.
MozReview-Commit-ID: E6gAy7Ds9vn
2017-03-28 11:30:32 +08:00
Kaku Kuo
3e98cf5feb
Bug 1349097 P1 - let HandleResumeVideoDecoding() take a const TimeUnit& argument; r=jwwang
...
MozReview-Commit-ID: BEBLUP9SwWC
2017-03-28 11:21:41 +08:00
JW Wang
af9e51c6c0
Bug 1352319. P12 - let CalculateNewCurrentTime() return a TimeUnit. r=kaku
...
MozReview-Commit-ID: 6bQdKvw0VEN
2017-03-28 16:44:40 +08:00
JW Wang
0a515e441e
Bug 1352319. P11 - change the type of NextFrameSeekingState::mCurrentTime to TimeUnit. r=kaku
...
MozReview-Commit-ID: Q4u92HgGdF
2017-03-28 16:38:26 +08:00
JW Wang
c969512705
Bug 1352319. P10 - let GetClock() return a TimeUnit. r=kaku
...
MozReview-Commit-ID: Efl1FemHOmJ
2017-03-28 16:35:24 +08:00
JW Wang
72eb7ebecb
Bug 1352319. P9 - let GetMediaTime() return a TimeUnit. r=kaku
...
MozReview-Commit-ID: 7vrIzeMLP4Z
2017-03-28 16:16:56 +08:00
JW Wang
566435dfca
Bug 1352319. P8 - use TimeUnit in UpdatePlaybackPosition(). r=kaku
...
MozReview-Commit-ID: JkopzDG45Bq
2017-03-28 16:01:55 +08:00
JW Wang
6ae4516f4e
Bug 1352319. P7 - use TimeUnit in UpdatePlaybackPositionInternal(). r=kaku
...
MozReview-Commit-ID: ASzjKhHlhVA
2017-03-28 15:57:38 +08:00
JW Wang
ea20d34466
Bug 1352319. P6 - let AudioEndTime/VideoEndTime return a TimeUnit. r=kaku
...
MozReview-Commit-ID: 6yyVl2RDrPm
2017-03-28 15:50:53 +08:00
JW Wang
0b0e8b0758
Bug 1352319. P5 - rename AudioPrerollUsecs and let it return a TimeUnit. r=kaku
...
MozReview-Commit-ID: C3IdeNksQjn
2017-03-28 15:42:09 +08:00
JW Wang
c0a53e65a6
Bug 1352319. P4 - move AudioPrerollUsecs/VideoPrerollFrames into DecodingState. r=kaku
...
MozReview-Commit-ID: 3VuDj1TXZV2
2017-03-28 15:38:34 +08:00
JW Wang
c2be4277de
Bug 1352319. P3 - use TimeUnit in HasLowBufferedData(). r=kaku
...
MozReview-Commit-ID: HP7M78yKpww
2017-03-28 15:09:30 +08:00
JW Wang
2b3f88367d
Bug 1352319. P2 - rename variables and fix comments. r=kaku
...
MozReview-Commit-ID: G7II28F00Qp
2017-03-28 14:58:03 +08:00
JW Wang
07b5001504
Bug 1352319. P1 - add LOW_BUFFER_THRESHOLD and replace the use of LOW_DATA_THRESHOLD_USECS with it. r=kaku
...
MozReview-Commit-ID: HNQR7Y93pAz
2017-03-28 14:56:35 +08:00
JW Wang
284534bfa1
Bug 1351203. P2 - rename the variable and fix comments. r=kaku
...
MozReview-Commit-ID: Bs2uanapqR9
2017-03-28 14:46:34 +08:00
JW Wang
2552749a1a
Bug 1351203. P1 - change the type of LOW_VIDEO_THRESHOLD_USECS to TimeUnit. r=kaku
...
MozReview-Commit-ID: 47uMuLTPFPt
2017-03-28 14:43:56 +08:00
JW Wang
0f33973878
Bug 1350837. P3 - rename the variable and fix comments. r=kaku
...
MozReview-Commit-ID: JI1sp6f6Xnb
2017-03-28 14:38:30 +08:00
JW Wang
b250622c28
Bug 1350837. P2 - change the type of mAmpleAudioThresholdUsecs to TimeUnit. r=kaku
...
MozReview-Commit-ID: 2de8DrlemaT
2017-03-28 14:27:26 +08:00
JW Wang
a663a3d7b5
Bug 1350837. P1 - add AMPLE_AUDIO_THRESHOLD and use it to replace AMPLE_AUDIO_USECS. r=kaku
...
Note we can't simply change the type of AMPLE_AUDIO_USECS to TimeUnit because it is
used in a static_assert and TimeUnit::ToMicroseconds() is not a const expression.
There is no easy way to change it because CheckedInt::value() calls MOZ_ASSERT which
can't be a const expression.
MozReview-Commit-ID: 17qaTFOOLpL
2017-03-28 14:21:01 +08:00
JW Wang
9ef03e22c8
Bug 1350832. P3 - rename variables and fix comments. r=kikuo
...
MozReview-Commit-ID: 1xA8doM1tAG
2017-03-27 16:28:02 +08:00
JW Wang
ef45147daa
Bug 1350832. P2 - change the type of mLowAudioThresholdUsecs to TimeUnit. r=kikuo
...
MozReview-Commit-ID: AurJRSuZkkg
2017-03-27 16:22:09 +08:00
JW Wang
a5f0c33313
Bug 1350832. P1 - change the type of LOW_AUDIO_USECS to TimeUnit. r=kikuo
...
MozReview-Commit-ID: GEemdvt5ldM
2017-03-27 16:15:35 +08:00