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

633 Коммитов

Автор SHA1 Сообщение Дата
Randell Jesup 39e3372695 Bug 1207753 - netwerk/dns thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130580
2022-05-12 21:55:01 +00:00
alwu 565f1630ee Bug 1756260 - part4 : set the media engine Id to the format reader, which would be used to find correct remote decoders. r=jolin
In this patch, we assign the Media Engine Id to the format reader, and append that Id into CreateDecoderParams when we want to create a decoder.

That Id would be used as a hint in order to find a correct decoder to send the data to the remote media engine in following patches.

Depends on D139204

Differential Revision: https://phabricator.services.mozilla.com/D140153
2022-05-11 17:46:13 +00:00
Cristian Tuns df3db4d641 Backed out 10 changesets (bug 1756260) for causing build bustages on ExternalEngineStateMachine.obj CLOSED TREE
Backed out changeset d2339ec8194e (bug 1756260)
Backed out changeset 391201cf338b (bug 1756260)
Backed out changeset 1a9aa3f175d0 (bug 1756260)
Backed out changeset d624c80ba67f (bug 1756260)
Backed out changeset 46e8a8457044 (bug 1756260)
Backed out changeset 93245b0e2118 (bug 1756260)
Backed out changeset b69ee552b64e (bug 1756260)
Backed out changeset 9fc71b8478d5 (bug 1756260)
Backed out changeset 34b10d427f0f (bug 1756260)
Backed out changeset ed9640359f3a (bug 1756260)
2022-05-10 23:32:51 -04:00
alwu 0d3dd9fe36 Bug 1756260 - part4 : set the media engine Id to the format reader, which would be used to find correct remote decoders. r=jolin
In this patch, we assign the Media Engine Id to the format reader, and append that Id into CreateDecoderParams when we want to create a decoder.

That Id would be used as a hint in order to find a correct decoder to send the data to the remote media engine in following patches.

Depends on D139204

Differential Revision: https://phabricator.services.mozilla.com/D140153
2022-05-11 02:57:18 +00:00
Alexandre Lissy c9368d48f0 Bug 1762067 - Distinguish crash in RDD vs Utility r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145345
2022-05-05 18:02:13 +00:00
Nika Layzell 052cba0853 Bug 1738106 - Part 3: Switch to TaskQueue::Create, r=xpcom-reviewers,necko-reviewers,media-playback-reviewers,dragana,alwu,barret
In future parts, TaskQueue will require extra initialization to be performed
which cannot happen in a constructor, as it takes references to the TaskQueue
object itself, which will require the introduction of a helper method. This
patch switches all callers of the TaskQueue constructor to use the new method.

Differential Revision: https://phabricator.services.mozilla.com/D142604
2022-05-02 20:37:34 +00:00
Paul Adenot 0d178f9ace Bug 1764301 - audioRate shouldn't be divided by 1000 in MediaFormatReader::GetDebugInfo. r=azebrowski DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D143500
2022-04-12 16:33:32 +00:00
Jeff Muizelaar 61ba297af3 Bug 1762607 - Add a profiler marker for SkipVideoDemuxToNextKeyFrame r=alwu
This is closer to the place where we decide to actually
skip decoding. Eventually, we can flesh this marker out
with information about the decision to skip as needed.

Differential Revision: https://phabricator.services.mozilla.com/D142698
2022-04-05 01:52:54 +00:00
stransky bed3c534f4 Bug 1761217 Log track type in MediaFormatReader r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D142537
2022-04-01 07:22:55 +00:00
stransky 215660defb Bug 1761942 [RDD] Limit maximal number of RDD process restarts r=alwu
Add media.rdd-process.max-crashes preference value to control how many times we restard RDD process before we throw decoding error message.

Differential Revision: https://phabricator.services.mozilla.com/D142326
2022-03-30 11:37:37 +00:00
Bryce Seager van Dyk ff03cc04a5 Bug 1724106 - Clarify threading usage when getting media debug info. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D124104
2022-03-29 22:17:58 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
stransky d85cda8333 Bug 1756753 Log disabled HW acceleration r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D139476
2022-02-23 21:07:40 +00:00
stransky 25eb21a40c Bug 1670817 [Linux] Disable HW decoding in case of RDD/GPU HW decoder crash & decoding error r=alwu
- If decoding fails on Linux (with NS_ERROR_DOM_MEDIA_DECODE_ERR), give it another try without HW decoder.
- If RDD/GPU process crashed on Linux, give it another try without HW decoder.

