Граф коммитов

307 Коммитов

Автор SHA1 Сообщение Дата
JW Wang 6ab3fdad07 Bug 1388228. P5 - move some more members to ChannelMediaDecoder. r=gerald
Those members only make sense for ChannelMediaResource.

MozReview-Commit-ID: 2z6WPQeJnIT

--HG--
extra : rebase_source : 7f43635ee91c8fad1d6ad6f56788e880d54beab2
2017-08-07 13:23:43 +08:00
JW Wang e5f016de87 Bug 1388228. P4 - move the implementation of MediaDecoder::CanPlayThroughImpl() down to ChannelMediaDecoder. r=gerald
Because GetStatistics() only makes sense for ChannelMediaResource.

MozReview-Commit-ID: HkEpb4frUx1

--HG--
extra : rebase_source : 7086721f47b381b692a165302ff3bdc13caa8b41
2017-08-07 11:48:43 +08:00
JW Wang 303f74001a Bug 1388228. P3 - following P2, we can now remove unused code and canonicals. r=gerald
Note we remove the log in BufferingState::Enter() which prevents us from
removing ChannelMediaResource related code from MDSM. We can add it back
in the future after the refactoring.

MozReview-Commit-ID: B94iOI0bTXC

--HG--
extra : rebase_source : 857b7420ab9b52c07dc8a917c1f9344096ed20e6
extra : source : 2c350a4f3cbdf6f446b5e1cc8d6e0892722866d0
2017-08-04 17:56:28 +08:00
JW Wang b4e54281c9 Bug 1388228. P2 - cache the result of CanPlayThrough() and mirror it to MDSM. r=gerald
So we don't duplicate the code of calculating CanPlayThrough from
download rate and playback rate in MediaDecoder.

MozReview-Commit-ID: 7M5JAuUxFFc

--HG--
extra : rebase_source : cb216a1af59b9d8207e3056a5d3ae05e93d85e74
extra : source : a183c089760e329508fac44239fee42c1f047b80
2017-08-04 17:38:20 +08:00
JW Wang 4eb2d7a53b Bug 1388228. P1 - move some members to ChannelMediaDecoder. r=gerald
These members are used only by ChannelMediaDecoder.

MozReview-Commit-ID: 10CHV1sjY9k

--HG--
extra : rebase_source : 2a9817a433cd098d818399e718a5c08d6b88df4c
extra : source : 5d606d67b79543adde8580d96f5aa7055fe0286c
2017-08-04 16:02:40 +08:00
JW Wang d685ec7cc3 Bug 1386956. P2 - move mResource to sub-classes. r=gerald
MozReview-Commit-ID: Ixx8NwZfjhO

--HG--
extra : rebase_source : 65529a6cf6736e6fde61ddd413efa6f38cd96922
extra : intermediate-source : 1d75a416e8452c356f533d13c3037cae07aeb291
extra : source : d14219446670baf0f02da86c412932ec59dbf178
2017-08-03 15:38:28 +08:00
JW Wang 17554a637a Bug 1385699. P4 - MediaDecoder::mExplicitDuration doesn't need to be a canonical anymore. r=cpearce
MozReview-Commit-ID: 4FUwQRS2K1m

--HG--
extra : rebase_source : 66b2f1a9fcdf54abd61f071847c1469ad3a3c5c4
extra : source : 0da2d6137100d1cb3ec33d5ce735252eeba3ac62
2017-08-01 15:06:13 +08:00
JW Wang 1ab15ede36 Bug 1385699. P3 - remove MediaDecoder::SetInfinite() and related code. r=cpearce
Since inf can be encoded in MDSM::mDuration, we don't need an additional flag
in MediaDecoder to indicate 'infinite' anymore. Note duration change from infinite
to finite is handled by MDSM, so we can remove the explicit calls to SetInfinite(false).

MozReview-Commit-ID: EoxwZJzPAJl

--HG--
extra : rebase_source : 669d7ed5b99a89b1827f60f89e0a21f08a18dedd
extra : source : a30b614784afe8772b2212728c1e4a2eac67f94b
2017-08-01 14:15:29 +08:00
JW Wang ca1f6bc7b4 Bug 1385748. P3 - MediaDecoder::mNextState doesn't need to be a canonical for it has no mirrors. r=kaku
MozReview-Commit-ID: HiiPcKK08az

--HG--
extra : rebase_source : 12db8d11fda2c07401d5ba4b7d4f6f946cc9fb5b
2017-07-31 10:21:43 +08:00
JW Wang 46e04d4ca0 Bug 1378295. P5 - remove AbstractMediaDecoder from MediaDecoder's base class. r=jya
MozReview-Commit-ID: lIAT21YMRR

