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

926 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard cdf4e99378 Bug 1286810: [MSE] P1. Error on abort() during Range Removals. r=gerald
As per https://github.com/w3c/media-source/issues/26

MozReview-Commit-ID: 1rNKVTBDjFY
2016-07-19 11:45:28 +10:00
Jean-Yves Avenard 94a6256296 Bug 1287244: [MSE] Remove check for not 'updating' in {set,clear}LiveSeekableRange(). r=gerald
See https://github.com/w3c/media-source/issues/118

MozReview-Commit-ID: FtIc1cVfn8R

--HG--
extra : rebase_source : d4cb85d8fa42f67e6710a64cb73f4dfda6088992
2016-07-16 14:35:02 +10:00
Jean-Yves Avenard 35a36f0344 Bug 1286722: [MSE] P2. Add mochitests for event handler attributes. r=gerald
MozReview-Commit-ID: HTJgziOHcbW

--HG--
extra : rebase_source : 9a001429cd3b1875ca1d88417c7b08f643582f63
2016-07-14 18:27:18 +10:00
Jean-Yves Avenard 01308240dd Bug 1286722: [MSE] P1. Add mediasource event handler attributes. r=bz
See https://github.com/w3c/media-source/issues/66

MozReview-Commit-ID: 9fANabkz5ud

--HG--
extra : rebase_source : 37ef4885191942c56cc2ff0e198c5cbc7cab0c4a
2016-07-14 18:28:19 +10:00
Jean-Yves Avenard d6c9036cce Bug 1286723: [MSE] P2. Add live seekable mochitest. r=gerald
MozReview-Commit-ID: 4NIGn8HGz93

--HG--
extra : rebase_source : 844e8733d9cc3b5f9b0fdc587c3a3067f8733859
2016-07-14 15:56:05 +10:00
Jean-Yves Avenard 8b5b0ae730 Bug 1286723: [MSE] P1. Add support for live seekable attribute. r=bz,gerald
See https://github.com/w3c/media-source/issues/5

MozReview-Commit-ID: EP37gRmUAXF

--HG--
extra : rebase_source : cd134517a3f1d50bce2f17a82acabe0f2bb042cb
2016-07-14 14:34:45 +10:00
Jean-Yves Avenard aee6e800d6 Bug 1286796: [MSE] P1. Replace InvalidAccessError usage with TypeError. r=gerald
See https://github.com/w3c/media-source/issues/34

MozReview-Commit-ID: 6RDjhxnaOGM

--HG--
extra : rebase_source : f7686b58bfde94865cccb123578675d11ce9a37e
2016-07-14 20:47:02 +10:00
Jean-Yves Avenard 5b39e168bb Bug 1285987: Narrow the workaround added in bug 1276184 to only be effective with webm. r=gerald
Some invalid streams incorrectly tag all frames as keyframes, which cause the frames to be inserted in the wrong order in the trackbuffer.

MozReview-Commit-ID: EZurdiMxmle

--HG--
extra : rebase_source : d739eecb9e5b06aaeefcf044b5735949db86522d
2016-07-13 21:20:50 +10:00
Gerald Squelart 1a62740d33 Bug 1283364 - Fix brace style - r=jya
MozReview-Commit-ID: DMRfqCCiZ2E

--HG--
extra : rebase_source : 97d0ff262ca75bab4b7370c3c88a56eb4158863d
2016-07-01 09:44:55 +10:00
Gerald Squelart f55654d62b Bug 1283364 - Make ~TrackBuffersManager non-virtual - r=jya
Follow-up to bug 1259274, where TBM lost its inheritance.

MozReview-Commit-ID: 24tyq8tZYHp

--HG--
extra : rebase_source : 34dafd58ca0daca53649e04a0781bf6e23db3cbe
2016-06-30 14:23:14 +10: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
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Jean-Yves Avenard 8dddf4b2bc Bug 1276184: [MSE] P3. Be consistent with types when accessing track buffer. r=kamidphish
MozReview-Commit-ID: BJlNeValVxE

--HG--
extra : rebase_source : 333397c0b67d9f5d9a549abef873e43ce2bfe91e
2016-06-02 17:14:03 +10:00
Jean-Yves Avenard c7855950ec Bug 1276184: [MSE] P2. Remove the need to scan the track buffer when frames are being removed. r=kamidphish
The index at which we are removing frames is always the one where we will be inserting the next ones.

MozReview-Commit-ID: DHeJDmwiMS9

--HG--
extra : rebase_source : 3730c0ed7fbdb4d9f8b4157f36aa7bb9d03a6517
2016-06-02 16:59:00 +10:00
Jean-Yves Avenard 2089f9d8bb Bug 1276184: [MSE] P1. Scan where to start removing frames from the start if new block added starts with a keyframe. r=kamidphish
We keep the next position on where to add frames so that we do not break the current coded frame group. However, when the new group of added frames starts with a keyframe we do not have to worry about breaking the previous coded frame group.

MozReview-Commit-ID: G81xGuSa4Y2

--HG--
extra : rebase_source : 4cbe5d0b5921c68c877815af15bbd10b40f18c80
2016-06-02 16:40:43 +10:00
Edwin Flores bd172274b3 Bug 845095 - Enable media dormancy everywhere for MP4 and Media Source playback - r=jya
--HG--
extra : rebase_source : 40a9429fb4e1490d6afaf25fbb7466fc4beaaaf2
2016-05-31 21:08:00 +02:00
Chris Peterson 11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Jean-Yves Avenard 4fed0cc0ca Bug 1274892: [MSE] Don't crash when source buffer is deleted early. r=cpearce
The condition will be perfectly handled by the MediaFormatReader anyway.

MozReview-Commit-ID: Dm6evq6T4t6

--HG--
extra : rebase_source : 6e49cfae68bfa856aad891faf3cea565b152e565
2016-05-23 14:03:43 +10:00
Jean-Yves Avenard aafa084df3 Bug 1272964: [MSE] P5. Default to skipping to the next keyframe if no keyframe was found past currentTime. r=cpearce
If no keyframe are found after our time threshold, we can still skip to another keyframe (despite being prior the desired time).
So this is just a workaround for our inability to tell the MDSM when to enter buffering mode and instead the MDSM incorrectly uses the time of the last frame returned.

MozReview-Commit-ID: 5sGULpvqY5m

--HG--
extra : rebase_source : 392fe16a00eb9e10812ba4ada2e4e7c4e4aaa016
2016-05-19 15:37:34 +08:00
Jean-Yves Avenard c505cae198 Bug 1272964: [MSE] P3. Do not skip over gaps when searching for the next keyframe. r=gerald
MozReview-Commit-ID: 1wPbp6JOaa8

