Commit Graph

770 Commits

Author SHA1 Message Date
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