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

294 Коммитов

Автор SHA1 Сообщение Дата
Matt Woodrow 815b1ded77 Bug 1315144 - Add new non-fatal media error so that we recreate decoders when the GPU process crashes. r=jya 2016-11-08 15:22:37 +13:00
Phil Ringnalda 6c8fce2953 Backed out changeset 9ee070ee6dad (bug 1315144) to get at the patch below it
CLOSED TREE

MozReview-Commit-ID: 3d5vSfNXqO4
2016-11-07 22:17:28 -08:00
Matt Woodrow 9775890c70 Bug 1315581 - Notify MediaFormatReader when the compositor gets recreated. r=jya,smaug,jw_wang 2016-11-08 15:23:12 +13:00
Matt Woodrow f75e8a0868 Bug 1315144 - Add new non-fatal media error so that we recreate decoders when the GPU process crashes. r=jya 2016-11-08 15:22:37 +13:00
JW Wang 064360e846 Bug 1314787 - Remove function-static race from DecoderAllocPolicy::Instance(). r=gerald
MozReview-Commit-ID: 7XfaUZo3oh9

--HG--
extra : rebase_source : 532dd73fbf27afd93fd64683b6460e29e16b390e
2016-11-03 09:56:17 +08:00
JW Wang 9be13f02e3 Bug 1312337. Part 4 - remove ReaderQueue and its friends. r=jya
MozReview-Commit-ID: Gg4IOPdjEeS

--HG--
extra : rebase_source : 318feb3ce9f84761925c705bfdddbc03a20b10bb
extra : intermediate-source : afd483164d7e4801d320683fe87404284a972f4f
extra : source : bea439fcb268af70b1cbcde7169d9184df167242
2016-10-27 16:06:05 +08:00
JW Wang 811508fa12 Bug 1312337. Part 3 - employ DecoderAllocPolicy for controlling decoder creation. r=jya
MozReview-Commit-ID: JdDq1Y8oFn4

--HG--
extra : rebase_source : c5da13bc96ddfbdb9e899a64b2a2e9c32bceda2b
extra : intermediate-source : babc9ef39ddd7d0d3892282dc9e158e812d259ea
extra : source : 79f16bd2ecace7b8d4e69296a236544751a7d0e2
2016-10-27 15:16:06 +08:00
JW Wang d7adc92e17 Bug 1312337. Part 2 - implement a policy object to control the number of decoders to be created concurrently. r=gerald
MozReview-Commit-ID: 7D4PXedDC3D

--HG--
extra : rebase_source : 93f977f6543423eac79a2330d51e27aea2dfa6ee
extra : intermediate-source : 782d9f42291f3d089e5046a593d07f5073dc8830
extra : source : 421fdc7d95fcdd99d9d18dda4ab38568da7e2043
2016-10-28 17:43:19 +08:00
JW Wang 0a2d601dc2 Bug 1312337. Part 1 - move creation/initialization of decoders into DecoderFactory. r=jya
So m{Audio,Video}.mDecoder will never reference a half-baked decoder.

MozReview-Commit-ID: FwuzaRR9ugf

--HG--
extra : rebase_source : 32b13b5e3041072bb5e48e6a633281bd8df76a41
extra : intermediate-source : 3d5bc0ca507717f09e1429a5ea05f98e18b48dfc
extra : source : 039ed0007b2e63c381c1ad0f638eed5b4c53266f
2016-10-26 17:37:19 +08:00
Phil Ringnalda 21ca7c1c21 Backed out 8 changesets (bug 1309516) for Win8 wpt failures in content-security-policy/media-src/media-src-7_3.html
Backed out changeset 5cb98008b3e3 (bug 1309516)
Backed out changeset 9ddc65900391 (bug 1309516)
Backed out changeset a876261d2d38 (bug 1309516)
Backed out changeset a154fa107dd3 (bug 1309516)
Backed out changeset 35d6e08883d6 (bug 1309516)
Backed out changeset e39be827b220 (bug 1309516)
Backed out changeset 970694b0b279 (bug 1309516)
Backed out changeset 90409a433f31 (bug 1309516)
2016-10-28 18:47:49 -07:00
Kaku Kuo 58eac194d2 Bug 1309516 part 7 - modify the seek operation;r=jwwang
MozReview-Commit-ID: AZ9yK050ElM

