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

89 Коммитов

Автор SHA1 Сообщение Дата
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
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 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 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
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
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 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 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 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 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
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 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 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
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
Carsten "Tomcat" Book dc41ea5c25 Backed out changeset a9ccf315f1f2 (bug 1245463) 2016-02-10 11:20:16 +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 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 76a1ffa463 Bug 1220033: Don't use fuzz arithmetic for calculating internal buffered ranges r=gerald 2015-11-04 16:52:24 +13:00