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

509 Коммитов

Автор SHA1 Сообщение Дата
JW Wang d4d5d4d5bb Bug 1321744. Part 3 - remove ThenPromise and replace its use with Then. r=gerald
MozReview-Commit-ID: AsmePdCp2tC

--HG--
extra : rebase_source : e08ac48584375d2bc12f5b73a1e60f2800359ed9
extra : intermediate-source : 94e727f7cd11bb04812da3662a0ee1fd461cc832
extra : source : 5307716231f93b01c0357011f8849015d4d97d0a
2016-12-04 08:51:25 +08:00
JW Wang c1ec600a1a Bug 1321471. Part 1 - Use of MozPromise::ThenPromise() in place of CompletionPromise(). r=jya.
MozReview-Commit-ID: INbGpzwK4f9

--HG--
extra : rebase_source : 76942aa9741f2ce59f6208cfb0699ad3718a25d4
extra : intermediate-source : 61f3ade0fb73f6318ae616393d66e3dc21d68323
extra : source : 92e78c9b199b252da5d219f8d68902ce353aa4c7
2016-11-30 18:19:26 +08:00
James Cheng 4724a58460 Bug 1299105 - Part 2: Make Part 1 works behind a pref. r=jya
MozReview-Commit-ID: AcEFAGP8kuR

--HG--
extra : rebase_source : e537acd0311a9f2a0746a5b8306292cdc04d05ac
2016-11-29 15:03:14 +08:00
James Cheng 71d701898a Bug 1299105 - Part 1: Check if the decoder support recycling to prevent from recreating decoder. r=jya
MozReview-Commit-ID: 7Xj6tSnGM81

--HG--
extra : rebase_source : 9f4f6f5161c6bee34bffa0da4aa7b77052c1239c
2016-11-25 14:22:40 +08:00
JW Wang 114ec342ad Bug 1315631 - Don't dispatch |this| in the constructor. r=jya
Because it will change the ref-count which might cause destructor to run before exiting the constructor.

MozReview-Commit-ID: MMIea970Dv

--HG--
extra : rebase_source : faf898a3107706bc0ea750e738d8c3a7a3824264
2016-11-08 23:09:34 +08:00
JW Wang 6a43760ea7 Bug 1320258. Part 2 - remove MediaDecoderReader::UpdateBufferedWithPromise(). r=jya
Bug 1313635 ensures buffer ranges are updated before resolving metadata.
So we can revert the changes in bug 1251460.

MozReview-Commit-ID: Ek0sgPpv92s

--HG--
extra : rebase_source : 79b457167d5b987280083364afe31b31860b48fe
extra : intermediate-source : 9205ca61bb2255e33744af7ec4e13059f275960c
extra : source : 14d155274dc4e0d2daa8a90b1bbb15f975d7ac24
2016-11-25 16:22:55 +08:00
Kaku Kuo 73e0bee6d2 Bug 1313635 part 1 - don't go through MediaDecoderReaderWrapper to set start time; r=jwwang,jya
MozReview-Commit-ID: KXz1veb7x1i

--HG--
extra : rebase_source : e11247aba37a9edaf9276b7cbbc70c9e867e4dcd
2016-11-25 16:47:02 +08:00
Gerald Squelart f2a26506fb Bug 1313497 - Use InvokeAsync with Storages in MediaDecoderReaderWrapper - r=jya
Thanks to this, MediaDecoderReader::Seek and overrides can take SeekTarget by
const&.

MozReview-Commit-ID: C5D26jKrW3p

--HG--
extra : rebase_source : 6f6278654ff3c51f6331cbf683c22622223a8cd2
2016-11-13 17:42:19 +11:00
Eugen Sawin 746f46552c Bug 1317779 - [2.0] [bustage fix, CLOSED TREE] Mark implicit conversion constructors explicit. r=me 2016-11-22 18:30:59 +01:00
Eugen Sawin 9d373ec525 Bug 1317779 - [1.3] Separate audio and video decoder allocation policies. r=jwwang 2016-11-22 17:34:09 +01:00
James Cheng 11730376d7 Bug 1318225 - Part2 - Remove demux-only APIs. r=jya
MozReview-Commit-ID: ONS7mMr8mZ

--HG--
extra : rebase_source : a5ea2b94c664766064ca0c765347b4d8cd798cd2
2016-11-17 15:23:07 +08:00
Kaku Kuo dd76514a9c Bug 1309516 part 7 - modify the seek operation;r=jwwang
MozReview-Commit-ID: AZ9yK050ElM

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

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

--HG--
extra : rebase_source : 3c1a1efa936fa0f4decdfb12c90bcce607c5edba
2016-10-27 15:21:05 +08:00
Matt Woodrow c9d5c63412 Bug 1316506 - Make sure we flush decoders before shutting them down. r=jya 2016-11-13 14:18:28 +13:00
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
Kaku Kuo c79eb6f91f Bug 1290371 - handle files with audio and video tracks but no samples at all; r=jya
So, we have 4 boolean variables and here is the truth table.
Case 1, 2, 3, 4, 7, 8, 10 and 12 are not possible to happen.

Then, the remaining cases could be clustered into three categories:
(1) Case 5, 9 and 13: no sample is demuxed at all, return 0.
(2) Case 6, 11, 14 and 15: either audio or video is able to be demuxed, return the known value.
(3) Case 15: both audio and video are demuxed, return the minimum of the values.


For simplifying the logic, I will initialize the audioStartTime and videoStartTime
to be INFINITY if we don't have the first-demuxed sample, otherwise, initialize
them to be the real first-demuxed sample's time.

Then, the final calculation will be:
(1) Case 5, 9 and 13: the minimum of two INFINITY values is still INFINITY, return 0.
(2) Case 6, 11, 14 and 15: return the minimum of one real first-demuxed-time and the INFINITY.
(3) Case 15: return the minimum of two real first-demuxed-time values.

Case   HasAudio   HasVideo   HasAudioSample   HasVideoSample    ExpectedResult
---------------------------------------------------------------------------------------------------
1         F          F             F                 F          not possible
2         F          F             F                 T          not possible
3         F          F             T                 F          not possible
4         F          F             T                 T          not possible
---------------------------------------------------------------------------------------------------
5         F          T             F                 F          return 0
6         F          T             F                 T          return video sample
7         F          T             T                 F          not possible
8         F          T             T                 T          not possible
---------------------------------------------------------------------------------------------------
9         T          F             F                 F          return 0
10        T          F             F                 T          not possible
11        T          F             T                 F          return audio sample
12        T          F             T                 T          not possible
---------------------------------------------------------------------------------------------------
13        T          T             F                 F          return 0
14        T          T             F                 T          return videoSample
15        T          T             T                 F          return audioSample
16        T          T             T                 T          return min(auidoSample, videoSample)