Differential Revision: https://phabricator.services.mozilla.com/D138271
2022-02-17 10:32:01 +00:00
alwu 02203173dc Bug 1741286 - add a probe to record hw-decoding support for videos in hd or higher resolution. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D131992
2021-12-14 22:43:31 +00:00
alwu 2c7a5e9c88 Bug 1733722 - part1 : add telemetry probe to record if video codec can use hardware decoding. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D127339
2021-10-07 21:33:58 +00:00
alwu ae857daa8e Bug 1734327 - only use AOMDecoder when MOZ_AV1 is defined. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D127692
2021-10-06 18:49:58 +00:00
alwu 929314f612 Bug 1730020 - part2 : add profiler markers to show additional information. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D126148
2021-10-04 22:30:10 +00:00
alwu ef02e7ebc4 Bug 1730020 - part1 : implement a new class to record the time which each stage of media pinepline spends on. r=bryce,padenot
Differential Revision: https://phabricator.services.mozilla.com/D125140
2021-10-04 22:30:09 +00:00
Butkovits Atila 80c02069eb Backed out 4 changesets (bug 1730020) for causing build bustages. CLOSED TREE
Backed out changeset 580203e4b76a (bug 1730020)
Backed out changeset b57ce3e0f39f (bug 1730020)
Backed out changeset 085fb78aac06 (bug 1730020)
Backed out changeset 8799f103c043 (bug 1730020)
2021-10-04 21:33:41 +03:00
alwu 5acf83da7a Bug 1730020 - part2 : add profiler markers to show additional information. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D126148
2021-10-04 17:34:51 +00:00
alwu 16acb5147b Bug 1730020 - part1 : implement a new class to record the time which each stage of media pinepline spends on. r=bryce,padenot
Differential Revision: https://phabricator.services.mozilla.com/D125140
2021-10-04 17:34:50 +00:00
Alexandru Michis bd2de15f47 Backed out 2 changesets (bug 1724106) for causing Bug 1728715.
CLOSED TREE

Backed out changeset 81d1db229eea (bug 1724106)
Backed out changeset 8ed4675541c6 (bug 1724106)
2021-09-02 21:03:07 +03:00
Bryce Seager van Dyk cfec4e7dfa Bug 1724106 - Clarify threading usage when getting media debug info. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D124104
2021-09-01 22:29:48 +00:00
alwu c58e38d420 Bug 1716474 - remove the assertion for checking whether `aTimeThreshold` is zero or positive. r=bryce
Reader proxy will adjust the time threshold [1] based on the media's start time that is retrieved from metadata, which is possible to be negative. Eg. [2]

Therefore, we should remove that assetion.

[1] https://searchfox.org/mozilla-central/rev/308ea44d0d60b391b031ccee695920bd543f7d2f/dom/media/ReaderProxy.cpp#75-77

[2] https://searchfox.org/mozilla-central/rev/308ea44d0d60b391b031ccee695920bd543f7d2f/dom/media/autoplay/test/mochitest/AutoplayTestUtils.js#7

Differential Revision: https://phabricator.services.mozilla.com/D118403
2021-06-23 20:31:13 +00:00
alwu d84fa5b7ab Bug 1717119 - part1 : improve the readability of the check. r=bryce
Improve the readability of the check and remove the next key frame check for the internal seek target because it's not related.

Differential Revision: https://phabricator.services.mozilla.com/D118401
2021-06-23 20:31:12 +00:00
alwu a342363d48 Bug 1692881 - part1 : let MDSM detect whether the video decoding is too slow and force to request the next key frame. r=bryce
If the decoded video MDSM received is already late, then it indicates that video decoding is too slow.

If we keep decoding but in the same speed, it's very likely all following decoded videos would still be behind the clock and need to be discarded.

The reader has its own mechanism to seek to the next keyframe, but that will only happen when the time of next keyframe is behind the given time threshold, which is the current time.

When the video has pretty long keyframe interval (eg. 5s), then that mechanism won't be triggered because the even if the decoded video frames are late, the next keyframe still far exceeds the current time, so the reader doesn't think it's necessary to skip.

Therefore, MDSM should force the reader to seek to the next keyframe directly, because it know both the decoded time of video frames and the current playback time.

Differential Revision: https://phabricator.services.mozilla.com/D117242
2021-06-14 22:31:50 +00:00
Simon Giesecke dd0cb7b321 Bug 708901 - Migrate to nsTHashSet in dom/media. r=padenot
Depends on D109320

Differential Revision: https://phabricator.services.mozilla.com/D109321
2021-03-23 10:36:38 +00:00
alwu a9da536a9a Bug 1695358 - remove unused DecoderDoctorDiagnostics parameter for 'PDMFactory::SupportsMimeType().' r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D106675
2021-03-02 19:22:15 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
alwu e7acf58183 Bug 1688775 - report the decoding error according to different mime type. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D103407
2021-01-29 21:11:23 +00:00
alwu 16169cdedb Bug 1688748 - Remove unused variable `mPlatform` and `mEncryptedPlatform` from MFR. r=bryce
no one actually sets these two variables, so they are basically dead variables.