--HG--
extra : rebase_source : 17f5e4e1ccabbbd67bcf4863cd246cb1f74138a1
extra : source : 838786e0d0e26958e75a129a872e378bc21a7c4a
2016-10-16 22:15:29 +08:00
Kaku Kuo 91131af039 Bug 1309516 part 2 - replace MediaFormatReader::DemuxStartTime() with MediaInfo::mStartTime; r=jya
MozReview-Commit-ID: JzO0Yv33ljL

--HG--
extra : rebase_source : 105f4dee594a259311dda7d62a46940981be45b4
extra : intermediate-source : cca0e5eaf29e7cfdc32f8b66e217e0d8fb0fd0ea
extra : source : 6af01ba877814a43b68bc004b0e28160216e7367
2016-10-14 17:09:04 +08:00
Kaku Kuo 419e05d29a Bug 1309516 part 1 - retrieve start time before resolving the metadata promise; r=jya
MozReview-Commit-ID: FhnoFi1BSHM

--HG--
extra : rebase_source : e43b7dc820f630e6c0420e04578f155793f6ef7a
2016-10-27 15:21:05 +08:00
Jean-Yves Avenard a7bf1da943 Bug 1312886: P6. Show waitingforkey state in about:media. r=cpearce
MozReview-Commit-ID: Bz8mylFCggb

--HG--
extra : rebase_source : 8b0dad98afb3611e8e911d8a0f1714c807821a42
2016-10-27 20:26:01 +11:00
Jean-Yves Avenard 5c9c0f65ba Bug 1312886: P5. Enter buffering mode when waiting for a key. r=cpearce
MozReview-Commit-ID: CB3e02WEJiz

--HG--
extra : rebase_source : 83afbb3fd36372ac3ba1907dec7454d73ac57f2e
2016-10-27 20:25:21 +11:00
Jean-Yves Avenard f0515f7a99 Bug 1311876: P1. Flush audio decoder when error occurs. r=gerald
MozReview-Commit-ID: JaFfXj3xMat

--HG--
extra : rebase_source : b0929ead47ec912731a867b17ce17d59934f85c2
2016-10-26 08:48:47 +11:00
Jean-Yves Avenard 94530fa5a6 Bug 1312958: P2. Only delete the trackinfo object once the decoder has been shutdown. r=gerald
While it's unlikely to have been a problem as the decoder would have been idled at this stage. During the time the TrackInfo was reset and the decoder actually be shut down, the reference to the object would have been invalid causing a potential UAF.

MozReview-Commit-ID: 7pGJtYRy2Yr

--HG--
extra : rebase_source : d32b8ff393f55685ef182b00f286aea1d1d75464
2016-10-26 20:13:44 +11:00
Jean-Yves Avenard f1049dae10 Bug 1312958: P1. Do not modify original Audio/Video info. r=gerald
The issue is particularly problematic with the Apple audio decoder. The Apple decoder relies on the sampling rate to configure the CoreAudio transform.
The actual output rate may be different (such as with HE-AAC). Should the decoder ever need to be reset again, future initialization would have failed as the initial rate was now incorrect.

MozReview-Commit-ID: 7kTiaUYuOgf

--HG--
extra : rebase_source : 00119a13205c610542a2f690ce6c3b9caeb1b69c
2016-10-26 20:09:41 +11:00
Ryan VanderMeulen e980397fb4 Merge m-c to autoland. a=merge 2016-10-07 23:22:46 -04:00
Matt Woodrow a36eef926a Bug 1300682 - Part 5: Use KnowsCompositor to initialize decoders and create one for VideoDecoderParent to use. r=nical,jya 2016-10-07 21:13:33 +13:00
James Cheng 0fe5b0b71b Bug 1297003 - Part1-Store the error information in MediaResult while creating a/v decoders r=gerald
MozReview-Commit-ID: I6R4bX778n7