--HG--
extra : rebase_source : 72fe91b3c17e448a8b8b748bc1a44f760ff48274
extra : intermediate-source : b1246c769384a69f23d4d88a63ccef636b79f6e1
extra : source : 9f4592b9d821ea775cea39e780c4dd4197aae8ad
2017-07-13 17:38:06 +08:00
JW Wang e8dccab6e2 Bug 1380568. P2 - remove AbstractMediaDecoder::NotifyDecodedFrames(). r=jya
MozReview-Commit-ID: AZyPseUiZLl

--HG--
extra : rebase_source : d95e84525ebde5311361daa588abe83ab7342882
extra : intermediate-source : 35bf63aab05dedec7248de5ff97572b078c430db
extra : source : 8e00ba5990178daefa228a011ad3eed629dcbcd6
2017-07-13 14:12:25 +08:00
Alastor Wu f235c5746c Bug 1274919 - part2 : implement resume/suspend mechanism in MediaDecoder. r=jwwang
Create the new class "BackgroundVideoDecodingPermissionObserver" to handle the
suspended request sent from the front end side.

We would do registration on startup and deregistration on shutdown of MediaDecoder.

MozReview-Commit-ID: 1UwHA7YuVN3

--HG--
extra : rebase_source : a0bc22999fbf799cd25da8ec423d9f03acc9e8e2
2017-07-20 14:13:37 +08:00
JW Wang 5370eb3105 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a

--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
2017-07-19 17:01:32 +08:00
Jean-Yves Avenard f50943d4cc Bug 1379190: P1. Remove AndroidMediaDecoder and relatives. r=cpearce
They are no longer supported and can't work with API >= 16

MozReview-Commit-ID: JkftKxW5OtY

--HG--
extra : rebase_source : 6ed4032141add293d21354640c96fc75adc565d9
2017-07-13 12:54:03 +02:00
JW Wang cda80ee431 Bug 1381758 - Remove the debug code added in bug 1326294. r=gerald
Bug 1326294 is fixed and we don't need the debug code anymore.
This help reduce the coupling with HTMLMediaElement and make MediaDecoder
easier to be reused by Servo.

MozReview-Commit-ID: KCwAjoQFPkS

--HG--
extra : rebase_source : 0c98899f63edb5971ddecb812635c9a6f693d448
2017-07-18 16:36:01 +08:00
JW Wang b9b872859b Bug 1380574 - remove the call to MediaDecoderOwner::DecodeWarning() from MediaFormatReader. r=gerald
Note we will move OnDecodeWarning() from MDR to MFR when removing MDR.

MozReview-Commit-ID: 92jpwy6ghH2

--HG--
extra : rebase_source : 72e84f364cdab589efe60e70a071816cb4404955
extra : intermediate-source : fc7ff704e2096935b949ed8b9f6e73945db56a79
extra : source : 6e65a382de5de478948d434fc238a6afe231d2ac
2017-07-13 15:02:06 +08:00
JW Wang dfccb2f79b Bug 1380569. P2 - plumb the 'waitingForKey' event into the media element. r=gerald
Note we put OnWaitingForKey() in MediaDecoderReader for MediaDecoder references
MDR instead of MFR. The function will be moved into MFR when we remove MDR and
have MediaDecoder reference MFR instead.

MozReview-Commit-ID: LBGfGmc6yFm

--HG--
extra : rebase_source : 473c95cf6eb5e7e4065f9c1251af7dacb78538a5
extra : intermediate-source : 85981e2bafa1047f8321c02de6f0726c32506811
extra : source : 5203bf6895273701ef36a81d2e827e7a7c219fdb
2017-07-13 14:49:23 +08:00
JW Wang 9b07417b6b Bug 1380545 - remove DispatchKeyNeededEvent from MediaFormatReader.cpp. r=gerald
We will use MediaEventSource to dispatch the 'encrypted' events.

MozReview-Commit-ID: KY3nS9OrysI

--HG--
extra : rebase_source : 4e1fa125b099567426f5a6ea2c825b77d407b2c4
extra : source : 8413b0625159d85a5814cb3bd748121653735e96
2017-07-13 11:18:07 +08:00
JW Wang ebbb3689a4 Bug 1380532. P2 - remove AbstractMediaDecoder::GetCrashHelper(). r=gerald
MozReview-Commit-ID: IDPifgdxwTd

