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

497 Коммитов

Автор SHA1 Сообщение Дата
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 803c5fa941 Bug 1380234. P2 - send compositor updates to the reader directly without using MediaEventSource. r=jya
MozReview-Commit-ID: EJO2PK525gS

--HG--
extra : rebase_source : 11a033d2e6a94b307ca8095b2ffd7348edb2b6d4
extra : source : 44c52998638933e8b709fa5196ef442314145d2f
2017-07-12 16:28:19 +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 d669b012bc Bug 1378316. P2 - dispatch MediaDecoderReader::NotifyDataArrived explicitly instead of using MediaEventSource. r=gerald
MozReview-Commit-ID: AM3CjQ8LoTv

--HG--
extra : rebase_source : d6c4fa7b8dbe9984468f44b9cdbdf4cbdfe7d001
extra : source : a95db93514cb2a4e5b8031661d367f167d8fc21b
2017-07-05 17:29:05 +08:00
JW Wang 69f64ebb45 Bug 1376363. P2 - call ContainerType() in EnsureTelemetryReported(). r=gerald
MozReview-Commit-ID: 515Q6nXZ7WU

--HG--
extra : rebase_source : a13964ca23cd561db8f95ad2ffbeac5ff2411238
extra : source : 59e7c3d78a9df5b2827cb14a211d59113968f432
2017-06-26 17:11:48 +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
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07: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 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
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
Jean-Yves Avenard 9223d7c8a2 Bug 1374596: P5. Fix MediaDecoder* headers. r=padenot
MozReview-Commit-ID: AjSjYXXcutJ

--HG--
extra : rebase_source : 13705fb658bdfa6e98884f9e1ab142355aab399d
2017-06-20 17:34:29 +02:00
Chris Pearce 3d1e87597e Bug 1374475 - Don't throttle download of media files under 8MB in size. r=jwwang
The startup latency for an HTTP transaction can be high, this adds delay when
we're seeking into an unbuffered range. So we should not throttle the download
for small files, to speed up seeking.

This also works around the problem in bug 1373618 in the case where the
download is fast enough for the entire file to predownload before a seek.

MozReview-Commit-ID: A8Hqi71IJ1H

--HG--
extra : rebase_source : 30648d3ad62b8c0417b1244c896b43b670382e9c
2017-06-20 13:03:49 +12: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 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 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
James Willcox 4649c2acf0 Bug 1322650 - Don't use AndroidBridge to get API version in media stack r=jolin
AndroidBridge is not available in child processes.

MozReview-Commit-ID: KlBs8F1Bu1O
2017-05-15 09:37:57 -05:00
JW Wang ea364d4336 Bug 1364001. P2 - throttle download when we can play through. r=cpearce
MozReview-Commit-ID: HqRtwCAr7k3

--HG--
extra : rebase_source : 15a5613eeb3723eaab2dfb1bba46a1d9828962ac
extra : intermediate-source : 131b22046bc32f01786911369cd58066f46c1adc
extra : source : 6521cb0faee565a0bb7b71ccb60a5106196d6a1d
2017-05-11 17:26:20 +08:00
Iris Hsiao e22349b74b Backed out 11 changesets (bug 1322650) for media test failures on android. a=backout
Backed out changeset 31bd912fba54 (bug 1322650)
Backed out changeset 4d486c7469eb (bug 1322650)
Backed out changeset 4cf8f4d5064c (bug 1322650)
Backed out changeset 3cb108f7492f (bug 1322650)
Backed out changeset bd53533c108e (bug 1322650)
Backed out changeset 3522917d8f10 (bug 1322650)
Backed out changeset 2c2c1e33eccc (bug 1322650)
Backed out changeset 2f19977cd6ab (bug 1322650)
Backed out changeset 4519296a323e (bug 1322650)
Backed out changeset e56e5e1c8786 (bug 1322650)
Backed out changeset 96fe52231b57 (bug 1322650)

--HG--
extra : amend_source : b11d2181d8f545f4ed1074f09986eddab0b637c8
2017-05-12 10:21:14 +08:00
James Willcox 22e9b1e4cc Bug 1322650 - Don't use AndroidBridge to get API version in media stack r=jolin
AndroidBridge is not available in child processes.

MozReview-Commit-ID: KlBs8F1Bu1O
2017-05-11 15:42:45 -05:00
Kaku Kuo b249c9b732 Bug 1360123 P3 - while shutting down a MediaDecoder, ask its owner to remove all media tracks; r=jwwang
MozReview-Commit-ID: 6s84iyXJQ9k

--HG--
extra : rebase_source : 443d6fafd8c17d02dba6ba0054abbb473079545a
2017-04-18 15:46:05 +08:00
Kaku Kuo dab014bd99 Bug 1360123 P2 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
MozReview-Commit-ID: 3S63JeXAX2w

--HG--
extra : rebase_source : ef807247a5042fa23ba6b6f5c907035bd8d64199
2017-04-18 15:43:55 +08:00
JW Wang 54ae314fcc Bug 1358972. P2 - remove MediaDecoder::mEstimatedDuration and its friends which is never modified. r=kaku
MozReview-Commit-ID: 7W331tookXV

