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

142 Коммитов

Автор SHA1 Сообщение Дата
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
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
Jean-Yves Avenard 5205ad7fdd Bug 1307013: Error once number of errors reach threshold. r=gerald
MozReview-Commit-ID: L6hI7CRSCCF

--HG--
extra : rebase_source : bf2cdba33e552e0aacc49a2c767352659bda1145
2016-10-06 16:31:35 +11: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 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 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 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 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
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
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
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
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 d647d056e2 Backed out changeset c5b79d4a6913 (bug 1274626) 2016-08-02 17:47:26 +02: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
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
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
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01: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
Edwin Flores 462669a29b Bug 854095 - Remove an unused member from MediaFormatReader - r=jya
--HG--
extra : rebase_source : 15272d54393ddd5eb3fc9d1a5a63c31065ba1409
2016-05-31 08:50:00 +02:00
Alfredo Yang 68adb6b579 Bug 1068151 - keep decoding a corrupted video. r=jya 2016-05-30 18:24:00 +02: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
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 51b5eef658 Bug 1270323: P1. Don't reset flag indicating that new data was received. r=cpearce
A bit of a shot in the dark, but it is possible that data got received but that information got lost as reset was called.

MozReview-Commit-ID: 1KjQeCFsGPJ

--HG--
extra : rebase_source : 3a522045bde0658fdfeccbf4d0cac11b43bc35d7
2016-05-21 22:58:40 +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
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
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 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 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
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 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 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