--HG--
extra : rebase_source : 3ec3c6f7a9ab5144fbf060b40393b306dc9eef0c
extra : source : 1de26c9ff96d7fb9710a8a16d9e7ec8abd8113cb
2017-07-13 10:21:34 +08:00
JW Wang ac2b0f2173 Bug 1380234. P3 - remove AbstractMediaDecoder::CompositorUpdatedEvent() and its users. r=jya
MozReview-Commit-ID: JioS7MC5qFh

--HG--
extra : rebase_source : 9df457507bfcbcd1baa2e66af61781cc2a2ec06f
extra : source : af4993bcca5097628b12b4861074d8eed9163d9b
2017-07-12 16:49:59 +08:00
JW Wang 4ca981216d Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV

--HG--
extra : rebase_source : f0a628ab28a527fa7f79ec61672e988cf1def8e7
extra : source : c8c2a6f2506338a8208f3bcf56160c47e6a29000
2017-07-12 15:37:02 +08:00
JW Wang 1e7126b1fc Bug 1378631. P2 - remove AbstractMediaDecoder::CanonicalDurationOrNull(). r=jya
MozReview-Commit-ID: 9zWPcYZndsQ

--HG--
extra : rebase_source : 3c1c03528c21e08fea05b4de6fbfe73cd7d603d5
extra : intermediate-source : 9e5ab9f0ec1bd4536fe157dd530b374a791c600b
extra : source : 4e39231fbed1ea6ea6110b528308b73223878192
2017-07-06 11:38:27 +08:00
JW Wang 7c0fa4a961 Bug 1378316. P3 - remove AbstractMediaDecoder::DataArrivedEvent() and related code. r=gerald
MozReview-Commit-ID: 5V3RANftFe5

--HG--
extra : rebase_source : f5ed6366fd5b75625b015bc50b561f2d8259711d
extra : source : f75e723935f5bc45f8ffd9a88b842168a138da33
2017-07-05 17:37:46 +08:00
JW Wang 15da20ff70 Bug 1378316. P1 - store MediaDecoderReader in MediaDecoder. r=gerald
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.

MozReview-Commit-ID: 3RM66uTvYSc

--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
2017-07-05 17:21:17 +08:00
JW Wang 31837937da Bug 1378304. P4 - remove AbstractMediaDecoder::GetResource(). r=jya
MozReview-Commit-ID: KjHJyfxYwA6

--HG--
extra : rebase_source : aeca63220bff8d4f293a60304855d6fb1245a2d3
extra : source : 31882e43072808d6523fe093cbcbff6f907452fe
2017-07-05 14:36:11 +08:00
JW Wang 7d2785b4a8 Bug 1377370. P1 - let HLSDecoder override Load() so it can create an HLSResource directly without going through MediaResource::Create(). r=kikuo
MozReview-Commit-ID: BL8bt2JtKfa

--HG--
extra : rebase_source : 70231ab332fee2316e86aa73e834f108183b23d8
extra : source : e97125ebc28890e0d538c4ef4d8abc9232e69bac
2017-06-30 10:11:42 +08:00
JW Wang 1e2be3e873 Bug 1376363. P1 - store container type in MediaDecoder. r=gerald
So we can remove MediaResource::GetContentType() in the future.

MozReview-Commit-ID: zWUNF2uGpf

--HG--
extra : rebase_source : 04f50c4db9dac8503f878a8a1986e627f9a074a3
extra : source : 10737393beaabed640aa3ff67fac2a07567400b4
2017-06-26 17:10:47 +08:00
JW Wang 350f03bde7 Bug 1376227. P3 - move Load() down the class hierarchy. r=gerald
So we won't pass an unused |nsIStreamListener**| to MediaSourceDecoder::Load().

MozReview-Commit-ID: 2TCby8m8K5H

--HG--
extra : rebase_source : 349179aa4303c0abd8b86a695789770e158e5c28
extra : intermediate-source : d6f550bd6709a0ee7db6033286af42565a20cdb1
extra : source : ed524d855a1a78665c499152a9360ba961655641
2017-06-23 14:12:41 +08:00
JW Wang 1dbf0f77fa Bug 1376227. P2 - remove unused code following P1. r=gerald
MozReview-Commit-ID: JbwY1Owtk7H

--HG--
extra : rebase_source : 0f82ac16f56ce6ba27944b093b49c8ff6479e66c
extra : intermediate-source : 38c1c8a70fb0209f8c6a3ca596664db9af089763
extra : source : 7cfe394c4790ca7687db9004c96380f088c2bb59
2017-06-21 17:34:22 +08:00
JW Wang 6cd0d57b3c Bug 1374930. P4 - move ResourceCallback to ChannelMediaDecoder. r=cpearce
We also move some methods to protected so they are callable from ChannelMediaDecoder.