--HG--
extra : rebase_source : 66f0dc1dd4cfc91daec9790b51ce413ac669b931
2016-10-06 11:19:56 +08:00
Carsten "Tomcat" Book 762cd18602 Merge mozilla-central to autoland 2016-09-28 16:52:13 +02:00
Chris Pearce fe7b5b55fe Bug 1300069 - Consider a media encrypted if it contains a track with crypto metadata, rather than only if the media contains encryption init data. r=jya
Some encrypted MP4 streams don't contain PSSH boxes in their MOOV boxes, but
they still have tracks with valid TENC boxes which we still parse. So we need
to consider media encrypted if any of its tracks have crypto meta data, rather
than only if the media has crypto init data.

The WebM demuxer's crypto init data is all the tracks' crypto meta data, so
WebM isn't broken by this change.


MozReview-Commit-ID: 1qOi4uTtCE3

--HG--
extra : amend_source : 0f266976a3d65fb8dc720cd40d70bd6da1712420
2016-09-28 13:34:57 +13:00
James Cheng 48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Jean-Yves Avenard f8966bc13b Bug 1303673: P5. Provide warning when a MediaDataDecoder error occurs. r=cpearce
Warnings were provided earlier on and got removed. So we instead make it consistent across all decoders.

MozReview-Commit-ID: 53obtEClq98

--HG--
extra : rebase_source : f2e22e0d8ff33e8198b39f5a955b8f233a97daa6
2016-09-20 15:59:42 +10:00
Jean-Yves Avenard 96452b1a61 Bug 1299072: P19. Pass errors when we failed to create a decoder. r=gerald
MozReview-Commit-ID: 7eMfaCQiH5r

--HG--
extra : rebase_source : d8459be09567c00fc0d1b45f729432f4c2cb6351
2016-09-13 13:07:26 +10:00
Jean-Yves Avenard 70ed5282de Bug 1299072: P18. Use MediaResult with InitPromise. r=gerald
MozReview-Commit-ID: JiLgiyxvfNC

--HG--
extra : rebase_source : 4cc453a5fe7b1e4f4b865c31a24a5feed64df7e4
2016-09-13 13:06:18 +10:00
Jean-Yves Avenard ad3b418b6d Bug 1299072: P17. Return last decoding error once threshold reached. r=gerald
MozReview-Commit-ID: JbZkoErRFla

--HG--
extra : rebase_source : 95122ed1628685c20fe2a21840faaee5dc9dd010
2016-09-13 13:03:21 +10:00
Jean-Yves Avenard 20dc9102e8 Bug 1299072: P12. Use MediaResult for MediaDataDemuxer promises. r=gerald
MozReview-Commit-ID: JeQrmoHbb8m

--HG--
extra : rebase_source : 1f4581e5789f18b358a6f5bb5f8595cc7a75110b
2016-09-12 12:22:20 +10:00
Jean-Yves Avenard a3d152a719 Bug 1299072: P7. Use MediaResult with MetadataPromise. r=jwwang
MozReview-Commit-ID: KrRr8wDuPNT

--HG--
extra : rebase_source : 3df3763890a55c898ca3f00dd914e3c78fe714b1
2016-09-10 19:56:50 +10:00
Jean-Yves Avenard c590867926 Bug 1299072: P6. Pass decoding error details to MDSM and relatives. r=jwwang
MozReview-Commit-ID: 4ow2nF6Syz

--HG--
extra : rebase_source : d8cc561f42ca774b3a2865042392fb4a6aea82fa
2016-09-10 16:48:53 +10:00
Jean-Yves Avenard 3108deb75c Bug 1299072: P5. Don't rely on specific error to assess recoverability. r=jwwang
MozReview-Commit-ID: KSmW2TEBO9y

--HG--
extra : rebase_source : d85ea0f63ce2ce20b50b5c1f2a9e06c612e3e909
2016-09-10 10:49:54 +10:00
Jean-Yves Avenard f4efa8be06 Bug 1299072: P4. Return extended failure details to reader. r=gerald
We provide even further details for the GMP decoder. Other decoders to follow.

MozReview-Commit-ID: 7NxJPec8xWv