MozReview-Commit-ID: ANsYDth7slJ

--HG--
extra : transplant_source : %DAj%1A%EC%19%82%7B%B3%05%FE%21%04a%16%9A%9F%18x1%95
2016-08-03 16:51:29 +08:00
ctai b7fcb47572 Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %008z%D8W%EE%87%8E%E9/%2CT%26%EBvo%AE%099%A6
2016-05-27 14:33:48 +08:00
Sebastian Hengst 120f502e2a Backed out changeset 3851902daa94 (bug 1201363) 2016-08-03 19:33:25 +02:00
ctai e28782c9ba Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : amend_source : 7eb1e87fdcbc61f2f9831fa3a6d803cc50306604
2016-05-27 14:33:48 +08:00
Kaku Kuo c058f404b8 Bug 1274626 part 5 - provide APIs to switch to blank decoders dynamically; r=jya
MozReview-Commit-ID: PyoIsrEf1r

--HG--
extra : transplant_source : C%D6%9E%89%E2O%DB%DFb%A8%9Az%1FE%11%06oo%EE%3C
2016-07-29 14:51:18 +08:00
Carsten "Tomcat" Book aca03c331f Merge mozilla-central to inbound to fix bustage 2016-08-02 17:48:32 +02:00
Carsten "Tomcat" Book d647d056e2 Backed out changeset c5b79d4a6913 (bug 1274626) 2016-08-02 17:47:26 +02:00
Carsten "Tomcat" Book 7e324b6cdb Backed out changeset b018ce9d1484 (bug 1201363) 2016-08-02 12:53:59 +02:00
Eugen Sawin 442f5a19e6 Bug 1289016 - [1.2] Don't initialize suspended decoders and fix removing readers from the queue. 2016-08-02 14:55:31 +02:00
ctai 0948ae3f3a Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %9D%86%93%A6%DF%D5%9Ep%20%DF%FD%C1%E2%BA%A3Gq%1A%7E%A3
2016-05-27 14:33:48 +08:00
Kaku Kuo 9b64312544 Bug 1274626 - Part 5 - provide APIs to switch to blank decoders dynamically; r=jya
MozReview-Commit-ID: PyoIsrEf1r

--HG--
extra : transplant_source : %16D%C0%AE%DAf8%21P%1ER%3C%E36%C7K%08G%99%2B
2016-07-29 14:51:18 +08:00
Jean-Yves Avenard d9896af911 Bug 1289059: P1. Add MediaDemuxer generic logging. r=cpearce
MozReview-Commit-ID: 453QrMX1nWp

--HG--
extra : rebase_source : 679586d22a380e57c19c1e78b29e71282c08ecbf
2016-07-24 22:30:07 +10:00
Gerald Squelart 2a787d2521 Bug 1289668 - Record inter-keyframe statistics - r=kamidphish
FrameStatisticsData can now store inter-keyframe information, which is
provided by the MediaFormatReader (based on live decoding).

MozReview-Commit-ID: HhBy6pgT6ZX

--HG--
extra : rebase_source : 6a072623e8a5b0f23b81307e8ea4b19a3e21b252
2016-07-26 09:36:55 +10:00
Gerald Squelart 7bea2e1262 Bug 1289668 - Refactor FrameStatistics writers to use Data struct - r=kamidphish
Decoders now use FrameStatisticsData to gather data for their frame-related
notifications. This will ease introducing new members later on.

MozReview-Commit-ID: DWdOSPX3JM

--HG--
extra : rebase_source : a3e05f34353a397d1c82b3f4d935c0864f90556e
2016-07-18 10:41:40 +10:00
Chris Pearce de045590ac Bug 1267918 - Add GMPCrashHelper for HTMLMediaElement. r=gerald
This ensures that unencrypted GMP decoding crash reporting works.

MozReview-Commit-ID: 84TAV5F9Ie0

--HG--
extra : rebase_source : c0bf3021be9fa0833a7b375967572f1019e4e279
2016-06-29 11:42:07 +12:00
Bryce Van Dyk 3e3f638e3e Bug 1257716 - Handle clearkey encrypted WebMs. r=cpearce
Handle encrypted WebM streams for the clearkey case. Add checking for the
widevine case, though these should currently fail, as not all of the plumping
is in place for widevine.

MozReview-Commit-ID: 5d9fvc5IkZF

--HG--
extra : rebase_source : 9baad2afd7778c350c404c72dcd81426092aa908
2016-06-08 14:07:09 +12:00
Dan Glastonbury 1b2a65cfc3 Bug 1281632 - P1: Extract creation parameters and pass via struct. r=gerald
Extract all the parameters passed to CreateAudioDecoder/CreateVideoDecoder and
place them into a structure that is passed down to the creation of the actual
decoder, where the relevant parameters can be extracted.

This makes it easier to add more arguments to the Create*Decoder calls in future.

MozReview-Commit-ID: 9LZlcfRVz6A

--HG--
extra : rebase_source : ce3f0c7d0784b96267728697ff5d535ccb8ee7a6
2016-06-28 17:56:55 +12:00
JW Wang f7267b13db Bug 1274030 - clean VideoFrameContainer when "xpcom-shutdown" event received. r=cpearce
MozReview-Commit-ID: 92zeiNXSkjf
2016-05-22 21:39:55 +08:00
Eugen Sawin a368c596cb Bug 1214710 - [1.11] Implement ReaderQueue for simultaneous decoder limit enforcement. r=jya,jwwang 2016-06-08 18:04:32 +02:00
Alfredo Yang 254d49c5f6 Bug 1257107 - discard decoded data if its pts is smaller than seek time. r=jya
MozReview-Commit-ID: 70rbBsor8lp

--HG--
extra : rebase_source : 7f88969e1c5f19aa1651080dd5b1985d0b718592
2016-06-08 10:59:57 +08:00
Carsten "Tomcat" Book d8feaef998 Backed out changeset 74a7d364f5a3 (bug 1214710) for bustage on a CLOSED TREE 2016-06-08 12:08:53 +02:00
Eugen Sawin 5a015f6bec Bug 1214710 - [1.11] Implement ReaderQueue for simultaneous decoder limit enforcement. r=jya,jwwang 2016-06-08 11:29:11 +02:00
Dan Glastonbury eaa1d08d90 Bug 1276570: Replace TargetQueues enum with bitwise-or flags. r=jwwang
MozReview-Commit-ID: 95rnjumeBf

--HG--
extra : rebase_source : bffaaa632cbe2f9d27f82746a85f2089ede6301a
2016-05-31 14:32:37 +10:00
Jean-Yves Avenard 1a83f50401 Bug 1277508: P2. Add HasPendingDrain convenience method. r=kamidphish
MozReview-Commit-ID: Lcij7sc2y9d

