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

541 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 3358fb824a Bug 1396629 - P5. Show container type in debug info. r=cpearce
MozReview-Commit-ID: 3olXuGeqqoS

--HG--
extra : rebase_source : bc61d8f67eb4e726ba1d200d731a7740f80f8f82
2017-09-04 22:47:36 +02:00
Jean-Yves Avenard 9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Kilik Kuo 216e7acf63 Bug 1393336 - Remove WaitForCDM state from MDSM. r=jwwang,jya
MozReview-Commit-ID: 7XofvBZTerH

--HG--
extra : rebase_source : 99a7c9459bf1c3f0fe8a27e57595d8bebf8ac9c3
2017-08-25 17:11:14 +08:00
JW Wang 4af519df25 Bug 1393386. P1 - make PinForSeek/UnpinForSeek pure virtual. r=gerald
Sub-classes should know how to pin/unpin the resource.

MozReview-Commit-ID: 50S8oSD5oEU

--HG--
extra : rebase_source : 5e1b7c657b759c0d1dfdd7b5c0a4b7dbc4077ffe
extra : intermediate-source : 3000b76a3b97c08955c2d584ac215114c8e8f59a
extra : source : a56b9846db916ff85a0cae09736c3284bd895506
2017-08-24 18:08:37 +08:00
JW Wang f8f989dd93 Bug 1394313 - replace use of nsAutoPtr with UniquePtr in MediaDecoderOwner.h. r=cpearce
MozReview-Commit-ID: 49lyvMzg7oY

--HG--
extra : rebase_source : b83cd03b0026c73d0293ef937a3c2544349f464d
2017-08-28 14:10:35 +08:00
JW Wang 2c37ac8f7c Bug 1393379. P1 - make MediaDecoder::AddSizeOfResources pure virtual. r=gerald
We will move the implementation to sub-classes which have more details
about how to calculate the resource size.

MozReview-Commit-ID: 7lfiz5GNtPE

--HG--
extra : rebase_source : bf14ef91a6de456d65bee7cb1f53f8e542f55247
extra : source : 22640df9dd3a1491594a82b3d0bd175e46073fa3
2017-08-24 17:35:24 +08:00
JW Wang 59d7107e86 Bug 1393369. P1 - virtualize MediaDecoder::GetCurrentPrincipal() so the sub-classes know how to calculate the current principal. r=gerald
MozReview-Commit-ID: EOUtPE4hfgO

--HG--
extra : rebase_source : d15166e373fdd3a8490e2c794215aeb2551a7397
extra : source : 5f627ea709d24c8b7c5ddd0115524ef734378e66
2017-08-24 16:58:06 +08:00
JW Wang 9ba52292a9 Bug 1393346. P2 - move IsTransportSeekable() from MediaResource to BaseMediaResource. r=gerald
MozReview-Commit-ID: KqpzIRH31gz

--HG--
extra : rebase_source : e9303347b34d3cbfbd8d6a6f2a474dd8f0fb1447
2017-08-24 00:08:41 +08:00
JW Wang 3202c8815c Bug 1393346. P1 - virtualize IsTransportSeekable(). r=gerald
MozReview-Commit-ID: LIwEEbH3tBT

--HG--
extra : rebase_source : e02954fb3b6ddf40259bc6c69221192e01fc1410
2017-08-24 00:06:23 +08:00
JW Wang c62c2c21b4 Bug 1392919. P3 - remove unused code and fix naming. r=gerald
MozReview-Commit-ID: 36PqGtOpAbf

--HG--
extra : rebase_source : 9ff9234f1f5db9151808d9a2ee33ced6d9e089c6
2017-08-23 14:42:25 +08:00
JW Wang 41cd273f4e Bug 1391142. P3 - remove IsLiveStream() from MediaResource. r=gerald
MozReview-Commit-ID: DBFrYfj2lGB

--HG--
extra : rebase_source : 18532f55f38c5ac54660c11f078741e09273a30a
extra : source : 0e45bca0cdc0b2428216e6c9a55f8651e5b21017
2017-08-17 15:20:40 +08:00
JW Wang b8ff3673d9 Bug 1391142. P2 - remove MDSM::mResource and related functions. r=gerald
MozReview-Commit-ID: 4od7b8YNrMh

--HG--
extra : rebase_source : 2a471cc2e8049f98e65b96af626a00de4e4919f4
extra : source : a8dd8625a688555448cdc4c5429a23278e3e21c4
2017-08-17 11:52:29 +08:00
JW Wang b5f3c097c3 Bug 1391142. P1 - dispatch IsLiveStream changes from MediaDecoder to MDSM. r=gerald
This allows us to remove the dependency on MediaResource from MDSM in P2.

MozReview-Commit-ID: I46fWXfnGQK

--HG--
extra : rebase_source : 4808c7218d8c48c7425da16fadf4fd748cb2932f
extra : source : 10ac012e4c252438db1f64bb57dff181aff42a65
2017-08-17 11:48:08 +08:00
Chris Pearce 185ab4fc70 Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn

--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
2017-08-15 17:07:13 +12:00
Carsten "Tomcat" Book bb63604dba Backed out changeset 2964dba33ef8 (bug 1390748)
--HG--
extra : rebase_source : f42c1924d26ca39d2fbe926055f53ff92bb25b69
2017-08-17 08:35:33 +02:00
Chris Pearce 2e91854fcd Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn

--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
2017-08-15 17:07:13 +12:00
Phil Ringnalda 38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce ba9eb9c3bb Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn

--HG--
extra : rebase_source : 63513ce3b01546142357182f21fce56932b32f7f
2017-08-15 17:07:13 +12:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
JW Wang ab74a61674 Bug 1388612. P2 - remove the call to NotifySuspendedStatusChanged() in MediaDecoder::FirstFrameLoaded(). r=gerald
Following P1, cache suspend status changes will be notified when necessary.
If not, it would be a bug that should be fixed. We shouldn't wallpaper the
issue by calling NotifySuspendedStatusChanged() manually.

MozReview-Commit-ID: 9EbybTiOOIO

--HG--
extra : rebase_source : 299e22c6813f4eeb152c4d8140dc295ff856dc1e
extra : source : 2b18fe0368c6332d0b5c1e044218a26c75314124
2017-08-09 16:13:51 +08:00
JW Wang af3ce851d6 Bug 1388612. P1 - remove MediaResource::EnsureCacheUpToDate(). r=gerald
This is a workaround to fix bug 687972. It should be OK now to remove
it since we have fix bug 1108960  where MediaCache failed to run the
update loop to update the suspend status of the stream.

MozReview-Commit-ID: MbInehhScs

--HG--
extra : rebase_source : 94345a00af31834db8b9858cdf5a9e889044156a
extra : source : 70f626894c3a15c8077f70425a97004478caa9e1
2017-08-09 16:07:53 +08:00
Matthew Gregan 89fde0ce0f Bug 1388236 - Remove B2G-only AudioChannel code from media playback. r=jwwang 2017-08-10 13:00:07 +12:00
JW Wang cf112f4b88 Bug 1388228. P6 - following P5, we are now able to move some methods that are related to nsIChannel to BaseMediaResource. r=gerald
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.

MozReview-Commit-ID: EAmUEv9WQk8

--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
2017-08-07 18:09:56 +08:00
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
Wes Kocher 623f36f0f8 Merge m-c to autoland, a=merge
MozReview-Commit-ID: CxCNV7W0utC
2017-08-07 15:26:40 -07:00
JerryShih 6528324a47 Bug 1357299 - P5: Pass KnowsCompositor instead of ShadowForwarder to media decoder. v2. r=nical
If we use WebRender, there is no ShadowForwarder with this configuration.
So, use the AsKnowsCompositor() instead.

MozReview-Commit-ID: KMcfdwySKDL
2017-08-07 18:15:22 +08:00
Sebastian Hengst 765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey 2273c53b75 Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
JW Wang 0a70fd0b47 Bug 1387702 - be sure to enter the AbstractThread context for state-mirroring to be usable. r=billm
MozReview-Commit-ID: 3kML9KVr01g

--HG--
extra : rebase_source : 252a0c3a6febb5720929ab94e496d120ab967293
2017-08-07 10:54:17 +08:00
JW Wang 35ca16f82f Bug 1386956. P3 - move the call to UnpinForSeek() from ~MediaDecoder() to Shutdown(). r=gerald
It is bad to call a virtual function (UnpinForSeek() -> GetResource()) in the destructor.

MozReview-Commit-ID: Db5pOHjhmQZ

--HG--
extra : rebase_source : 4e998bce930dbb18ad9b84ef33c1cb06167f2402
extra : source : e8e7ed2cdf0bf0f8f0e2d42dd045dfe1f05da28a
2017-08-04 09:46:44 +08:00
JW Wang f86786c3e8 Bug 1386956. P1 - replace use of mResource with GetResource() for we will move mResource to sub-classes. r=gerald
MozReview-Commit-ID: I90Xvy4u5Fd

--HG--
extra : rebase_source : 186553067fe9044f927918b85189470ac312dee2
extra : intermediate-source : e51c266bc9527bcd2f4ff7b80883c21ddb56cd24
extra : source : 425527128cf1affe59759773947cf3dd4ce539c7
2017-08-03 14:52:18 +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
Kaku Kuo 2c2253d77b Bug 1383653 P1 - add debug messages for understanding the status of suspending video decoder; r=jwwang
MozReview-Commit-ID: 2pI6XRQQgbG

--HG--
extra : rebase_source : 68a11362750227812602c07dbcfb7685eb7eb438
2017-07-24 13:21:35 +08:00
JW Wang f507668c63 Bug 1382557 - the duration should be finite when we can get one from the metadata. r=cpearce
This fixes the case where ChannelMediaResource::OnStartRequest() calls
mCallback->SetInfinite(true) to report an infinite duration, yet later
we get another duratoin from the metadata.

http://searchfox.org/mozilla-central/rev/8a61c71153a79cda2e1ae7d477564347c607cc5f/dom/media/MediaDecoder.cpp#1179-1185
Note IsInfinite() is checked before other duration sources. We need to call
SetInfinite(false) on the MediaDecoder so we can get the correct duration.

MozReview-Commit-ID: 3BlFNJzlgXo

--HG--
extra : rebase_source : 073b65cbc21f280638054b80f0cc9913a9128a18
2017-07-25 14:34:59 +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
Alastor Wu 1499ee0710 Bug 1274919 - part3 : only send msg if someone is waiting for it. r=jwwang,mikedeboer
Only send the msg "Browser:UnselectedTabHover" when someone requests for the
msg, it can reduce non-necessary communication.

MozReview-Commit-ID: 2mBUMB4AMVo

--HG--
extra : rebase_source : d7a5103e2713735fdd0f65c7de381b219f4cce26
2017-07-20 15:11: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