--HG--
extra : rebase_source : 2555fbdb4c5480e6880a67e71827ca06d6857992
extra : intermediate-source : c035bdc6f8e47cc92fa5d6b66421d319d9cd2e92
extra : source : 49ec1fd9914624f5aa4ea87bf4deb8b47017e288
2017-04-17 17:20:06 +08:00
JW Wang 381be5ed72 Bug 1358972. P1 - remove unused code. r=kaku
We can remove AbstractMediaDecoder::UpdateEstimatedMediaDuration() which
has no callers at all.

MozReview-Commit-ID: Eub12jQ25KK

--HG--
extra : rebase_source : f564b84a147252bd98c13fe475af971808880c8c
extra : intermediate-source : 4c0870a71b2091c39f5fc67c5cf21dea0a4cc459
extra : source : 1bfe40324a3801f8d60384b247d85f04b8971bbe
2017-04-17 17:10:09 +08:00
JW Wang f6a893a644 Bug 1358969 - let MediaDecoder::CurrentPosition() return a TimeUnit. r=kikuo
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: K3Bz3uEXLDK

--HG--
extra : rebase_source : ade3cbd61c764b73a22c360572a525127dbadbc5
extra : intermediate-source : 013227a4aa645fc34a82c44130db6c847d74960b
extra : source : 1ab7ce426b557e4ce9979e023f9e84b4690eeaaa
2017-04-17 17:04:39 +08:00
JW Wang 02369ea1a2 Bug 1357987 - make MediaDecoder::DEFAULT_NEXT_FRAME_AVAILABLE_BUFFERED a TimeUnit to avoid ambiguous int64_t for microseconds. r=kaku
MozReview-Commit-ID: 9JC4zPEc6or

--HG--
extra : rebase_source : 8001ba3924f4bdb2ffb4143f1a22e2c4bf697ce3
extra : intermediate-source : 02bc62f83a7af3059b819c2bbb9fd887e2593043
extra : source : 5af753b1192f36ebf84279ff011617587ede613b
2017-04-17 16:58:44 +08:00
JW Wang f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
Kaku Kuo 36ef069505 Bug 1344357 P3 - dont' pass dom::Promise into MediaDecoder anymore; r=jwwang
MozReview-Commit-ID: 5RUNauRRajP

--HG--
extra : rebase_source : 4c12d5cd730657da37b2c94987e84518c2c67ae5
2017-04-17 18:49:55 +08:00
Kaku Kuo b06e8a5370 Bug 1344357 P1 - move the MediaDecoder::mSeekDOMPromise to HTMLMediaElement; r=jwwang
There was a cycle amoung a window object -> a HTMLMediaElement -> a MediaDecoder -> a Promise (-> back to the window object).
And we have no way to break the cycle since the MediaDecoder does not participate into the collection.

By moving the Promise form MediaDecoder to HTMLMediaElement, we will be able to break the cycle since the HTMLMediaElement is in the collection.

We'll implement the cycle collection in the next patch.

MozReview-Commit-ID: CyVXBl6IMI3

--HG--
extra : rebase_source : 195a322ce3e6fe933e72be4aec5d2ebfa1f54865
2017-04-17 18:25:26 +08:00
Kaku Kuo 172d429303 Bug 1354465 P1 - dispatch a mozvideoonlyseekbegin event while starting a video-only seek; r=jwwang
MozReview-Commit-ID: 6PjQs88vUV2

--HG--
extra : rebase_source : b0d06e8bd5b5a3e84adaade0ea8f2fa98a2af0c3
2017-04-07 16:11:34 +08:00
JW Wang 519fb03dfd Bug 1353607. P9 - change the underlying type of mCurrentPosition to TimeUnit. r=kikuo
MozReview-Commit-ID: ffquOIFlp3

--HG--
extra : rebase_source : 2f6e383a1995e91f395efb4d037e151a5a656248
extra : intermediate-source : 12403091f9cee42331e12eb13945b40d02dc842f
extra : source : 1149d57835c33231411692e74836fff37b3e74de
2017-03-28 18:13:22 +08:00
JW Wang 88fd9831d4 Bug 1353607. P8 - use TimeUnit in DispatchSetFragmentEndTime(). r=kikuo
MozReview-Commit-ID: IBLT0j7yMLK

--HG--
extra : rebase_source : a441e4f71c7286225deb3cc6719582b912549bd0
extra : intermediate-source : 2b7da6662a5a783e0cb9e574c5a8678c991aa306
extra : source : 0647d6d92deabbc38a22c5e681e71ce92fdd8267
2017-03-28 18:01:23 +08:00
Kaku Kuo d894ae1293 Bug 1349097 P3 - don't dispatch another ended event while resuming the video decoder of an already-ended playback; r=jwwang
If the play state is already PLAY_STATE_ENDED, make MediaDecoder::PlaybackEnded() return early to prevent dispatching multiple ended event.

MozReview-Commit-ID: G5OU7WLYuMm

--HG--
extra : rebase_source : 17c8e355f59950166b112eaf2629f82b357fb60b
2017-04-05 22:57:25 +08:00