--HG--
extra : rebase_source : 917ad661b0de70062d00758ed359e574562f75fd
2016-06-02 21:08:05 +10:00
Jean-Yves Avenard e6ff9b5d09 Bug 1277508: P1. Don't attempt to demux new samples while we're currently draining. r=kamidphish
We should only attempt to demux new samples once all pending decoded frames have been returned. Otherwise, the next demuxing attempt once a resolution change has been detected will reset the state and drop all decoded frames.

MozReview-Commit-ID: 2coKQA8lZ8c

--HG--
extra : rebase_source : f8df34bd9ea1b05c251a34d043da19c7d3d5e587
2016-06-02 20:54:33 +10:00
Alfredo Yang 68adb6b579 Bug 1068151 - keep decoding a corrupted video. r=jya 2016-05-30 18:24:00 +02:00
Jean-Yves Avenard 07f877b595 Bug 1274445: P2. Don't unnecessarily reset the decoder context. r=kamidphish
MediaFormatReader::Reset is already resetting the context.

MozReview-Commit-ID: AWIh9aTFA6S

--HG--
extra : rebase_source : 4ad28da651f9d0608d91503b901045a8947f3073
2016-05-30 15:46:55 +10:00
JW Wang 1f7b60118b Bug 1275807 - Remove remaining use of FlushableTaskQueue. r=cpearce.
MozReview-Commit-ID: L12wxh7GPIr

--HG--
extra : rebase_source : 745ae8240326246050513c96300eba1e32d84130
2016-05-24 16:48:26 +08:00
Jean-Yves Avenard 48f24d3464 Bug 1275538: P2. Drop decoded frames that we know are already too late. r=kamidphish
MozReview-Commit-ID: EZ2Ql2DtTKa

--HG--
extra : rebase_source : 4dbffc3538e86562a6bb347354f4ff377e484f04
2016-05-26 14:58:48 +10:00
Jean-Yves Avenard ca37fb4d46 Bug 1275538: P1. Abort early if a skip request is in progress. r=gerald,kamidphish
We would only abort early if new data had been received. Which may not always be the case.

MozReview-Commit-ID: HvAUq5CTc7F

--HG--
extra : rebase_source : a24b6c8bf2a31b0c9e69fc748ebb9b80b5c0d286
2016-05-26 13:59:46 +10:00
Chris Pearce bc093355a7 Bug 1249706 - Fix 8fe22dd4fc8a (backout of a085ea2d24bb). r=bustage
--HG--
extra : rebase_source : dedc21e95680f0361f4ff9e2058fe37f1a322e8e
2016-05-25 10:51:14 +12:00
Chris Pearce daf024be7d Bug 1249706 - Backout a085ea2d24bb for blowing telemetry server's mind. r=backout
--HG--
extra : rebase_source : fc17ac88544ff800b141a276f66282b34f613dfe
2016-05-25 10:31:15 +12:00
Jean-Yves Avenard 708b1db5db Bug 1274933: Reject data promise when EOS is encountered following waiting for data. r=gerald
MozReview-Commit-ID: 1hKplz5wFnJ

--HG--
extra : rebase_source : 301821b51146e5cc7273f86b53b16c1e6ef6ca08
2016-05-24 19:58:36 +10:00
Jean-Yves Avenard cd102518d1 Bug 1270323: P5. Prevent potential null deref. r=cpearce
This currently can't happen as no MediaDataDecoder ever return a null sample.

MozReview-Commit-ID: BucIadubght

--HG--
extra : rebase_source : 4c6f3dc1d5581bdb9d58ba3b7cc1659c57f40d8e
2016-05-23 16:12:17 +10:00
Jean-Yves Avenard 977d53d5e1 Bug 1270323: P4. Don't drain decoder if we're already waiting for new data. r=cpearce
If we're in waiting for data mode, the decoder must have already been drained and we want the waiting promise to be resolved upon the next run of UpdateReceivedNewData.

MozReview-Commit-ID: Hf8pFFyQmjJ

--HG--
extra : rebase_source : c51ed65c7d7c4a9ee877e6f9420f6534480e7cb5
2016-05-23 16:09:12 +10:00
Jean-Yves Avenard 1a18fcce6e Bug 1270323: P2. Don't process new incoming data while a skip to next keyframe is pending. r=cpearce
Followup from bug 1272964 P4.

MozReview-Commit-ID: 18MC3O1JZLv

--HG--
extra : rebase_source : f1f09890f8837caceb37e0e5deafea6e43fbe900
2016-05-21 23:02:43 +08:00
Jean-Yves Avenard 778a01fa9e Bug 1272964: P6. Exclude frames dropped due to internal seeking from calculations. r=cpearce
MozReview-Commit-ID: HKnEaUh3rkV

--HG--
extra : rebase_source : adb5d9313ffa66b949991e96f9a48df835ae6451
2016-05-19 17:03:39 +08:00
Jean-Yves Avenard 90596205d1 Bug 1272964: P4. Only flush decoder if skip to next keyframe actually succeeds. r=cpearce
As the decoder was flushed and reset prior the skip to next keyframe started, and future error would be unrecoverable. So only reset the decoder once the skip completes and succeeded. Otherwise we default back to normal decoding.

MozReview-Commit-ID: GEj1i0EsaYO

--HG--
extra : rebase_source : c1d2beafa6e35f571b941e8f173ec10b726ec1a0
2016-05-19 15:02:43 +08:00
Jean-Yves Avenard c1bf16766d Bug 1272964: P2. Don't activate skip to next keyframe until we passed the internal seek target. r=gerald
currentTime may be past the start of the internal seek time, but before its end, which would have triggered a false positive: we do not want to jump to the next key frame here.

MozReview-Commit-ID: H5O9XXnk84T

--HG--
extra : rebase_source : 0bc96472acfe03ff0c87a6fc3712bd99b96064b6
2016-05-18 11:48:05 +08:00
Jean-Yves Avenard a9d78c43ed Bug 1272964: P1. Only activate skip to next keyframe logic when next keyframe time is known. r=gerald
MozReview-Commit-ID: DoAstqSRnyc

--HG--
extra : rebase_source : ef02fe137907a61b6437ea7164282717453c6771
2016-05-17 22:26:34 +08:00
Ryan VanderMeulen 84b0a4b61f Backed out changeset 0e4c5be816f3 (bug 1257107) for webm reftest failures.
CLOSED TREE
2016-05-19 10:39:07 -04:00
Kaku Kuo 016612435e Bug 1272267 - Adjust the seek target in the MediaFormatReader. r=jya
MozReview-Commit-ID: H297znLMtOC