--HG--
extra : rebase_source : d01e8752b2aeaa3cc19897b6e8855f01f5163302
2016-05-17 16:18:07 +08:00
Jean-Yves Avenard f0d5590b9d Bug 1261900: [MSE] P4. Only evict no longer used data from resource. r=gerald 2016-04-22 16:33:56 +10:00
Jean-Yves Avenard b53370f549 Bug 1261900: [MSE] P2. Prevent assertion if first media segment contains no usable frames. r=gerald
Encountered while using YouTube MSE/webm compliance test.
2016-04-21 21:19:47 +10:00
Sebastian Hengst 3f839a4b05 Backed out changeset f2425c95f50f (bug 1272964) 2016-05-18 11:22:40 +02:00
Jean-Yves Avenard 6070728c61 Bug 1272964: [MSE] P3. Do not skip over gaps when searching for the next keyframe. r=gerald
MozReview-Commit-ID: 1wPbp6JOaa8

--HG--
extra : rebase_source : 0bdbc9bfafe69d73b4a204e10b1377b6f184fdd4
2016-05-17 16:18:07 +08:00
Jean-Yves Avenard 37f3397832 Bug 1264694: [MSE] P3. Remove no longer necessay methods. r=jwwang
P2 let all tasks run until completion, as such we don't need to deal with interrupted tasks anymore.

MozReview-Commit-ID: 45lYcIGk2ce

--HG--
extra : rebase_source : 33438284685d8f1b48f54fd109880baf0353b976
2016-05-16 21:14:28 +08:00
Jean-Yves Avenard 94d52db9f7 Bug 1264694: [MSE] P2. Clear mTaskQueue early when no longer required. r=jwwang
We need to ensure that the MSE TaskQueue gets shutdown as soon as possible and not wait for the MediaSource parent to be destroyed by the cycle collector.
XPCOM shutdown will deadlock if any SharedThreadPool are still in use, and it possible for the cycle collector to only occur after xpcom has shutdown.
So it's important to ensure mTaskQueue is cleared when the MediaSourceDecoder has been shutdown.

This is done by queueing a new DetachTask that will clear mTaskQueue when run.

MozReview-Commit-ID: C3FXcRtq1wy

--HG--
extra : rebase_source : 79a7c5cb451655c4679b9d4e11d0b5ca0d9814b9
2016-05-16 18:30:19 +08:00
Jean-Yves Avenard 9225d32861 Bug 1264694: [MSE] P1. Ensure we only add source buffer tasks on the task queue. r=jwwang
This ensures that the tasks are processed in the expected order.

MozReview-Commit-ID: JPxlwReZ4Az

--HG--
extra : rebase_source : 4ffac9deaf531c9dfd8443b2e26812d7c8a89102
2016-05-17 17:15:45 +08:00
Ryan VanderMeulen d665e900e2 Backed out changesets 5f4c3f3c188b, 0114f37a7742, and 7a336216b9c4 (bug 1264694) for web-platform-test asserts/crashes. 2016-05-17 11:28:59 -04:00
Jean-Yves Avenard a240a3d77e Bug 1264694: [MSE] P3. Remove no longer necessay methods. r=jwwang
P2 let all tasks run until completion, as such we don't need to deal with interrupted tasks anymore.

MozReview-Commit-ID: 45lYcIGk2ce

--HG--
extra : rebase_source : db9c8db1b3f1d51d57ad090fdeb2cad6682de2be
2016-05-16 21:14:28 +08:00
Jean-Yves Avenard 62469ee531 Bug 1264694: [MSE] P2. Clear mTaskQueue early when no longer required. r=jwwang
We need to ensure that the MSE TaskQueue gets shutdown as soon as possible and not wait for the MediaSource parent to be destroyed by the cycle collector.
XPCOM shutdown will deadlock if any SharedThreadPool are still in use, and it possible for the cycle collector to only occur after xpcom has shutdown.
So it's important to ensure mTaskQueue is cleared when the MediaSourceDecoder has been shutdown.

This is done by queueing a new DetachTask that will clear mTaskQueue when run.

MozReview-Commit-ID: C3FXcRtq1wy

--HG--
extra : rebase_source : 38c0b5548b32e89b0994704c1318ff77fba76eba
2016-05-16 18:30:19 +08:00
Jean-Yves Avenard ce63a808d5 Bug 1264694: [MSE] P1. Ensure we only add source buffer tasks on the task queue. r=jwwang
This ensures that the tasks are processed in the expected order.

MozReview-Commit-ID: JPxlwReZ4Az

--HG--
extra : rebase_source : 873a373c5a6ccf20eb69f6d36b1ebdf25e6ddea3
2016-05-17 17:15:45 +08:00
Sebastian Hengst c470acb725 Backed out changeset aa4ee7364898 (bug 1264694) for frequent crash in mediasource-append-buffer.html [@ mozilla::TrackBuffersManager::ProcessTasks()] on OSX 10.10 after hitting its new assertion. r=backout 2016-05-17 09:50:38 +02:00
Sebastian Hengst 2963660445 Backed out changeset 14b8c2f4764f (bug 1264694) 2016-05-17 09:50:29 +02:00
Jean-Yves Avenard 568abdd787 Bug 1264694: [MSE] P2. Remove no longer necessay methods. r=jwwang
P1 let all tasks run until completion, as such we don't need to deal with interrupted tasks anymore.

MozReview-Commit-ID: 45lYcIGk2ce

--HG--
extra : rebase_source : 87731ae2ef2c1aa2fae57ef4b232374f9ad5e0bc
2016-05-16 21:14:28 +08:00
Jean-Yves Avenard 8449a3f79b Bug 1264694: [MSE] P1. Clear mTaskQueue early when no longer required. r=jwwang
We need to ensure that the MSE TaskQueue gets shutdown as soon as possible and not wait for the MediaSource parent to be destroyed by the cycle collector.
XPCOM shutdown will deadlock if any SharedThreadPool are still in use, and it possible for the cycle collector to only occur after xpcom has shutdown.
So it's important to ensure mTaskQueue is cleared when the MediaSourceDecoder has been shutdown.

This is done by queueing a new DetachTask that will clear mTaskQueue when run.

MozReview-Commit-ID: C3FXcRtq1wy

--HG--
extra : rebase_source : 034319517bd8b90668b6311efb54c3a1a864cb5b
2016-05-16 18:30:19 +08:00
Jean-Yves Avenard cb12cb9282 Bug 1272916: [MSE] P1. Don't rely only on dts gap to establish if we have a gap in our source buffer. r=gerald
Also check that the pts have similar gap.

MozReview-Commit-ID: 4Hk24S78HjF

--HG--
extra : rebase_source : abc13534748ae649117e7679918d8a4a5800c51a
2016-05-15 18:58:46 +08:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07: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
Jean-Yves Avenard b2b17692f7 Bug 1258922: [MSE] P3. Check that the data we are attempting to skip to is buffered. r=gerald
MozReview-Commit-ID: DCQkIimciEe
2016-05-06 17:29:34 +10:00
Jean-Yves Avenard 55e5e7da77 Bug 1258922: [MSE] P2. Do not go over gap when attempting to find the next key frame. r=gerald
MozReview-Commit-ID: EtK34PdzN4a
2016-05-06 17:29:27 +10:00
Jean-Yves Avenard 72763bcdf5 Bug 1258922: [MSE] P1. Initialise variable. r=gerald
It was possible for the variable to be used uninitialized.