--HG--
extra : rebase_source : f44120983070e5c107ecd5cafc762da90aab44bf
2016-09-10 09:56:53 +10:00
Matt Woodrow 99bf9b18df Bug 1301294 - Remove unnecessary nsresult return value from MediaDataDecoder interface. r=jya 2016-09-09 15:50:37 +12:00
Jean-Yves Avenard d6a56e1228 Bug 1297265: P1. Remove decode ahead logic. r=kamidphish
The MediaFormatReader will no longer attempt to decode several frames in advance and ahead of the MDSM actually requesting it. The speed advantages were dubious at best, and as most MediaDataDecoders abused the use of InputExhausted callbacks we had to place artificial throttle that would often cause side effects.

As such, it is now expected that the MediaDataDecoder will now always call InputExhausted once Input has been called. InputExhausted indicates that the current decoding session has completed and the MediaDataDecoder is waiting for another input.

MozReview-Commit-ID: 9KUpNP9jozV

--HG--
extra : rebase_source : d261a5eb98de54d5bd29acb738c4205c56abca6b
2016-09-01 19:25:54 +10:00
Phil Ringnalda 9f470c98e5 Backed out 11 changesets (bug 1297265) for gtest timeouts during MediaDataDecoder.H264
Backed out changeset 04d9b7160ac9 (bug 1297265)
Backed out changeset c7bffd1ba7fd (bug 1297265)
Backed out changeset ad1915ff688b (bug 1297265)
Backed out changeset 67a97304d44d (bug 1297265)
Backed out changeset e6b9e6184457 (bug 1297265)
Backed out changeset 30636ac0790f (bug 1297265)
Backed out changeset cc70d3a139bc (bug 1297265)
Backed out changeset 345a577c92a1 (bug 1297265)
Backed out changeset ec1f3ac8751c (bug 1297265)
Backed out changeset da9117375d2e (bug 1297265)
Backed out changeset dd4c7aafcc3d (bug 1297265)
2016-08-31 19:49:28 -07:00
Jean-Yves Avenard 20189a5b95 Bug 1297265: P1. Remove decode ahead logic. r=kamidphish
The MediaFormatReader will no longer attempt to decode several frames in advance and ahead of the MDSM actually requesting it. The speed advantages were dubious at best, and as most MediaDataDecoders abused the use of InputExhausted callbacks we had to place artificial throttle that would often cause side effects.
As such, it is now expected that the MediaDataDecoder will now always either return a decoded sample or call InputExhausted. Never both.

MediaDataDecoder will continue to work as-is, even if they call InpuxExhausted too many times as the MediaFormatReader will only feed a single sample at a time.

MozReview-Commit-ID: 9KUpNP9jozV

--HG--
extra : rebase_source : ebb919fd3f1ce1adf5d08ed3f4292839b84c8321
2016-08-30 15:15:30 +10:00
Kaku Kuo 8f72f1ce87 Bug 1286454 part 4 - remove DecoderData::mDiscontinuity since it leads to nothing now; r=jwwang
MozReview-Commit-ID: I6Qzq1p6GyT

--HG--
extra : rebase_source : 796fa9611c31068cec69b631b26e542ae1cf4295
2016-08-25 18:18:22 +08:00
Kaku Kuo fcd9df9127 Bug 1286454 part 1 - remove MediaData::mDiscontinuity; r=jwwang
This member is only assigned but never used now.

MozReview-Commit-ID: IbuAbRaXzc4

--HG--
extra : rebase_source : 166bd3bc7478f725b64b5b2a0e8e258980674d06
2016-08-25 20:30:02 +08:00
Jean-Yves Avenard 90f7e263a7 Bug 1297036: P3. Revert "Bug 1293646: [MSE] P2. Only reject a seek request with EOS if it's passed the explicit duration." r=gerald
This reverts commit 5a949eb358e27

Another more complete solution will follow.

MozReview-Commit-ID: K3lTdrBxW7W

--HG--
extra : rebase_source : d0f9443193b0816ae85972a4a368599b872fd437
2016-08-26 19:30:50 +12:00
JW Wang 2fa66fff7d Bug 1295906 - Remove the call to |mVideoFrameContainer->ClearCurrentFrame()| from ReleaseResources(). r=jya
ReleaseResources() is called when MDSM enters dormant or during shutdown.