--HG--
extra : rebase_source : 3872312d3aed6530554ef524e4fd99fd68f28202
2016-05-16 18:15:17 +08:00
Alfredo Yang 3fed340de9 Bug 1257107 - Discard decoded data if its pts is smaller than seek time. r=jya
--HG--
extra : rebase_source : 2f17f7b3b70f774e03322dbc63727b0794279f91
2016-05-17 21:46:00 -04:00
Jean-Yves Avenard b4a0208665 Bug 1273018: P3. Adjust range of audio assertions. r=gerald
With the new video-only seek type, we need to ignore the current audio decoding state whenever video-only seeking is in progress.

MozReview-Commit-ID: 5eynmG2UyyA

--HG--
extra : rebase_source : 7e9bdd7c44cb4a80129bfc468da87288e520c984
2016-05-16 16:15:45 +08:00
Jean-Yves Avenard 48ddbe88b9 Bug 1273018: P2. Don't reject audio waiting promise when performing a video only seek. r=gerald
MozReview-Commit-ID: G1MeZWxLayy

--HG--
extra : rebase_source : ea07192655c474997d7a3253adf9f13eefd45212
2016-05-16 14:50:04 +08:00
Jean-Yves Avenard 9773d374d9 Bug 1273018: P1. Rename some members. r=gerald
MediaFormatReader::mOriginalSeekTarget now has different use and the name was no longer reflective of the actual usage.

MozReview-Commit-ID: Fu0fmgUlbgr

--HG--
extra : rebase_source : 7c106fc4832def7c6a4b91e1950ed5b3e1109129
2016-05-16 14:47:57 +08:00
Dan Glastonbury 02af730fcf Bug 1272562 - Don't check audio asserts when seeking video. r=jya
MozReview-Commit-ID: 8njbfw7ni24

--HG--
extra : rebase_source : 59bee06a39cc627831e160127120511eb5304fe8
2016-05-13 16:35:43 +10:00
Jean-Yves Avenard cc8c8725df Bug 1271491: P6. Remove the need to call PDMFactory::Init(). r=cpearce
PDMFactory will automatically load and initialize the required frameworks upon first use.
Also fix constness of some methods.

MozReview-Commit-ID: HFbvTMRFAey

--HG--
extra : rebase_source : ce3e7ff6cefc35b32674c9a81c3488fe21b48626
2016-05-12 18:54:35 +10:00
Dan Glastonbury 332d6f1a7d Bug 1272422 - Part 3: Don't reset audio queue. r=jya
When resuming from suspended video, don't reset the audio queues or
audio demuxing state in MFR.

Extracted the code from ResetDemuxers() and inlined it at calling sites
as recommended by jya.

MozReview-Commit-ID: 3wpH075RrKW
2016-05-13 15:50:11 +10:00
Jean-Yves Avenard 80fb61d88f Bug 1272182: P2. Reject upfront videos for which we have no decoder. r=cpearce
Similar logic with audio tracks, but those are ignored instead.

MozReview-Commit-ID: 6p9ej66aFgD

--HG--
extra : rebase_source : 01406ed958ce9e71d886955cf728d625acc779e1
2016-05-12 12:00:21 +10:00
Jean-Yves Avenard ee67f44c7c Bug 1272182: P1. Ignore invalid video tracks. r=cpearce
MozReview-Commit-ID: BdCdLkCMBRt

--HG--
extra : rebase_source : c83e636f9d34d909ed1f9c086eb89af1391a5adb
2016-05-12 11:42:20 +10:00
Sebastian Hengst 5bd0507354 Backed out changeset e8354c6f439c (bug 1272182) for missing latest updates. r=backout request by developer 2016-05-12 13:40:42 +02:00
Sebastian Hengst 266bbbd332 Backed out changeset d5eac62c7880 (bug 1272182) 2016-05-12 13:39:36 +02:00
Jean-Yves Avenard 9bc456e050 Bug 1272182: P2. Reject upfront videos for which we have no decoder. r=cpearce
Similar logic with audio tracks, but those are ignored instead.

MozReview-Commit-ID: 6p9ej66aFgD

--HG--
extra : rebase_source : 0d696fed85bc53feabfe248e9ae16c5380e70261
2016-05-12 12:00:21 +10:00
Jean-Yves Avenard ff6e5b2b5f Bug 1272182: P1. Ignore invalid video tracks. r=cpearce
MozReview-Commit-ID: BdCdLkCMBRt

--HG--
extra : rebase_source : c83e636f9d34d909ed1f9c086eb89af1391a5adb
2016-05-12 11:42:20 +10:00
Jean-Yves Avenard d31cb0499b Bug 1206637: P2. Replace all cached preferences with MediaPrefs ones. r=cpearce
Additionally, clean up stray and unused Preferences.h header.

MozReview-Commit-ID: IcPrD2inkDE

--HG--
extra : rebase_source : c3c6e37767627db3601090c2855a3dfa98cb4368
2016-05-10 11:02:28 +10:00
Dan Glastonbury 526fdd85f6 Bug 1224973 - Part 5: Implement suspend decoding for background video. r=cpearce,jwwang,jya
Implemented by short-circuiting calls to RequestVideoData in MDSM so no
frames are decoded. Resuming playback when video moves to foreground by
using the SeekTask/SeekJob/Seek in MDSM with result of GetMediaTime().

Special consideration is made to only seek the video part of Seek() to
remove an audible glitch in the audio playback when the video becomes
visible again.

MozReview-Commit-ID: 7YFDTanslXu
2016-05-12 09:54:15 +10:00
Jean-Yves Avenard 9f2e0f2c87 Bug 1269408: P10. Reject promise early if in error state. r=me
Partial revertial of commit 3fa48191a0f (P9).

MozReview-Commit-ID: 2jAW7RLZ2xg
2016-05-07 19:16:34 +10:00
Nathan Froyd ea473279ae Backout 6d6749bb5c26 (bug 1269408) for being pushed too soon, Executus 2016-05-06 22:08:46 -04:00
Jean-Yves Avenard 969594ea8c Bug 1269408: P10. Reject promise early if in error state. r=me
MozReview-Commit-ID: 2jAW7RLZ2xg
2016-05-07 11:23:32 +10:00
Carsten "Tomcat" Book f3c7e2f2aa Backed out changeset 31dc08c9c505 (bug 1068151) for causing assertion failures
--HG--
extra : rebase_source : b91b953d3ef0d4f37496de9e3fb8de10b2f6770d
2016-05-06 14:02:12 +02:00
Alfredo Yang 96ae363c0b Bug 1068151 - keep decoding with malformat video. r=jya 2016-05-06 01:10:00 +02:00
Jean-Yves Avenard 92553ea442 Bug 1258922: [MSE] P4. Set draining flag to true when skip to next keyframe failed. r=gerald
data promise is only resolved once the decoder has been drained. It was possible for a promise to never be resolved if skipping to the next key frame failed.