MozReview-Commit-ID: EwzyJRPn7iV
2016-05-06 17:29:21 +10:00
Jean-Yves Avenard fdcc4cb0d4 Bug 1269408: P2. Update mochitest. r=gerald
On Windows, it is possible for the WMF decoder to consume more than the amount of frames available before outputting the first frame. So just to produce the loadeddata event, we may have in fact already reached the end of the content. To guarantee that the "playing" event is fired, we must add more data than what was originally there.

MozReview-Commit-ID: 12eQnchNGLB
2016-05-06 17:28:28 +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
JW Wang 0a9e6a6567 Bug 1267933 - rewrite the shutdown sequence of MediaShutdownManager. r=jya,gerald.
MozReview-Commit-ID: 8n7JlXOby0z
2016-05-04 16:13:25 +08:00
Jean-Yves Avenard 55fcd538e6 Backed out changeset d14dc334734adccc6741093c388e13c7099a8a38 (Bug 1268868: [MSE] P1. Re-enable gap detection within a media segment. r=gerald)
MozReview-Commit-ID: IxFqoMce57F
2016-05-04 15:18:39 +10:00
Jean-Yves Avenard 6c48713ed0 Bug 1269249: [MSE] P2. Add mochitest verifying behavior. r=jwwang
MozReview-Commit-ID: LxEjSyStUIE

--HG--
extra : rebase_source : ac543fd1e691cbd40133ed9a4453ecafbf53e65f
2016-05-02 15:23:53 +10:00
Jean-Yves Avenard 31a0cd2056 Bug 1269249: [MSE] P1. Clamp range to media source duration when media source is ended. r=jwwang
MozReview-Commit-ID: KncGDdTISQ8

--HG--
extra : rebase_source : 6d3234e46b21140e935d9b4490ca50c594c00370
2016-05-02 15:21:40 +10:00
Jean-Yves Avenard e1f2021daa Bug 1269178: P4. Add mochitest. r=gerald
It ensures that resume from waiting for data is correct and the MediaFormatReader internal seek can handle partial GOP.

MozReview-Commit-ID: 1jyv3dajQPv

--HG--
extra : rebase_source : d9aba013aaacc9c19ee6a47ead839adda5c1299e
2016-05-02 13:28:39 +10:00
Jean-Yves Avenard 0eb3dc97f9 Bug 1269178: P3. Add mochitest. r=gerald
MozReview-Commit-ID: 2iqZetykYgj

--HG--
extra : rebase_source : b18e35f8ee6d1a714e997d8d131c6731f8de90d4
2016-05-02 11:16:00 +10:00
Jean-Yves Avenard 902b305d79 Bug 1268868: [MSE] P3. Prevent crash should gap be detected in content. r=gerald
If the last frames of a media segment were evicted due to gap detection, mLongestFrameDuration would have been reset.

Additionally, simplify the code by using temporary variables.

MozReview-Commit-ID: HCjuZkgwANN

--HG--
extra : rebase_source : eed2837fd4b05fe3f7c4774c4486a201d0100cf7
2016-04-30 15:43:59 +10:00
Jean-Yves Avenard 924a72bc46 Bug 1268868: [MSE] P2. Reset longest duration after keyframe is seen. r=gerald
This makes us closer to the spec, while still allowing some leeway in gap detection which was found to too strict in the past.

MozReview-Commit-ID: 9EPT2e2F6ed

--HG--
extra : rebase_source : 2bdc01667c3aaeae7a72eb5c6861076113a34c59
2016-04-30 13:10:15 +10:00
Jean-Yves Avenard a5d72eca70 Bug 1268868: [MSE] P1. Re-enable gap detection within a media segment. r=gerald
It had originally been added to improve speed though further changes to the processing of frames made this optimization unecessary.
And it means that we don't properly handle invalid media segment with discontinuities within their range.

MozReview-Commit-ID: wGjWEQxLX3

--HG--
extra : rebase_source : 1a14e404c9e4630cab525472978a8c6cbfbc3bd0
2016-04-30 12:41:32 +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 f18daf30b6 Bug 1247138: [MSE] P2. Add mochitest. r=gerald
2nd media segment also exercise bug 1264622 resolution

MozReview-Commit-ID: F5euopyUiPk

--HG--
extra : rebase_source : b1e1199317612e159507583bcbc4753d106580a6
2016-04-15 01:46:36 +10:00
Jean-Yves Avenard 624abac6d4 Bug 1247138: [MSE] P1. Allow change of audio format. r=gerald
MozReview-Commit-ID: 9fktsFVXtdt

--HG--
extra : rebase_source : bba6b286c6281b34d21cd2a1d1341ef05a4977e4
2016-04-14 19:12:44 +10:00
Jean-Yves Avenard ffad2f30e5 Bug 1264199: P10. renable test now that core issue likely fixed. r=gerald
Reversal of change from bug 1258922.

--HG--
extra : rebase_source : 644b5fae5e1e16d88b89a1e77e78494653e416fd
2016-04-26 12:24:52 +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 35257991e7 Bug 1265978. Part 3 - invoke mozDumpDebugInfo() from JS. r=jya.
MozReview-Commit-ID: EHNKeFwNlvl
2016-04-22 14:18:41 +08:00
Gerald Squelart 0451e54ac6 Bug 848994 - p1. Refactor Decoder Doctor - r=cpearce
Some refactoring, clean-ups, etc.

The main change is that the can-play status is passed when diagnostics are
finally recorded. This will help when introducing different types of
diagnostics in future patches (e.g., Key System issues).

MozReview-Commit-ID: 182ePlrMqn4
2016-04-22 13:42:11 +10:00
Carsten "Tomcat" Book 19d1910c99 Backed out changeset 6fad55fb6f68 (bug 1247138)
--HG--
extra : rebase_source : ea9cbd3b6f607729ce7fbf81779b39e2caa2c5e6
2016-04-21 16:31:49 +02:00
Carsten "Tomcat" Book f846ae6785 Backed out changeset 99ee6347b173 (bug 1247138)
--HG--
extra : rebase_source : a0e41d9bb692fd056a45eff439a35a5905356bb2
2016-04-21 16:31:48 +02:00
Jean-Yves Avenard 2f4278ee1e Bug 1247138: [MSE] P2. Add mochitest. r=gerald
2nd media segment also exercise bug 1264622 resolution

MozReview-Commit-ID: F5euopyUiPk

--HG--
extra : rebase_source : b1e1199317612e159507583bcbc4753d106580a6
2016-04-15 01:46:36 +10:00
Jean-Yves Avenard 94cfa0b423 Bug 1247138: [MSE] P1. Allow change of audio format. r=gerald
MozReview-Commit-ID: 9fktsFVXtdt