When it is called in response to dormant request, we don't want to clear
current frames so we are able to enter dormant state more aggressively
even when the media element is visible to the user.

When it is called from MediaDecoderReader::Shutdown(), it doesn't really
call ClearCurrentFrame() because MediaFormatReader::Shutdown clears the
|mVideoFrameContainer| pointer. So it doesn't make a difference to remove
the call.


MozReview-Commit-ID: IakGHbSMWTv

--HG--
extra : rebase_source : 7a25de39e04f5c7728bf65fcd447cc67b7a85411
extra : source : 44ff0ffaf63ad51a7a382cf0ee1c16e64ade63b9
2016-08-17 17:11:19 +08:00
Iris Hsiao 1db439cf3b Backed out changeset d6d2cc94bb92 (bug 1295906) for M-e10s crashes on Windows 7 debug 2016-08-23 15:39:20 +08:00
JW Wang 144902b400 Bug 1295906 - Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseResources(). r=jya
MozReview-Commit-ID: E0bm0zNoaZ7

--HG--
extra : rebase_source : bf9705ba84b99745adc91fae96495f1b13f4d5ea
2016-08-17 17:11:19 +08:00
Bryce Van Dyk bf4a449efb Bug 1145011 - Implement waitingforkey event. r=jya
Bubble information from SamplesWaitingForKey to an HTMLMediaElement so that we
can emit a waitingForKey event. If we are unable to decode more samples due to
needing a key the event will be signalled. See
http://w3c.github.io/encrypted-media/#dom-evt-waitingforkey for more information
on this event.

The code in place before this patch handles updating readyState when we are
waiting for a key, this patch adds the event which should be emitted in such a
case. The spec defines certain preconditions should be the case before running
the algo to emit this event. For example, the element should potentially be
playing, and it should have at least HAVE_FUTURE_DATA ready state. This is not
strictly true for when the new code is run, due how existing code handles ready
state. We are honoring the spirit of the spec, though the letter of the spec is
lightly gone against in the handling of the preconditions.

MozReview-Commit-ID: LKlDd4wkRSE

--HG--
extra : rebase_source : 2c61fc41636e430afa23240ad5d26c886124d87f
2016-08-22 08:51:01 +12:00
JW Wang ecaa7b7a0d Bug 1295901 - Change the semantics/naming of MediaDecoderReader::ReleaseMediaResources(). r=jya
MozReview-Commit-ID: DyOwNcC2JK5

--HG--
extra : rebase_source : 5b14dfe1df7ed9eab1783fba64ff4a481e520339
2016-08-17 15:03:30 +08:00
JW Wang ffe7c10202 Bug 1295541 - Move mInitPromise.DisconnectIfExists() into DecoderData::ShutdownDecoder(). r=jya
MozReview-Commit-ID: 67MvFfSU73X

--HG--
extra : rebase_source : b959219122e8041745d3ef191e68fbfe7a2e1fb0
2016-08-16 19:08:24 +08:00
JW Wang f59d74c259 Bug 1295146 - add assertions to debug null-deref. r=jya
MozReview-Commit-ID: 966DpcaT1p8

--HG--
extra : rebase_source : 79a1079161880771bb17bcfbb5786a53b298d060
2016-08-16 09:38:29 +08:00
Jean-Yves Avenard 58cb3ab298 Bug 1293646: [MSE] P2. Only reject a seek request with EOS if it's passed the explicit duration. r=gerald
With MSE, the actual duration is always exact as it is amended when data is added. We do not want to fire ended when we attempt to seek to unbuffered data once endOfStream has been called. Instead we will fire the waiting event.

MozReview-Commit-ID: Cl2uBLk2qRQ

--HG--
extra : rebase_source : 6763c6f5a6e15264e276e486fab4d39491ea7f1b
2016-08-10 15:30:12 +10:00
JW Wang f18a46b384 Bug 1293572 - Flushing a decoder that is not initialized causes hang. Don't create decoders when the reader is suspened. r=jya
MozReview-Commit-ID: 7ylrYLrrwIS

--HG--
extra : rebase_source : 7421d6b0ee804f30cdfdba0ffda8d9c44d3d7ba5
2016-08-05 17:25:49 +08:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00