MozReview-Commit-ID: GimbQTImH9e
2016-05-06 17:29:41 +10:00
Jean-Yves Avenard 10c2e4ded5 Bug 1269408: P9. Move handling logic of skip to next keyframe to its own function. r=gerald
MozReview-Commit-ID: EjCAFvdcdJ6
2016-05-06 17:29:14 +10:00
Jean-Yves Avenard 946c83d7c5 Bug 1269408: P8. Add debugging log. r=gerald
Almost everytime I had to debug the MFR, I had to print those details.

MozReview-Commit-ID: GR0vZuKiqyd
2016-05-06 17:29:07 +10:00
Jean-Yves Avenard 85dfb74665 Bug 1269408: P7. Start skip to next keyframe logic when resume point is behind current time. r=gerald
There is no point decoding up to the internal seek time if it's already behind the current playback time.

MozReview-Commit-ID: ErPrjEPFCOH
2016-05-06 17:29:01 +10:00
Jean-Yves Avenard ffcc71c256 Bug 1269408: P6. Add debugging information, useful when a mochitest timeout. r=gerald
Access to some members is not thread-safe; but the typical use of those informations is when a mochitest has timed out, and by that time the MFR will have been idled for over 5 minutes.

MozReview-Commit-ID: 21BxrSZXVVJ
2016-05-06 17:28:55 +10:00
Jean-Yves Avenard 420e17dd76 Bug 1269408: P5. Only drop the seek target if it's exactly the seek target. r=gerald
If the Skip To Next Keyframe logic was activated, the next frame demuxed would have been passed the internal seek target, causing it to be unnecessarily dropped.

MozReview-Commit-ID: DExwMPLXlZu
2016-05-06 17:28:48 +10:00
Jean-Yves Avenard 6da72a9485 Bug 1269408: P4. Ensure the decoders are flushed prior performing an internal seek. r=gerald
Some decoders (WMF) keep some internal counters on how many frames have been output and use this to calculate the time of the decoded audio frame. As such, when internally seeking, the next frame decoded would have always been past the seek target.

MozReview-Commit-ID: puzs6ecqbD
2016-05-06 17:28:41 +10:00
Jean-Yves Avenard 7d7e1ae0c4 Bug 1269408: P3. Ensure a new seek request will cancel the previous internal seek. r=gerald
MozReview-Commit-ID: 3dR8JWt4KSN
2016-05-06 17:28:35 +10:00
Jean-Yves Avenard 89278050c4 Bug 1269408: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald
MozReview-Commit-ID: Jro2PRtGX7c
2016-05-06 17:28:21 +10:00
Jean-Yves Avenard 7945decc88 Backed out changeset ecb87e0e1cab ("Bug 1269178: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald") 2016-05-06 17:27:34 +10:00
Jean-Yves Avenard aab4c4df00 Backed out changeset 31f6d645e9e5 ("Bug 1269178: P2. Ensure that no skip to next keyframe logic is activated while there's a pending seek. r=gerald") 2016-05-06 17:27:34 +10:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Jean-Yves Avenard 0508995f47 Bug 1269178: P2. Ensure that no skip to next keyframe logic is activated while there's a pending seek. r=gerald
While a seek is pending, the demuxer has been reset meaning that ShouldSkip() would almost always incorrectly return true and would corrupt the seeking state.

MozReview-Commit-ID: 6R912Fu6Nul

--HG--
extra : rebase_source : a20a5d0ed1c0d21c04014790bdf5a0c07edb82a4
2016-05-02 10:53:31 +10:00
Jean-Yves Avenard a2f6eca10d Bug 1269178: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald
MozReview-Commit-ID: DtaKBzxRVR8

--HG--
extra : rebase_source : ad49222ad6405caac6e56cda959cd230b5f9b925
2016-05-01 23:37:09 +10:00
Jean-Yves Avenard 74dc9128dc Bug 1269177: Wait for demuxing request to complete before treating new data notification. r=gerald
MozReview-Commit-ID: LF0YiCJJr3l

--HG--
extra : rebase_source : 05efa1d0be191bc5ceb754a30b5b2c72c09a4228
2016-05-01 20:54:11 +10:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Jean-Yves Avenard f15a29610d Bug 1267637: P2. Ignore outright audio track considered invalid. r=gerald
MozReview-Commit-ID: 6rMz8cjgLiY

--HG--
extra : rebase_source : 9e006f0125d9d3c786d64aae5f521f8239bbae8b
2016-04-27 17:35:58 +10:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
JW Wang 69b738fc15 Bug 1266304. Part 1 - Merge MediaDecoderReader::AudioDataPromise and MediaDecoderReader::VideoDataPromise. r=kaku.
MozReview-Commit-ID: BhhA7sjCTtQ
2016-04-22 14:16:49 +08:00
Gerald Squelart ecfb205472 Bug 1248507 - p1. Pass DecoderDoctorDiagnostics to PDMs&more - r=jya
Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.

Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.

MozReview-Commit-ID: 7u37bvY4CpW
2016-04-19 17:36:19 +10:00
Mats Palmgren ae56d6d1e1 Bug 1264500 - Include Telemetry.h to avoid build errors. r=cpearce 2016-04-13 17:02:00 -04:00
Matt Woodrow fd534aefc7 Bug 1257013 - Part 3: Stop checking for corrupt frames in MediaDecoderStateMachine since we no longer produce them. r=ajones
--HG--
extra : rebase_source : a68da2757970cd28da5719d77e3036f9051041e5
2016-03-21 18:50:41 +13:00
Bryce Van Dyk 939ab2b661 Bug 657791 - Update seekable range handling for cueless WebMs. r=kinetik
MediaDecoder previously had 3 states within GetSeekable(), media is either
seekable, seekable but not supported by transport, or not seekable. Due to
changes to make cueless webms playable, a 4th option is needed: a file that is
not fully seekable, but may support seeking from the transport, such as these
webms, should only be seekable in the buffered range.

MozReview-Commit-ID: ISeFkngtrGU
2016-02-04 17:31:21 +13:00
Bryce Van Dyk 2be9a949c6 Bug 1251460 - MDSM now waits on a promise to enqueue first frame loaded. r=jya
MediaDecoderStateMachine's EnqueueFIrstFrameLoadedEvent would previously call
into MediaDecoderReader to update MDR's buffered ranges and enqueue the frame
loaded event. This commit aims to instead have the buffered update take place,
and only afterwards enqueue the event. This should remove the possibility that
the event will be fired and handled before the update of the buffered ranges has
taken place.

MozReview-Commit-ID: GP8w2nF4xmj