--HG--
extra : rebase_source : bba6b286c6281b34d21cd2a1d1341ef05a4977e4
2016-04-14 19:12:44 +10:00
Jean-Yves Avenard df2fed92a5 Bug 1258922: [MSE] Disable noisy test. r=me
MozReview-Commit-ID: 7GR6cBq5wM0

--HG--
extra : rebase_source : f7ba8e37e2066dd51c39ba22c54a52456305d67c
2016-04-21 21:30:59 +10:00
Wes Kocher 7f155f79ba Backed out 2 changesets (bug 1247138) for permafailing media mochitests on OSX 10.6 a=backout
Backed out changeset 34f5a7144be3 (bug 1247138)
Backed out changeset fbcd1815776a (bug 1247138)

MozReview-Commit-ID: 5PLY4dZx3me
2016-04-20 11:01:09 -07:00
Jean-Yves Avenard 10970f6729 Bug 1247138: [MSE] P2. Add mochitest. r=gerald
2nd media segment also exercise bug 1264622 resolution

MozReview-Commit-ID: F5euopyUiPk
2016-04-20 15:04:06 +10:00
Jean-Yves Avenard 4356561af6 Bug 1247138: [MSE] P1. Allow change of audio format. r=gerald
MozReview-Commit-ID: 9fktsFVXtdt
2016-04-20 15:03:59 +10:00
Gerald Squelart 0977ec8ef6 Bug 1248507 - p3. Use DecoderDoctorDiagnostics - r=jya,bz
DecoderDoctorDiagnostics are now used at places where Firefox Chrome and/or
websites checks whether some media formats may be played:
- audio|video.canPlayType()
- audio|video resource loader
- MediaSource.IsTypeSupported()
- MediaSource.AddSourceBuffer()

MozReview-Commit-ID: B1KdjXODq9j
2016-04-19 17:36:19 +10: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
Carsten "Tomcat" Book 80156aa1ad Backed out changeset 625452e32c3b (bug 1247138) also needed for backout to fix crashes
--HG--
extra : rebase_source : 1d025513dbb5183e059b58dc81c529969a048d8e
2016-04-18 14:41:16 +02:00
Carsten "Tomcat" Book bebb8900bb Backed out changeset 9ad2b86b9b30 (bug 1247138)
--HG--
extra : rebase_source : ab7198ff534ce246b3107bc45340a75eb36da17f
2016-04-18 14:40:57 +02:00
Jean-Yves Avenard a6c2920dde Bug 1247138: [MSE] P2. Add mochitest. r=gerald
2nd media segment also exercise bug 1264622 resolution

MozReview-Commit-ID: F5euopyUiPk

--HG--
extra : rebase_source : b1e1199317612e159507583bcbc4753d106580a6
2016-04-15 01:46:36 +10:00
Jean-Yves Avenard 580e5aa834 Bug 1247138: [MSE] P1. Allow change of audio format. r=gerald
MozReview-Commit-ID: 9fktsFVXtdt

--HG--
extra : rebase_source : bba6b286c6281b34d21cd2a1d1341ef05a4977e4
2016-04-14 19:12:44 +10:00
JW Wang 753cf80b90 Bug 1259473 - per comment 14, move actions involving |this| to Init() from the constructor. r=jya. 2016-04-01 23:10:44 +08:00
Jean-Yves Avenard 0bd6645973 Bug 1262396: [MSE] Remove incorrect assertion. r=gerald
MozReview-Commit-ID: Dav8XajE6mU

--HG--
extra : rebase_source : e54c67cf6df968d7463afbf3fcffe2cc3032d7c5
2016-04-06 21:26:46 +10:00
Jean-Yves Avenard 37d629b09b Bug 1259916: [MSE] P3. Simplify eviction calculation logic. r=gerald
Also, remove no longer used code and update comments to properly reflect the current algorithms used.

MozReview-Commit-ID: GwsGC70xM85

--HG--
extra : rebase_source : 2c1a2cd449eac243d8e3d77cc1bf80c2adc64cdf
2016-03-28 00:58:37 +11:00
Jean-Yves Avenard 9867dc58c5 Bug 1259916: [MSE] P2. Bump audio source buffer eviction threshold to 30MB. r=gerald
20MB appears to work, but just to be safe until we get confirmation from YouTube on what is a safe value to use.

MozReview-Commit-ID: BnGaVLeCRJ5

--HG--
extra : rebase_source : 6333dd4c8dbd6f846344218dd50124797fc5cb23
2016-03-28 00:48:57 +11:00
Jean-Yves Avenard c7c99753a2 Bug 1259916: [MSE] P1. Fix eviction. r=gerald
Bug 1216460 introduced a regression which would cause to always evict from both ends of the current track buffer.

MozReview-Commit-ID: 4f01tNQ2KU8

--HG--
extra : rebase_source : 7da96fc1cbca03d60705fce681ee9259dd81d173
2016-03-28 00:41:31 +11:00
Jean-Yves Avenard 70a7329e7e Bug 1259274: [MSE] P5. Use new AutoTaskQueue with MSE objects. r=gerald
It was possible for a TrackBuffersManager to have pending tasks currently running while the MediaSourceDemuxer was shutting down the task queue. This would cause an assertion upon resolution of the promise attempting to schedule a new runnable as the task queue was now shutdown.

The AutoTaskQueue only shuts down once it's no longer used.

MozReview-Commit-ID: IzPh2OdGbvN

--HG--
extra : rebase_source : 3b39ca72f1bbb1d64e7f9f7a376b5b9cb68da0f6
2016-03-26 02:14:49 +11:00
Jean-Yves Avenard e7f959b6f8 Bug 1259274: [MSE] P4. Add AutoTaskQueue convenience class. r=gerald
Just like TaskQueue, but doesn't require to be shutdown.

MozReview-Commit-ID: 9JR9mZZuP4w

--HG--
extra : rebase_source : c98aaafdad31e34afe7a58d1113f5835f777c1c0
2016-03-26 02:09:26 +11:00
Jean-Yves Avenard 5f3b4ca5d5 Bug 1259274: [MSE] P3. Refactor handling of tasks so they only ever run concurrently. r=gerald
MozReview-Commit-ID: 1U8r82kTR0t

--HG--
extra : rebase_source : 0646125364bee89f37cfff426c1034a6feb3a516
2016-03-27 20:20:40 +11:00
Jean-Yves Avenard 8da4d6ea4d Bug 1259274: [MSE] P2. Remove unused code path. r=gerald
MozReview-Commit-ID: FHj3u1WL1ul

--HG--
extra : rebase_source : aa5303670890056e716edb3ce50e774df143c6e7
2016-03-27 18:44:10 +11:00
Jean-Yves Avenard 734a39347d Bug 1259274: [MSE] P1. Remove unnecessary abstraction layer. r=gerald
We now longer require an abstraction layer with the TrackBuffersManager now that the old MSE has been removed.