MozReview-Commit-ID: 6s9LKNkbJhX

--HG--
extra : rebase_source : 172ea88bc01552a90f5ef51db2b5af0ac5551c3b
extra : intermediate-source : a724333159c6b408e2fa68dba2d0a467f3c55940
extra : source : 03760e05ea8044b3404d29bb62205a2f62892d4b
2017-06-20 18:10:56 +08:00
JW Wang 61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
Jean-Yves Avenard 10d2da1b08 Bug 1374596: P7. Fix includes as per coding style. r=padenot
MozReview-Commit-ID: 5WfOWcOoxg0

--HG--
extra : rebase_source : 988c09623e83a0d9188d9ff5d705314e2c43e756
2017-06-20 17:56:55 +02:00
JW Wang 95284c8279 Bug 1374184. P3 - rename NotifyDownloadProgressed to DownloadProgressed for it is used internally by MediaDecoder and fix the comment. r=gerald
MozReview-Commit-ID: 6nUEjvZ73ko

--HG--
extra : rebase_source : 55d6a5b385258aa080974574a2bfc2ef722d6e00
extra : source : 9a5d941f74815acf189bdb4f85578a2634a632ae
2017-06-19 14:27:58 +08:00
JW Wang ca683c8fb9 Bug 1374184. P2 - merge NotifyDataArrived() and NotifyDownloadProgressed(). r=gerald
We also move NotifyDownloadProgressed() to private
since it won't be called outside MediaDecoder.

MozReview-Commit-ID: GISbJEW7wwx

--HG--
extra : rebase_source : a454e1477ad645e9e2ee9cab8b31332b38518836
extra : source : 8ca5e3e1fac96a150e5df8e4d06c11f85ee3257d
2017-06-19 14:24:40 +08:00
JW Wang ec8226f548 Bug 1374184. P1 - add NotifyDataArrivedInternal() and let ResourceCallback call it. r=gerald
MozReview-Commit-ID: GTmNrRtxJ0U

--HG--
extra : rebase_source : 1b3a86cf1cf24f01876cb43ff65ca4543c6a4da0
extra : source : 69bbedecae3f216c7144886bd1cb67c4a2acb44d
2017-06-19 14:15:00 +08:00
JW Wang f7b857d975 Bug 1373595. P3 - devirtualize NotifyDownloadProgressed which has no overrides at all. r=gerald
MozReview-Commit-ID: 7RoBvSc4fXP

--HG--
extra : rebase_source : cc95c56ab351165cf0069b970608df717843068d
2017-06-19 11:02:20 +08:00
JW Wang becfe61ebe Bug 1373595. P2 - rename NotifyBytesDownloaded to NotifyDownloadProgressed to better describe what it actually does. r=gerald
MozReview-Commit-ID: IOBY3UKAy0G

--HG--
extra : rebase_source : be4b9a53fa676ec0a628a09edecce74528f1e66a
2017-06-19 11:01:13 +08:00
JW Wang 480e189f8c Bug 1373595. P1 - merge MediaResourceCallback::NotifyDataArrived and NotifyBytesDownloaded. r=gerald
We now call NotifyDataArrived() after data written to the cache to notify
download progresses and buffer ranges re-calculation.

MozReview-Commit-ID: 3IrDuEYJYWu

--HG--
extra : rebase_source : 165a199952be32c8c4cd8f1c578b87826a267f10
2017-06-16 18:35:12 +08:00
JW Wang 27d3284709 Bug 1373589 - Remove MediaResourceCallback::NotifyDecodeError which has no callers at all. r=kaku
MozReview-Commit-ID: D2xqWHIiRBv

--HG--
extra : rebase_source : cc933811af40af3bebdbb8f3f1ca030cc8c622ef
2017-06-16 17:36:30 +08:00
JW Wang 75e01f7b0a Bug 1371202. P1 - plumb the 'loop' attribute into MDSM. r=jya
MozReview-Commit-ID: DtsaXmtQw76

--HG--
extra : rebase_source : 34686d455670975a824dc803a16b8acff97c86ab
extra : intermediate-source : 0de95b1644a365dda9beff4b75d56251da2258c7
extra : source : ba5b2599c949766395bf5b0381023a752bc6e04d
2017-06-08 12:03:10 +08:00
JW Wang a61afab096 Bug 1371514. P2 - remove MediaDecoder::mStateMachineIsShutdown. r=gerald
MozReview-Commit-ID: Dv2pdHW2tgI