--HG--
extra : transplant_source : %A0m%13%95%E3Gs%ACMd%1F%F4%25%B9qE%28J%21R
2016-03-09 15:32:49 +13:00
Louis Christie 4a902ba49c Bug 1249706: Added telemetry for the proportion of frames dropped keyed by several details. r=jya 2016-02-23 13:19:40 +13:00
Gerald Squelart cb8bb9067d Bug 1248308 - Fix dom/media non-unified build errors - r=jya 2016-02-17 08:55:33 +11:00
Louis Christie e2039d5220 Bug 1231793: Part 3 - Fixed reading of Metadata tags. r=jya 2016-02-17 00:28:49 +11:00
Jean-Yves Avenard 5b93305cdc Bug 1229742: P2. Don't reject data promise if new data is pending. r=gerald
MozReview-Commit-ID: LaQeRoffA6B
2016-02-09 11:40:29 +11:00
Jean-Yves Avenard 291989df71 Bug 1229742: P1. Only clear EOS flag if we have new data. r=gerald
MozReview-Commit-ID: ttmWsAIPxQ
2016-02-09 11:40:28 +11:00
Jean-Yves Avenard 6194838634 Bug 1244639: P1. Don't assume MP3 decoding always starts at 0. r=cpearce
This remove the MP3 workaround for the mac decoder that was added in bug 1194080.
2016-02-05 14:53:58 +11:00
Jean-Yves Avenard 1397b86c7b Bug 1243608: P6. Only seek audio to video seek time when performing a fast seek. r=cpearce
This allows for much faster seek time.
2016-02-02 18:57:14 +11:00
Jean-Yves Avenard e345db00ed Bug 1243608: P4. Have MediaDecoderReader::SeekPromise return a TimeUnit. r=cpearce 2016-02-02 18:57:13 +11:00
Jean-Yves Avenard b7b6a77158 Bug 1243608: P3. Make SeekTarget::mTime a TimeUnit object. r=cpearce
Also makes it a private member and provide a GetTime() accessor instead.
2016-02-02 18:57:12 +11:00
Jean-Yves Avenard 83fff9be79 Bug 1243608: P2. Pass the full SeekTarget object to MediaDecoderReader::Seek. r=cpearce
This will allow the reader to know if we are performing a fast seek.
2016-02-02 18:57:12 +11:00
Jean-Yves Avenard 3bdc8c2cc9 Bug 1241677: P2. Add media decoder's description to about:media report. r=cpearce 2016-01-25 10:33:40 +11:00
Jean-Yves Avenard e35b5b767d Bug 1236703: P1. Add debugging information for MSE to about:media plugin. r=kentuckyfriedtakahe
Add : number of frames decoded and number of frames skipped during skip to next key frame and if hardware acceleration is currently in use.
2016-01-20 09:50:25 +11:00
Jean-Yves Avenard ff358b786d Bug 1237809: P2. Detect change of display size. r=cpearce
This is a similar problem as HE-AAC where the container information diverge with what it actually contains.
2016-01-13 13:55:56 +11:00
Chris Pearce eed22e8016 Bug 1237836 - Add support for MetadataTags to MediaFormatReader. r=jya 2016-01-08 13:22:53 +13:00
Chris Pearce bf16ee017a Bug 1237836 - Backout 3bae9aee9d8a for test failures. r=backout 2016-01-08 15:43:27 +13:00
Chris Pearce 4bd82d79ea Bug 1237836 - Add support for MetadataTags to MediaFormatReader. r=jya
--HG--
extra : rebase_source : fdfd6ff1dc5ae2f298d50201859663aee5a6f45d
2016-01-08 13:22:53 +13:00
Jean-Yves Avenard 5597dadd65 Bug 1229987: P5. Drop frames during internal seeking early. r=cpearce
We would only start to drop frames once we had a request for data. On platforms such as windows WMF, following a drain we would typically hold over 33 decoded frames which would have been held resulting in unnecessarily high memory usage.
This also results in a simplified logic for the following steps.
2015-12-18 19:26:54 +11:00
Jean-Yves Avenard af9786e6b0 Bug 1229987: P2. Drain decoder when encountering gap. r=cpearce
This allows for all buffered frames to be playable.
2015-12-18 19:26:52 +11:00
Jean-Yves Avenard 9ae0949e75 Bug 1130237: P2. Reset decoder state even if no decoder has been created yet. r=gerald 2015-12-05 17:28:37 +11:00
Matt Woodrow 6ef854d267 Bug 1230338 - Record video frames dropped by the compositor, or while flushing during skip-to-keyframe. r=jya 2015-12-04 13:33:21 +13:00
JW Wang e4cbe0c128 Bug 1228939 - 1. add mSeekable to MediaInfo. 2. use MediaEventSource to notify the decoder when the media is not seekable. 3. remove unused code. r=jya. 2015-12-02 15:42:32 +08:00
Jean-Yves Avenard 321718db5f Bug 1226707: P3. Only create the type of decoder we will need. r=cpearce 2015-11-23 16:30:49 +11:00
Jean-Yves Avenard 1deba9f634 Bug 1226707: P2 Ensure we won't operate on a decoder that failed to initialize. r=cpearce 2015-11-23 16:30:48 +11:00
sajitk 582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk 3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
JW Wang 2c0bf35e10 Bug 1220551. Part 2 - remove arguments from NotifyDataArrivedInternal(). r=jya. 2015-11-02 21:28:57 +08:00
JW Wang 924432c2ee Bug 1217714 - Remove some unused functions from MediaDecoderReader. r=jya. 2015-10-26 14:10:29 +08:00
Jean-Yves Avenard 3b37e9ab5c Bug 1207198: P1. Do not initialize decoders during ReadMetadata. r=cpearce
Decoders are created and initialized automatically when needed.
Also fix issues where we could have a pending initialization promise pending when going into dormant mode.
2015-10-23 23:34:06 +11:00
James Cheng f01266ed3f Bug 1194606 - Make MediaDecoderStateMachine capable of requesting different kind (decoded/raw) of media data. r=jya 2015-10-20 05:33:00 -04:00
JW Wang 1deed476dc Bug 1216850. Part 3 - backout bug 1214073. r=me. 2015-10-21 14:04:20 +08:00
JW Wang 8e64159f84 Bug 1216850. Part 2 - backout bug 1214498. r=me. 2015-10-21 11:45:53 +08:00
JW Wang 8cbe3a5118 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
Eugen Sawin 583b6ec5eb Bug 1211443 - Drop scheduled update if decoder initialization isn't done yet. r=jya 2015-10-19 20:13:41 +02:00
JW Wang 9e488683b4 Bug 1215003. Part 2 - rename AsyncReadMetadata and move it to the private section. r=gerald. 2015-10-19 10:52:15 +08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Jean-Yves Avenard 6db8b43cba Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02:00
JW Wang 1065049ddb Bug 1214498 - MediaDecoderReader::DisableHardwareAcceleration should figure out which thread to dispatch the job. r=gerald. 2015-10-14 14:25:01 +08:00
JW Wang 6765563707 Bug 1214073 - MediaDecoderReader::ReleaseMediaResources will do dispatch if necessary. r=gerald. 2015-10-14 11:52:26 +08:00
JW Wang d3c9b0b0df Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
JW Wang 32c513290f Bug 1212246. Part 1 - remove the aBorrowedTaskQueue parameter from the MediaDecoderReader constructor. r=jya. 2015-10-09 09:25:23 +08:00
Jean-Yves Avenard 628247fc4e Bug 1212176: Remove arguments passed to MediaDataDemuxer::NotifyDataArrived API. r=cpearce
Be more explicit on what it does and how it should be used.
2015-10-08 20:47:21 +11:00
JW Wang fcf9e2e7ae Bug 1212260 - MediaFormatReader::SetCDMProxy should call |OwnerThread()->Dispatch|. r=cpearce. 2015-10-08 14:05:06 +08:00
Jean-Yves Avenard d9cf3168c4 Bug 1206977: P11. Don't rely on SupportsMimeType to determine if a track can be played. r=cpearce
The PDMFactory will run more accurate checks based on the TrackInfo object and will fail to create a decoder if the type is unsupported. So use that instead
2015-10-08 00:34:47 +11:00
Jean-Yves Avenard 5d54dafcb3 Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-08 00:34:45 +11:00
Jean-Yves Avenard dd5e99c694 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-08 00:34:42 +11:00
Jean-Yves Avenard a02b64b149 Bug 1212164: Prevent use of demuxer before initialization completes. r=cpearce 2015-10-08 00:34:40 +11:00
Nigel Babu 1a01355c4f Backed out 16 changesets (bug 1206977, bug 1211652, bug 1211335) for linux bc7 bustage ON A CLOSED TREE
Backed out changeset 51b1b076a386 (bug 1206977)
Backed out changeset dec7c35469d1 (bug 1206977)
Backed out changeset bf9ddc78b394 (bug 1206977)
Backed out changeset 08f5cff5aa12 (bug 1206977)
Backed out changeset e4e91de99867 (bug 1206977)
Backed out changeset 696ecf2e2947 (bug 1206977)
Backed out changeset ab2d524a9b35 (bug 1206977)
Backed out changeset d66be0e4547f (bug 1206977)
Backed out changeset 64c58afbd6c1 (bug 1206977)
Backed out changeset eb10d09015e1 (bug 1206977)
Backed out changeset 042959216393 (bug 1206977)
Backed out changeset 7e0de7f62202 (bug 1206977)
Backed out changeset 3d095569f6ba (bug 1206977)
Backed out changeset 041418a07ae5 (bug 1206977)
Backed out changeset 654970da23e4 (bug 1211335)
Backed out changeset 8ba8e24a84d3 (bug 1211652)
2015-10-07 13:43:39 +05:30
Nigel Babu 41bc4391c9 Backed out changeset 67b7e1825a7f (bug 1212164) for depending on bug 1206977 2015-10-07 13:43:10 +05:30
Jean-Yves Avenard 339a21eccf Bug 1212164: Prevent use of demuxer before it is ready. r=cpearce 2015-10-07 16:54:43 +11:00
Jean-Yves Avenard b4365d5d77 Bug 1206977: P11. Don't rely on SupportsMimeType to determine if a track can be played. r=cpearce
The PDMFactory will run more accurate checks based on the TrackInfo object and will fail to create a decoder if the type is unsupported. So use that instead
2015-10-07 16:40:29 +11:00
Jean-Yves Avenard 2da2bd26f9 Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-07 16:40:27 +11:00
Jean-Yves Avenard 0256993164 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-07 16:40:24 +11:00
Jean-Yves Avenard 877ef122ef Bug 1209850: Only attempt to initialize decoders as they are required. r=alfredo 2015-10-01 23:05:16 +10:00
Carsten "Tomcat" Book 3a44702ffb Backed out 1 changesets (bug 1209850) for causing m2 test failures
Backed out changeset 9c01e0e3da74 (bug 1209850)
2015-10-01 14:05:49 +02:00
Jean-Yves Avenard 3785990cb1 Bug 1209850: Only attempt to initialize decoders as they are required. r=alfredo 2015-10-01 19:07:39 +10:00
JW Wang 7651430ef0 Bug 1208922. Part 6 - IsWaitingOnCDMResource() is not used by MDSM anymore. Remove it from MediaDecoderReader and make it private in MediaFormatReader. r=cpearce. 2015-09-27 18:59:52 +08:00
JW Wang 6b35bad359 Bug 1208922. Part 5 - MDSM can now query capabilities from CDMProxy without reader setting them in MediaInfo. r=cpearce. 2015-09-27 18:59:50 +08:00
JW Wang b502b0fe56 Bug 1208922. Part 2 - add MediaDecoderReader::SetCDMProxy so it won't need to ask MediaDecoder for a CDMProxy. r=cpearce. 2015-09-27 18:40:03 +08:00
Jean-Yves Avenard 9396c59cd0 Bug 1089586: Abort pending seeks. r=jwwang
We only perform the last seek requested instead.
2015-09-29 11:37:15 +10:00
Jean-Yves Avenard e5aadf98af Bug 1205911: P2. Ensure demuxer is reset before performing a seek. r=edwin
Should there be any demuxing request pending resolution, it would have caused our internal seek to ultimately fail.
2015-09-18 16:03:58 +10:00
Jean-Yves Avenard c15474a997 Bug 1205911: P1. Cancel pending demux request when searching for next keyframe. r=edwin 2015-09-18 16:03:58 +10:00
Jean-Yves Avenard 023ff53978 Bug 1204757: P1. Update MediaDataDemuxer::Init() behavior. r=cpearce
A MediaDataDemuxer is now not to resolve the init promise until it has all the metadata.
Except MediaSource, all demuxers would be doing blocking read to scan for the metadata, and having partial metadata would be an error.
For MediaSource, we pass the NotifyDataArrived message which will cause the MediaSourceDemuxer to re-attempt to search for the metadata.