MozReview-Commit-ID: 3uEejohvFQD

--HG--
extra : rebase_source : 2e89fe4c7b9d13910fb6f26f0090fca26d19726f
2016-03-25 11:31:30 +11:00
Gerald Squelart f2bfa841c1 Bug 1259985 - Add missing return after null-check - r=jya
MozReview-Commit-ID: 138NM9xTmVA

--HG--
extra : rebase_source : 6f594e905b1d8d8f623a02ea8fb78b7dc3b846f0
2016-03-27 19:57:25 +11:00
Jean-Yves Avenard f32aca05b7 Bug 1258410: [MSE] P2. Disconnect init promise if any pending. r=gerald
MozReview-Commit-ID: 9iOPqSeDzdH

--HG--
extra : rebase_source : a5a840c31c7f5348870dc9f9ca3a408d91a96a88
2016-03-23 16:35:10 +11:00
Jean-Yves Avenard d2e51e6dd6 Bug 1258410: [MSE] P1. Abort if mInputDemuxer has been reset. r=gerald
MozReview-Commit-ID: 3irSFFSnXFp

--HG--
extra : rebase_source : a10d067d54ad3f4a67027efae50282270732c265
2016-03-23 13:44:00 +11:00
Eugen Sawin 0d1db2c7f7 Bug 1216560 - [3.1] Make eviction thresholds const. r=jya 2016-03-22 21:32:58 +01:00
Eugen Sawin c94e9927bc Bug 1216460 - [2.2] Refactor SourceBuffer frame eviction and threshold defaults. r=jya
* Move eviction handling out of SourceBuffer into TrackBuffersManager
* Separate audio and video eviction thresholds
* Reduce default audio eviction threshold to 15MB
2016-03-22 21:24:45 +01:00
Eugen Sawin 39faf25691 Bug 1216460 - [1.1] Refactor data types, fix logs and prevent harmful type promotions in SourceBuffer eviction handling. r=jya 2016-03-22 21:24:44 +01:00
Jean-Yves Avenard e4b81849b8 Bug 1258562: MSE] Abort if MediaSource has been shutdown. r=gerald
The assumption was made that this code was never called if MediaSourceDecoder::NextFrameBufferedStatus() had been called before. However, that assumption was incorrect as NextFrameBufferedStatus() is only called if we had determine we had no frame buffered.

MozReview-Commit-ID: 1hsEJuInION

--HG--
extra : rebase_source : f760ef8df01858c24887ba024c6b350332d2e4dc
2016-03-22 10:34:30 +11:00
Joel Maher c2f5092ca2 Bug 1242682 - Separate dom/media into its own subsuite. r=gbrown, a=tomcat
MozReview-Commit-ID: ERgFe60aJF8
2016-03-10 11:03:52 -08:00
Jean-Yves Avenard d5b11db943 Bug 1230265 - Add codec agnostic benchmark; r=kentuckyfriedtakahe
The Benchmark class is now taking a MediaDataDemuxer argument. Options allow to decode any videos and measure the decoding speed.

MozReview-Commit-ID: C017I1cGqPL
2016-03-09 15:43:57 +11:00
Anthony Jones d00c420b2c Bug 1230265 - Benchmark VP9 decoder performance and enable VP9 on fast machines; r=jya
MozReview-Commit-ID: 4GhSLun9x6Z
2016-03-09 15:43:38 +11:00
sakshi 1af0b67296 Bug 1197311 - Remove PR_snprintf calls in dom/ r=froydnj 2016-02-17 14:23:39 -05:00
Wes Kocher 0c4a0e7ccb Backed out changeset 20d8879ac256 (bug 1242682) a=backout CLOSED TREE
MozReview-Commit-ID: AH8yw9fw2kD

--HG--
extra : source : 5a2e0878d6c258b36b0ee8712a2afcde6ad94c78
2016-03-04 11:41:25 -08:00
Joel Maher 4719fa3568 Bug 1242682 - Separate dom/media into its own subsuite. r=armenzg, a=Tomcat
MozReview-Commit-ID: 55QtAPlIltM
2016-02-04 13:35:06 -08:00
Joel Maher 8b55ee9fcd backout bug 1242682 for failures due to buildbot config issues
MozReview-Commit-ID: LsAxnbITmAq
2016-03-01 10:23:53 -08:00
Joel Maher a9ad590555 Bug 1242682 - Separate dom/media into its own subsuite. r=armenzg, a=Tomcat
MozReview-Commit-ID: 55QtAPlIltM
2016-02-04 13:35:06 -08:00
Jean-Yves Avenard 3206518350 Bug 1248909: [MSE] P2. Simplify diagnostic. r=gerald
Also, an assert could have been incorrectly triggered, if eviction occurred on a source buffer while data was also being appended to it.

MozReview-Commit-ID: 6gVHZdbL07B
2016-02-19 12:19:08 +11:00
Wes Kocher d32f836f75 Backed out changeset 15485839d79f (bug 1248909) for frequent wpt crashes during mediasource-append-buffer.html a=backout
--HG--
extra : commitid : 8D3aarBCm8E
2016-02-18 14:05:00 -08:00
Jean-Yves Avenard f04a1e0f1c Bug 1248909: [MSE] P2. Simplify diagnostic. r=gerald
Also, an assert could have been incorrectly triggered, if eviction occurred on a source buffer while data was also being appended to it.

MozReview-Commit-ID: 6gVHZdbL07B
2016-02-18 19:21:05 +11:00
Jean-Yves Avenard f63fc4693e Bug 1248909: [MSE] Use MOZ_DIAGNOSTIC_ASSERT. r=gerald
MozReview-Commit-ID: 5HPdLKopGGa
2016-02-18 11:22:04 +11:00
Jean-Yves Avenard c5c63d35fc Bug 1245463: [MSE] P5. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-12 23:45:48 +11:00
Jean-Yves Avenard 96e96d9ebc Bug 1245463: [MSE] P4. Remove dead code. r=gerald
MozReview-Commit-ID: Elnm0WPuqHC
2016-02-12 23:45:47 +11:00
Jean-Yves Avenard 30db7c749e Bug 1245463: [MSE] P3. When abort() is called, wait until the current appendBuffer completes. r=gerald
The W3C spec indicates that while everything in MSE is asynchronous, the abort() command is to interrupt the current segment parser loop and have the reset parser loop synchronously completes the frames present in the input buffer.
This causes a fundamental issue that abort() will never result in a deterministic outcome as the segment parser loop may be in different condition.

We used to really attempt to abort the current operation, however there could have been a race in the order in which tasks were queued. As such, we now simply wait for the current appendBuffer to complete.

This also simplifies the code greatly, as we don't need to worry about pending concurrent appendBuffer.

The actually happens to be similar to the Chromium behavior.

Similar to bug 1239983, we strongly assert should a segment parser loop be running when it must have completed.