--HG--
extra : rebase_source : aea740ced32fe31185127617102f026b1ad0349e
2017-06-09 11:27:42 +08:00
JW Wang ba75abc972 Bug 1371514. P1 - remove AbstractMediaDecoder::IsOggDecoderShutdown() and its friends. r=gerald
MozReview-Commit-ID: 5HOqH6YtB8b

--HG--
extra : rebase_source : 49cc525c32d827584c856e815a1ff3e2df968cea
2017-06-09 11:24:45 +08:00
JW Wang e4b22b962a Bug 1371200. P5 - devirtualize some functions that don't have overrides. r=cpearce
MozReview-Commit-ID: CtWPXF6MYIi

--HG--
extra : rebase_source : c0d147cb878ddf2147355c02419fd7d7b2044a40
extra : source : 6467bf865cdcefd5b41049045ac9d34b101d5673
2017-06-07 14:41:37 +08:00
JW Wang 7b50a4d6b2 Bug 1371200. P4 - constify some members. r=cpearce
MozReview-Commit-ID: B7rrXrTn7RD

--HG--
extra : rebase_source : cdca8a7a313d0c066aac58083e4b63e1be83603d
extra : source : 4d818f16afa3763b2515bdb9834880f11aa13989
2017-06-07 14:26:36 +08:00
JW Wang eb1841ec23 Bug 1371200. P3 - remove unused code. r=cpearce
MozReview-Commit-ID: JVmmKSAQl3q

--HG--
extra : rebase_source : b4a727b9c631fc85d12abb84d2b91b31923093eb
extra : source : 79cbb22b4a53945dcff3046b27dac617c8dac51a
2017-06-07 14:21:47 +08:00
JW Wang e8a94c0927 Bug 1371200. P2 - add more fields to MediaDecoderInit. r=cpearce
Now we can init some members in the constructor and remove the setters
that are called only once.

MozReview-Commit-ID: 2hkrIA6pFlh

--HG--
extra : rebase_source : 33c008ef1508597e64ef7f92b028867dbd4ffba6
extra : source : fa213ee733ea881f4f76dac06c9b4709aeba4b91
2017-06-07 14:10:26 +08:00
JW Wang 4031d18757 Bug 1371200. P1 - add MediaDecoderInit and fix MediaDecoder constructor and its friends. r=cpearce
We will add more fields to MediaDecoderInit and be able to remove some setters.

MozReview-Commit-ID: BVx935IHQHf

--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
2017-06-07 12:14:11 +08:00
JW Wang 49a7bff27a Bug 1367705. P3 - fix MediaChannelStatistics which no longer needs to be sharable. r=cpearce
MozReview-Commit-ID: 8guyyGquFnV

--HG--
extra : rebase_source : d4dcc146d3f7b36648cb06e3dc052ff648633821
extra : intermediate-source : ea621690a60d7b4208fddff7423747ea00ebeb4d
extra : source : a11e521f7f36cf8c8d31d7e6d52e0ea296306788
2017-06-02 12:44:43 +08:00
Chris Pearce d7d3abb576 Bug 1367950 - Only throttle download of src=url video if the download is 'fast' on desktop. r=jwwang
Our canplaythrough logic is opaque to the users, so I expect that our recent
change to throttle when we hit the readahead limit would be confusing to users;
those on a slow connection would want their media to prebuffer, and not expect
the download to stop part way through.  They would think that Firefox had
stalled at an arbitrary point for some unknown reason, i.e., they'd think
Firefox was broken. So I think we're better to instead only throttle if the
network is good enough that the user probably doesn't worry about the download
not keeping up with playback.

We should restore the previous behaviour on mobile of throttling when the
download reached the readaheadd limit regardless of canplaythrough or network
speed, as the calculus is different on mobile; the user may also be concerned
about battery life, or hitting their data cap. And often the faster the
cellular network is, the more expensive data on it is.

So this patch changes us to throttle when we reach the readahead limit only if
the network is fast, where fast is defined as being able to stream at twice the
rate estimated to be required to playback without stalling.

It also adds a pref to revert to the old behaviour of not considering the
network speed, which we enable on mobile to restore it to its previous
behaviour.

MozReview-Commit-ID: KLIGaQZV6dX

--HG--
extra : rebase_source : c2e0c6be3158fa661be49d1267d976af43aff6d7
2017-05-26 13:55:48 +12:00
JW Wang a80b2eab10 Bug 1365524. P2 - replace use of nsAutoPtr with UniquePtr. r=jya
MozReview-Commit-ID: 8zR7ZRXl1ON

--HG--
extra : rebase_source : 24053b1be0149ffb6e0dc2c1276c487a64787f32
2017-05-18 16:35:49 +08:00