When used within MediaSource's TrackBuffersManager, a demuxer will never be created until we have received a complete init segment (this task is performed by the various ContainerParsers)
2015-09-16 18:14:17 +10:00
Jean-Yves Avenard 9e0e052d65 Bug 1193670: P1. Remove use of SharedDecoderManager. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard 1de1d09411 Bug 1204407: P1. Remove no longer used mainthread object. r=cpearce 2015-09-16 18:14:14 +10:00
Jean-Yves Avenard 82279827e6 Bug 1204419: P3. Remove now unused MediaDecoderReader functions. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard fa4c46c19b Bug 1199904: Only start decoding ahead after explicitly requesting data. r=gerald
Decode ahead will be stopped when seeking or when switching resolution.
2015-08-30 20:48:09 +10:00
Jean-Yves Avenard 192f716dfb Bug 1197075: P4. Reject skip promise on cancellation or shutdown. r=edwin
Also remove redundant code.
2015-08-26 15:36:54 +10:00
Jean-Yves Avenard c27fc37432 Bug 1197075: P3. Decode frames ahead of MDSM requesting them. r=edwin
This makes the media.*-decode-ahead pref performs more according to its name.
We decode audio and video in advance so a MediaDataPromise can be resolved almost instantly.
Default is 2.
2015-08-26 15:36:54 +10:00
Jean-Yves Avenard 3bca678d28 Bug 1197075: P2. Revert "Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley". r=edwin 2015-08-26 15:36:53 +10:00
Jean-Yves Avenard e08e634d4f Bug 1196696: Always check that track demuxer was successfully created. r=jwwang 2015-08-26 12:50:06 +10:00
Jean-Yves Avenard 60b4f11a68 Bug 1197664: Report the total number of decoded frames. CLOSED TREE r=kentuckyfriedtakahe 2015-08-24 23:46:35 +10:00
Matt Woodrow ec61d0727e Bug 1196417 - Make video software fallback only affect the current video instead of the entire browser. r=cpearce 2015-08-20 11:43:36 -04:00
Benjamin Chen 0af807cd51 Bug 1192733: fix the MediaFormatReader can not back from dormant state. r=jya
--HG--
extra : rebase_source : 185e32c16727be0a5138b936e56c72b20fa03f19
2015-08-14 12:02:15 +08:00
Jean-Yves Avenard 3f43144aaf Bug 1195071: Check for MediaDataDecoder::Input error. r=cpearce 2015-08-17 10:28:43 +10:00
Matt Woodrow 169ab22517 Bug 1178098 - Report why DXVA initialization failed to about:support. r=cpearce
--HG--
extra : rebase_source : 976baee04db89d0808b8fc494108e01aa163d402
2015-07-13 16:12:23 -04:00
Jean-Yves Avenard c6fcd44f2d Bug 1188871: P1. Don't drain decoders when an error is encountered. r=cpearce
This is a partial revert of bug 1173657 (commit 80f9da7f0806). Not all decoders will properly handle draining when they have encountered an error and will never call DrainComplete().
The Gonk and Android decoder do not. So we just get around this.
2015-08-14 10:20:31 +10:00
Jean-Yves Avenard ce57a50527 Bug 1180935: P3. Fixed MediaFormatReader::Update logging. r=gerald 2015-08-12 21:46:06 +10:00
Jean-Yves Avenard 398014c093 Bug 1180935: P1. Do not drain decoders when waiting for data. r=cpearce
We made the design decision that it was preferable to decode as much of what we had, even if that meant we couldn't decode some frames upon resume.
This can cause significant apparent stalls with some YouTube videos where keyframes are up to 4.2s appart (128 frames).
2015-08-12 21:46:05 +10:00
Birunthan Mohanathas 2b4a52cf2e Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas edbcd5e014 Bug 1185763 - Part 1: Always use mozilla::Move with nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Jean-Yves Avenard 10659dafdb Bug 1188313: P1. Attempt to seek audio near video. r=cpearce
Do not only rely on the MediaDecoderState machine to keep A/V sync after a seek as should we seeked in fast mode ; it wouldn't
2015-08-11 14:18:49 +10:00
Alfredo Yang 8c59fda383 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Kilik Kuo ad5c5e6495 Bug 1188812 - Obtain CDM can render capability and store into MediaInfo r=cpearce. 2015-08-06 14:24:00 +08:00
Jean-Yves Avenard 616e6d2dd6 Bug 1188131: Don't rely on MediaResource type to detect media format. r=cpearce
This information is often wrong and non-existent with MSE. Let the PDM decides later based on the metadata.
This prevent hardware acceleration to be turned on leading to extremely high CPU usage on high definition videos.
2015-08-07 12:19:49 +10:00
Bobby Holley c4645a718b Bug 1190496 - Namespace the SharedThreadPool.h include. r=cpearce 2015-08-04 14:00:25 -07:00
Alfredo Yang 1885ed42a2 Bug 1189173 - Drop frames aggressively during internal seek. r=jya
--HG--
extra : rebase_source : 2db2cf4908c764df2273a0c6f2fb572a6310b0e8
2015-07-30 00:53:00 +02:00
Jean-Yves Avenard 024aff6746 Bug 1189138: P2. Add useful debugging information to logs. r=cpearce 2015-07-30 15:20:19 +10:00
Jean-Yves Avenard b29bbb6f28 Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce 2015-07-28 23:28:24 +10:00
Jean-Yves Avenard c203925f63 Revert "Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce"
This reverts commit 9c48bac3e0d3
2015-07-28 16:37:53 +10:00
Jean-Yves Avenard c7b835ce08 Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce 2015-07-28 14:23:29 +10:00
Jean-Yves Avenard bec365db4b Bug 1188220: Allow disabling HW acceleration even when SharedDecoderManager isn't used. r=cpearce
The SharedDecoderManager is being obsoleted.
2015-07-28 14:11:06 +10:00
Jean-Yves Avenard 0259a11e37 Bug 1185886: P2. Don't unnecessarily drain decoders when there's no frames pending. r=cpearce 2015-07-27 14:52:11 +10:00
Jean-Yves Avenard d614b68bdf Bug 1183888: Report empty buffered ranges unless we have a start time. r=bholley 2015-07-24 23:02:20 +10:00
Jean-Yves Avenard f77f5f6283 Bug 1185431: Immediately resolve WaitingForDataPromise if we're not waiting for data. r=cpearce 2015-07-22 14:22:46 +10:00
Jean-Yves Avenard 5d0c759bca Bug 1181204 - Prevent use of the decoder outside the reader's taskqueue. r=cpearce
This fix a potential race when the decoder could be shutting down on the reader's taskqueue while the MediaDecoderStateMachine thread attempts to read it.

--HG--
extra : amend_source : d8a7ac55539c22f69d965299010a20b34c8a4c58
extra : transplant_source : %F6%D2z%A2%40%D1%CE%8BX%FB%9E%CA%2B%ABa%7D%F9%7Fl%BF
2015-07-20 15:14:37 -04:00
Jan Gerber 7bed9a2be5 Bug 1148102: P7. Hookup WebMDemuxer. r=jya 2015-07-20 17:27:08 +10:00