MozReview-Commit-ID: 9772PLQEozf
2016-02-12 23:45:47 +11:00
Jean-Yves Avenard 9d45d60388 Bug 1245463: [MSE] P2. Remove MediaSource's duration mirror. r=gerald
It served no purpose other than implementing the MSE spec by the letter. The spirit is preserved.
This allows to disable tail dispatching on the MediaSourceDemuxer's TaskQueue which prevents us from performing synchronous operation on the main thread.

MozReview-Commit-ID: G7aqfvGsf1e
2016-02-12 23:45:46 +11:00
Jean-Yves Avenard aceca098dd Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 23:45:46 +11:00
Phil Ringnalda 6111439998 Back out 6 changesets (bug 1245463) for !mAppendRunning (Append is running) assertion failures
CLOSED TREE

Backed out changeset 75d96e417aaf (bug 1245463)
Backed out changeset dca0577d741c (bug 1245463)
Backed out changeset 17ffbe7ca24e (bug 1245463)
Backed out changeset 83a2de2fcf02 (bug 1245463)
Backed out changeset e8bb35ea72e4 (bug 1245463)
Backed out changeset 48364b868055 (bug 1245463)
2016-02-11 23:39:36 -08:00
Jean-Yves Avenard 656801b3a7 Bug 1245463: [MSE] P6. Fix incorrect assertions. r=me
mAppendRunning is set prior the append task being queued; so it is possible that the segment parser loop hasn't yet been started, yet mAppendRunning is true.

Separate this diagnostic with a new flag ON A CLOSED TREE.

MozReview-Commit-ID: GgTyyltKOJr
2016-02-12 15:18:43 +11:00
Jean-Yves Avenard 184fb6b1d4 Bug 1245463: [MSE] P5. Remove dead code. r=gerald
MozReview-Commit-ID: Elnm0WPuqHC
2016-02-12 15:18:41 +11:00
Jean-Yves Avenard a6a8d0565d Bug 1245463: [MSE] P4. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-12 10:30:16 +11:00
Jean-Yves Avenard dda61422b8 Bug 1245463: [MSE] P3. When abort() is called, wait until the current appendBuffer completes. r=gerald
The W3C spec indicates that while everything in MSE is asynchronous, the abort() command is to interrupt the current segment parser loop and have the reset parser loop synchronously completes the frames present in the input buffer.
This causes a fundamental issue that abort() will never result in a deterministic outcome as the segment parser loop may be in different condition.

We used to really attempt to abort the current operation, however there could have been a race in the order in which tasks were queued. As such, we now simply wait for the current appendBuffer to complete.

This also simplifies the code greatly, as we don't need to worry about pending concurrent appendBuffer.

The actually happens to be similar to the Chromium behavior.

Similar to bug 1239983, we strongly assert should a segment parser loop be running when it must have completed.

MozReview-Commit-ID: 9772PLQEozf
2016-02-12 10:30:09 +11:00
Jean-Yves Avenard e65199f63d Bug 1245463: [MSE] P2. Remove MediaSource's duration mirror. r=gerald
It served no purpose other than implementing the MSE spec by the letter. The spirit is preserved.
This allows to disable tail dispatching on the MediaSourceDemuxer's TaskQueue which prevents us from performing synchronous operation on the main thread.

MozReview-Commit-ID: G7aqfvGsf1e
2016-02-12 10:29:59 +11:00
Jean-Yves Avenard 5a49dc9392 Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 10:27:33 +11:00
Carsten "Tomcat" Book f854f0417e Backed out changeset 5b37030dbfe3 (bug 1245463) for Android m-9 crashes 2016-02-10 11:20:31 +01:00
Carsten "Tomcat" Book dc41ea5c25 Backed out changeset a9ccf315f1f2 (bug 1245463) 2016-02-10 11:20:16 +01:00
Carsten "Tomcat" Book 4626394d1c Backed out changeset 2376ec200aec (bug 1245463) 2016-02-10 11:20:15 +01:00
Carsten "Tomcat" Book 45b0b8a19f Backed out changeset 2affd4506079 (bug 1245463) 2016-02-10 11:20:13 +01:00
Carsten "Tomcat" Book 9f354ccec0 Backed out changeset 22641351f11f (bug 1245463) 2016-02-10 11:20:12 +01:00
Jean-Yves Avenard 7b7a27dd0f Bug 1245463: [MSE] P5. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-10 20:07:29 +11:00
Jean-Yves Avenard 95de6fa2f8 Bug 1245463: [MSE] P4. Remove dead code. r=gerald
MozReview-Commit-ID: Elnm0WPuqHC
2016-02-10 20:07:28 +11:00
Jean-Yves Avenard 43fa8f611e Bug 1245463: [MSE] P3. Diags to ensure the Segment Parser Loop isn't running. r=gerald
This is similar to bug 1239983, we strongly assert should a segment parser loop be running when it must have completed.

MozReview-Commit-ID: CXqGoq9Opq0
2016-02-10 20:07:28 +11:00
Jean-Yves Avenard 018bf90ad7 Bug 1245463: [MSE] P2. When abort() is called, wait until the current appendBuffer completes. r=gerald
The W3C spec indicates that while everything in MSE is asynchronous, the abort() command is to interrupt the current segment parser loop and have the reset parser loop synchronously completes the frames present in the input buffer.
This causes a fundamental issue that abort() will never result in a deterministic outcome as the segment parser loop may be in different condition.

We used to really attempt to abort the current operation, however there could have been a race in the order in which tasks were queued. As such, we now simply wait for the current appendBuffer to complete.

This also simplifies the code greatly, as we don't need to worry about pending concurrent appendBuffer.

The actually happens to be similar to the Chromium behavior.

MozReview-Commit-ID: CHppUOGM1mk
2016-02-10 20:07:27 +11:00
Jean-Yves Avenard f3b37cac73 Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-10 20:07:27 +11:00
Bryce Van Dyk 61408b539f Bug 1246842 - Rework previous commit to not used deprecated arguments.callee r=cpearce
MozReview-Commit-ID: DFWNOGN0FyY

--HG--
extra : transplant_source : %1E%0D%0E%F7%EB%AE%10%40%D6%C2%3F%03%EC%16%98%91Z%60%D8%20
2016-02-09 20:42:56 +13:00
Jean-Yves Avenard 8fa85e0c6e Bug 1246358: [MSE] Take pre-roll time into consideration when seeking. r=gerald 2016-02-08 17:36:17 +11:00
Jean-Yves Avenard a1d2f88108 Bug 1246521: [MSE] P3. Only error during Prepare Append algorithm if the media element is in error. r=gerald 2016-02-08 16:38:45 +11:00
Jean-Yves Avenard f501a23d19 Bug 1181981: [MSE] Force TrackId for MSE tracks. r=gerald
YouTube sets the track ID at 1 for both audio and video tracks. Attempting to use mozCaptureStream would cause an assert as it always expect tracks to have a different track Id.
2016-02-04 11:07:19 +11:00
Gerald Squelart 7511beb447 Bug 1239983 - Diags around TrackBuffersMgr promises - r=jya
Added diagnostics around demuxer init/reset promises, to catch early cases
where TrackBuffersManager::mInputDemuxer is destroyed while an init/reset
promise is in flight, which would cause later issues when the 'Then' clause
assumes that mInputDemuxer still exists.