Differential Revision: https://phabricator.services.mozilla.com/D102979
2021-01-26 19:41:46 +00:00
Gerald Squelart cc0abcfaee Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-18 21:54:13 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Gerald Squelart 786dd07114 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 22:23:38 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart 7e40dbb3c5 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 11:38:06 +00:00
Jean-Yves Avenard 4f8f4ad16b Bug 1672072 - P13. Always shut down decoder after creation. r=mattwoodrow,bryce,padenot
We also ensure that the MediaFormatReader will only shutdown once the CreateDecoderPromise has been resolved (or rejected)

This makes a few of the earlier changes redundant; as we can now guarantee all the objects provided to the PDMFactory will stay valid for the entire lifetime of the decoder. So we could do away with P4 and P7.

It's better that we keep those however, as it greatly simplify other usage of the PDMFactory. Ensuring that the user of the PDMFactory survives any decoder isn't a trivial affair.

Differential Revision: https://phabricator.services.mozilla.com/D96369
2020-11-13 04:21:17 +00:00
Jean-Yves Avenard 6fcaf876b9 Bug 1672072 - P11. Make MediaFormatReader support ThreadSafeWeakPtr. r=mattwoodrow,bryce,padenot
P4 introduced a cycle between the MediaFormatReader and the onWaitingForKeyEvent lambda.
Normally, this cycle would be broken by a call to Shutdown.

However, should the MediaFormatReader shuts down before the CreateDecoderPromise be resolved, it would have no way of shutting down the decoder keeping the cycle alive.

Theoretically, keeping a plain pointer to the MFR::mOnTrackWaitingForKey like we did before P4 is safe, as the EME code making use of it, only does so while we are decoding data and the MFR has the ability to properly shutdown the decoder.

However, for the sake of clarity and simplification, we introduce an easier way to check of the MFR has been deleted already by making it support SafeThreadWeakPtr; and the OnWaitingForKey keep a weak pointer to it and checking the value before calling it.

Differential Revision: https://phabricator.services.mozilla.com/D96367
2020-11-13 04:21:16 +00:00
Jean-Yves Avenard 6d2df84e41 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-13 07:46:44 +00:00
Jean-Yves Avenard 4f53e8e651 Bug 1672072 - P4. Pass lambda rather than raw pointer to object. r=mattwoodrow,bryce,padenot
Passing a pointer to an object across several thread was dubious at best to ensure a use after free was never in place.
This complexity becomes even greater should we want to create the decoder asynchronously.

So we pass instead a lambda that holds a strong reference to the object that holds the event producer.

Differential Revision: https://phabricator.services.mozilla.com/D96360
2020-11-13 04:21:14 +00:00
Bogdan Tara 266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard 86118b9f7a Bug 1672072 - P13. Always shut down decoder after creation. r=mattwoodrow,bryce,padenot
We also ensure that the MediaFormatReader will only shutdown once the CreateDecoderPromise has been resolved (or rejected)

This makes a few of the earlier changes redundant; as we can now guarantee all the objects provided to the PDMFactory will stay valid for the entire lifetime of the decoder. So we could do away with P4 and P7.

It's better that we keep those however, as it greatly simplify other usage of the PDMFactory. Ensuring that the user of the PDMFactory survives any decoder isn't a trivial affair.

Differential Revision: https://phabricator.services.mozilla.com/D96369
2020-11-12 22:54:22 +00:00
Jean-Yves Avenard 9566906e14 Bug 1672072 - P11. Make MediaFormatReader support ThreadSafeWeakPtr. r=mattwoodrow,bryce,padenot
P4 introduced a cycle between the MediaFormatReader and the onWaitingForKeyEvent lambda.
Normally, this cycle would be broken by a call to Shutdown.

However, should the MediaFormatReader shuts down before the CreateDecoderPromise be resolved, it would have no way of shutting down the decoder keeping the cycle alive.

Theoretically, keeping a plain pointer to the MFR::mOnTrackWaitingForKey like we did before P4 is safe, as the EME code making use of it, only does so while we are decoding data and the MFR has the ability to properly shutdown the decoder.

However, for the sake of clarity and simplification, we introduce an easier way to check of the MFR has been deleted already by making it support SafeThreadWeakPtr; and the OnWaitingForKey keep a weak pointer to it and checking the value before calling it.

Differential Revision: https://phabricator.services.mozilla.com/D96367
2020-11-12 22:54:07 +00:00