Note: This is *not* an actual fix for crashes linked to this bug, but it should
help identify unexpected situations, or instead eliminate these patched
locations as sources of crashes.
A new bug will be needed to examine the fallout from this patch and produce a
real fix, or continue investigating.
2016-02-02 20:20:03 +11:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Guang-De Lin 345a0e7d0e Bug 1229936 - Enable mse mp4 mochitests on linux. r=jya 2016-01-27 14:46:52 +08:00
Jean-Yves Avenard 58d924fab9 Bug 1236703: P2. Add methods to retrieve debugging data on plain readers. r=jwwang 2016-01-20 09:50:26 +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 f079977e08 Bug 1240411: P8. Clean up MediaSource headers. r=cpearce
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:35 +11:00
Jean-Yves Avenard 3c25c690a7 Bug 1207220: Ensure MediaShutdownManager waits until all MediaDecoder have completed their shutdown. r=cpearce
XPCOM when shutting down expects all tasks to be run synchronously. As such, we must ensure that the remaining MediaDecoder are shut down before continuing on the next task.
In particular destroying gfxPlatforms must only ever happen after, as it is possible for the MediaDecoderReader to make use of gfx resources during shutdown.
2016-01-05 11:55:50 +11:00
Chris Peterson 88051371a9 Bug 1232223 - Part 1: Remove MOZ_WEBM #ifdefs because WebM is always supported, though not necessarily enabled. r=jya r=glandium 2015-12-12 13:49:07 -05:00
Jean-Yves Avenard 08597229bb Bug 1229987: P4. Stop pre-rolling when encountering WAITING_FOR_DATA. r=cpearce
This allows to start displaying frames even when we have less than 5 frames.
2015-12-18 19:26:54 +11:00
Jean-Yves Avenard 1e7e9a8d7c Bug 1229987: P3. Update mochitests and add new one verifying behavior. r=cpearce 2015-12-18 19:26:53 +11:00
Jean-Yves Avenard 7e9fd3bcf4 Bug 1229987: [MSE] P1. Ensure next random access point properly calculated after seek. r=gerald
When seeking, the next keyframe time would always be set to the seek time (as the next sample to be retrieved would be a keyframe). This could lead to the next key frame logic to be activated too aggressively.
2015-12-18 19:26:52 +11:00
Phil Ringnalda 45242f7699 Back out 4 changesets (bug 1229987) for ASan e10s timeout in test_playback.html, Mac timeouts in test_BufferingWait_mp4.html, and Win8 failures in test_WaitingToEndedTransition_mp4.html
Backed out changeset 707a87454058 (bug 1229987)
Backed out changeset 37003d495f20 (bug 1229987)
Backed out changeset c8f4e1eaf884 (bug 1229987)
Backed out changeset 42ca05d8546d (bug 1229987)
2015-12-10 23:10:20 -08:00
Jean-Yves Avenard ad5e2f804f Bug 1230527: P2. Add mochitest. r=jwwang
It's also another way to check for 1130237: we make sure that seeking starts after playback when we have a gap at the beginning of the data
2015-12-10 14:08:06 -05:00
Jean-Yves Avenard ce54507b17 Bug 1229987: P3. Update mochitests and add new one verifying behavior. r=cpearce 2015-12-10 12:17:26 -05:00
Jean-Yves Avenard 18c2b9cb12 Bug 1229987: [MSE] P1. Ensure next random access point properly calculated after seek. r=gerald
When seeking, the next keyframe time would always be set to the seek time (as the next sample to be retrieved would be a keyframe). This could lead to the next key frame logic to be activated too aggressively.
2015-12-10 12:17:25 -05:00
Jean-Yves Avenard e786add25c Bug 1130237: [MSE] P3. Add mochitest testing behavior. r=gerald
We load data from [2ish, 4] and ensure that playback didn't start before data [0, 2ish] is loaded.
2015-12-09 09:55:37 -05:00
Carsten "Tomcat" Book 2257530fee Backed out changeset b8a9e34748f1 (bug 1130237) for m2 test failures 2015-12-07 11:20:35 +01:00
Jean-Yves Avenard 7084f9ab9c Bug 1130237: [MSE] P3. Add mochitest testing behavior. r=gerald
We load data from [2ish, 4] and ensure that playback didn't start before data [0, 2ish] is loaded.
2015-12-05 17:28:38 +11:00
Jean-Yves Avenard a080f16503 Bug 1130237: [MSE] P1. Only ever return a frame if we have data. r=gerald
After a Reset() the definition is that the resource was seeked to 0. As such we should only return a frame if there's data at time==0.
2015-12-05 17:28:37 +11:00
Jean-Yves Avenard d6b653ae10 Bug 1229605: [MSE] Allow webm/audio independently of video. r=kentuckyfriedtakahe
This adds a media.mediasource.webm.audio.enabled preference (true by default) to disable opus or vorbis audio in webm mediasource.
2015-12-04 14:43:47 +11:00
Jean-Yves Avenard 99d86bb64e Bug 1194624: [MSE] P4. Add mochitest testing new behaviour. r=jwwang
Ensure that the canplay/canplaythrough and readyState is properly updated according to buffering condition.
2015-12-03 19:22:07 +11:00
Jean-Yves Avenard d77e4129ea Bug 1194624: [MSE] P3. Determine when canplaythrough can be fired. r=jwwang
We assume that if we have 30s of data buffered ahead of the current position or up to the element's duration that we can play ahead without interruption.
2015-12-03 19:22:06 +11:00
Jean-Yves Avenard 8e5e1f7311 Bug 1194624: [MSE] P2. Enable NextFrameBufferedStatus() for MediaSourceDecoder. r=jwwang
We require a slightly variation on the default implementation as mediasource allows for gaps of up to 125ms between samples and often videos do not start with a time of 0.
2015-12-03 19:22:05 +11:00
Jean-Yves Avenard b43e4839aa Bug 1194624: [MSE] P1. Move definition of EOS_FUZZ to be public. r=gerald 2015-12-03 19:22:05 +11:00
Jean-Yves Avenard 664205b25d Bug 1229256: [MSE] P3. Prevent crash should buffered range be read while shutting down. r=gerald 2015-12-03 12:38:11 +11:00
Jean-Yves Avenard aa942325d2 Bug 1229657: [MSE] Returns NotSupportedError if mimetype is invalid or not supported. r=gerald
InvalidStateError is only to be returned if the readyState attribute is not in the "open" state.
2015-12-03 12:38:09 +11:00
Jean-Yves Avenard fdf27ff498 Bug 1227396: P9. Remove unnecessary monitor. r=cpearce
The Index and MoofParser are now only used via the MP4Demuxer which is guaranteed to always be called on the same taskqueue.
2015-11-30 11:29:35 +11:00
Jean-Yves Avenard a7975b198f Bug 1227396: P8. Replace MediaByteRange with Interval<int64_t> typedef. r=cpearce
It's now okay to simplify.
2015-11-30 11:29:34 +11:00
Jean-Yves Avenard c8c275cee2 Bug 1227396: P7. Replace nsTArray<MediaByteRange> with dedicated MediaByteRangeSet object. r=cpearce 2015-11-30 11:29:34 +11:00
Jean-Yves Avenard 70f2124283 Bug 1227396: P2. Rename some MediaByteRange methods. r=cpearce
Will facilitate the replacement of MediaByteRange by Interval<int64_t>
2015-11-30 11:29:30 +11:00
Jean-Yves Avenard 835f022d65 Bug 1226931: [MSE] Restrict leeway to append window start. r=gerald.
We only allow a leeway if the append window start is set to its default value (0)
2015-11-23 09:08:26 +11:00
sajitk 582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
JW Wang 8dedbfa33d Bug 1223599 - Remove the throttling argument from AbstractMediaDecoder::NotifyDataArrived(). r=jya. 2015-11-11 17:59:16 +08: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
Jean-Yves Avenard 8dcb8265ce Bug 1220033: Fix HTMLMediaElement::seekable attribute for Mediasource. r=gerald
Interval is to start from 0 when duration is +infinity
2015-11-11 21:24:01 +11:00
JW Wang 2344481e8c Bug 1220558. Part 2 - remove unused members. r=jya. 2015-11-11 07:43:41 +08:00
JW Wang 4f2d0e76bc Bug 1220558. Part 1 - remove unused arguments from MediaDecoderReader::DispatchNotifyDataArrived() and its callees/callers. r=jya. 2015-11-11 07:43:38 +08:00
Jean-Yves Avenard 76a1ffa463 Bug 1220033: Don't use fuzz arithmetic for calculating internal buffered ranges r=gerald 2015-11-04 16:52:24 +13:00
Jean-Yves Avenard 3c3b1f1353 Bug 1213177: Enable WebM on machines where H264 HW decoding is disabled. r=kentuckyfriedtakahe 2015-10-29 10:18:59 +11:00
Jean-Yves Avenard 1796d31c83 Bug 1188887: P2. Add mochitest testing new seek behavior. r=jwwang 2015-10-28 10:45:59 +11:00
Jean-Yves Avenard 5b3264d688 Bug 1217170: [MSE] P2. Enable WebM/MSE on systems with no MP4/H264 support. r=kentuckyfriedtakahe 2015-10-27 23:57:35 +11:00
Jean-Yves Avenard d1b1c57939 Bug 1217170: P1. Rename functions to explicitly reflect what they are doing. r=kentuckyfriedtakahe 2015-10-27 23:57:13 +11:00
Jean-Yves Avenard a0f576a061 Bug 1215370: Maintain coded group continuity in sequence append mode when resetting parser state. r=gerald
W3C issue 29133.
2015-10-27 23:54:47 +11:00
JW Wang a7589ce310 Bug 1218280. Part 1 - create MediaResourceCallback for MediaResource to send notifications. r=roc. 2015-10-27 10:28:26 +08:00
Guang-De Lin 5fc8c948b4 Bug 1150305 - sourcebuffer.buffered returns the same object if not changed. r=roc, r=bz, r=jya
--HG--
extra : rebase_source : ffacfcb39b567a6cd034b081f4330d88aacb98f4
2015-10-19 14:10:47 +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 5147e1f0af Bug 1214989. Part 3 - remove MediaDecoder::Init() and its callers. r=gerald. 2015-10-15 11:39:45 +08:00
JW Wang e868f91ff6 Bug 1214989. Part 2 - add MediaDecoderOwner to Clone() and overrides. r=gerald. 2015-10-15 11:37:47 +08:00
Eric Rahm d4f1bff852 Bug 1190592 - Part 2: Add test for mediasource memory reporter. r=jya 2015-10-14 20:48:58 -07:00
Eric Rahm 88d7e6c28e Bug 1190592 - Part 1: Add mediasource memory reporter. r=jya
This adds asyncrounous reporting of MSE resources.
2015-08-20 18:10:33 -04:00
JW Wang 1cc6677a90 Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
Eric Rahm a67da92ff4 Bug 1212681 - Enable MSE mochitests on e10s. r=jya 2015-10-08 13:38:02 -07: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
Jean-Yves Avenard d36aaa89f4 Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 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
Jean-Yves Avenard 3a86e96468 Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 2015-10-07 16:40:22 +11:00
Jean-Yves Avenard 5558525f6c Bug 1211328: [MSE] Fix timestampOffset attribute calculation in sequence mode. r=gerald 2015-10-05 15:45:56 +11:00
JW Wang 46d9f98520 Bug 1209890 - add main thread assertions and remove usage of decoder monitor from MediaSourceDecoder. r=jya. 2015-09-30 06:55:21 +08:00
Jean-Yves Avenard 822bab3238 Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin.
When ffmpeg is enabled, it will use the FFmpeg's VPX decoder. FFmpeg appears to always buffer 15 frames before returning one (this is the same with h264) causing the waiting event to be fired much earlier than when using libvpx
2015-10-01 19:40:21 +10:00
JW Wang 489900ad10 Bug 1208922. Part 4 - remove AbstractMediaDecoder::GetCDMProxy() and devirtualize MediaDecoder::SetCDMProxy(). r=cpearce. 2015-09-27 18:59:08 +08:00
Jean-Yves Avenard 7ae057dc90 Bug 1207946: [MSE] P3. Reset cached demuxing index when new data overwrite the end. r=gerald
This will force an iterative search upon the next demux request.
2015-09-29 12:31:33 +10:00
Jean-Yves Avenard 488a0d19d9 Bug 1207946: [MSE] P2. Fix seek when target isn't found exactly in a buffered range. r=gerald 2015-09-29 12:31:32 +10:00
Jean-Yves Avenard 9cd4267bfc Bug 1207946: [MSE] P1. Ensure we stop on the closest keyframe when seeking. r=gerald
Should the first frame in the trackbuffer have a time superior to the seek target, mNextSampleTime would be incorrectly set to 0.
2015-09-29 12:31:32 +10:00
Jean-Yves Avenard ce6cdc5ce3 Bug 1205470: [MSE] Remove assertion. r=cpearce
Can also remove mInitDone member as that information is redundant with the init promise being present
2015-09-22 08:21:04 +10:00
Jean-Yves Avenard 43f2be19a3 Bug 1204757: [MSE] P2. Remove use of MediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=cpearce 2015-09-16 18:14:18 +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 33e5945370 Bug 1204407: P2. Remove no longer required MediaDataDemuxer APIs. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard 71c5c9a7bf Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce 2015-09-16 18:14:12 +10:00