Commit Graph

125 Commits

Author SHA1 Message Date
Gerald Squelart
003bd0368c 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
Bryce Seager van Dyk
e791c9fb99 Bug 1673007 - Add markers and logs for when we Init the WMFDecoderModule. r=alwu
We aggressively log and mark here to help diagnose hard to nail down problems
with hardware decoding.

Differential Revision: https://phabricator.services.mozilla.com/D94619
2020-11-09 19:39:31 +00:00
Jean-Yves Avenard
1c76126262 Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Matt Woodrow
b4541e6213 Bug 1674878 - Expose more detailed WR backend information to TextureFactoryIdentifier. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95588
2020-11-03 18:24:43 +00:00
Narcis Beleuzu
b795c15ce7 Backed out 3 changesets (bug 1673007) for MinGW bustages on WMFDecoderModule.cpp
Backed out changeset 707208ad26de (bug 1673007)
Backed out changeset 3e4e0172f644 (bug 1673007)
Backed out changeset 31531b427014 (bug 1673007)
2020-11-02 19:40:50 +02:00
Bryce Seager van Dyk
75ffef0428 Bug 1673007 - Add markers and logs for when we Init the WMFDecoderModule. r=alwu
We aggressively log and mark here to help diagnose hard to nail down problems
with hardware decoding.

Differential Revision: https://phabricator.services.mozilla.com/D94619
2020-10-30 16:19:16 +00:00
Jean-Yves Avenard
a883439c90 Bug 1595994 - P1E. Don't use libvpx in the RDD process if video contains an alpha plane. r=mattwoodrow
Until bug 1668840 is fixed, we can't allocate a SharedRGBImage without a PImageBridge

Depends on D92233

Differential Revision: https://phabricator.services.mozilla.com/D92342
2020-10-20 23:30:18 +00:00
Dan Glastonbury
cf9599f128 Bug 1595994 - PD: Allow WMF decoding inside RDD process. r=mattwoodrow
This assumes that access to Windows WMF and DirectX is allowed from RDD process.

Depends on D91699

Differential Revision: https://phabricator.services.mozilla.com/D54883
2020-10-20 23:26:52 +00:00
Dan Glastonbury
36dda8e8c4 Bug 1595994 - PA: Delete GPUDecoderModule wrapper. r=mattwoodrow
Moved support logic into WMFDecoderModule.

Depends on D54882

Differential Revision: https://phabricator.services.mozilla.com/D54881
2020-10-20 23:26:38 +00:00
Jean-Yves Avenard
70aa461e82 Bug 1595994 - P6: Change Supports to take SupportDecoderParams. r=kamidphish
This is a subset of the parameters passed via CreateDecoderParams and is so
Supports() calls have access to KnowsCompositor and Options when determining
if decoding is supported.

Depends on D54877

Differential Revision: https://phabricator.services.mozilla.com/D54878
2020-10-20 23:26:25 +00:00
Dan Glastonbury
b7668a9202 Bug 1595994 - P3: Only create PDMs that are supported in the current process. r=kamidphish
Depends on D52797

Differential Revision: https://phabricator.services.mozilla.com/D54876
2020-10-20 23:24:27 +00:00
Bryce Seager van Dyk
649c4c6637 Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-19 14:41:11 +00:00
Dorel Luca
a0a7aaa00a Backed out changeset b64cb312c05b (bug 1671477) for Build bustage on Android. CLOSED TREE 2020-10-19 19:23:29 +03:00
Bryce Seager van Dyk
f00338bdaa Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-19 14:41:11 +00:00
Dorel Luca
3a146a008e Backed out changeset ebe668f9d3dd (bug 1671477) for Build bustages. CLOSED TREE 2020-10-16 23:33:54 +03:00
Bryce Seager van Dyk
f0b1100952 Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-16 19:28:36 +00:00
Paul Adenot
cfd4eb0836 Bug 1668824 - On macOS and Windows, prefer ffmpeg to decode mp3s. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92235
2020-10-05 07:46:32 +00:00
Csoregi Natalia
6fbc7c27d7 Backed out changeset 2834ef721441 (bug 1668824) for build bustages on AppleDecoderModule.cpp. CLOSED TREE 2020-10-02 20:25:45 +03:00
Paul Adenot
7f8b0618d9 Bug 1668824 - On macOS and Windows, prefer ffmpeg to decode mp3s. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92235
2020-10-02 14:23:56 +00:00
Jean-Yves Avenard
f2fa2a4823 Bug 1650696 - P4. Remove the expectation for a MediaDataDecoder to work on a specified TaskQueue. r=jolin
It will now be up to the caller to determine where the decoder is going to run. This allows to simplify the audio decoders so that they can run synchronously and be wrapped in a Wasm sandbox (which doesn't support multi-threading)

The structure guarantees that all MediaDataDecoder methods are called on the same thread it's been initialised.

To achieve this, wherever a MediaDataDecoder was created, we wrap it in a MediaDataDecoderProxy that ensures that all methods are running on the given thread.

We keep the behaviour of all methods in all MediaDataDecoder to assert that they are running on the expected thread for diagnostic purposes. It could go in the future.

Video decoders that could block excessingly the thread on which they are called are made to run on their own task queue.
The Apple decoder is mostly entirely asynchronous, with the exception of the drain method which could block.
We exclude the android and omx decoders are the framework they use is 100% asynchronous and already operate on another thread.

Differential Revision: https://phabricator.services.mozilla.com/D86929
2020-08-17 23:52:21 +00:00
Eric Rahm
602f9664a9 Bug 1322095 - Part 2: Remove nsAutoPtr from dom/media. r=jya
This converts `nsAutoPtr` usage in dom/media to `UniquePtr`. Beyond just a
search and replace we also needed to update assignment and access of the
`UniquePtr`s. This falls into a few categories:
  - Assignment from a newly constructed object switches to `MakeUnique`
  - Assignment from a raw ptr switches to `UniquePtr::reset`
  - Handing out a raw ptr now requires `UniquePtr::get`
  - Uses `UniquePtr::release` rather than `nsAutoPtr::forget`
  - A few spots are updated to return a `UniquePtr` rather than a raw ptr

Differential Revision: https://phabricator.services.mozilla.com/D60084
2020-02-21 22:44:00 +00:00
Gabriele Svelto
eb403b8785 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442
2019-12-06 09:24:56 +00:00
Dorel Luca
67889e1013 Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
dc6fa2e86c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442
2019-12-04 15:01:19 +00:00
Nicholas Nethercote
c4aacd8403 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138
2019-07-26 01:10:23 +00:00
Nicholas Nethercote
462059ba06 Bug 1567329 - Append _AtStartup to once static pref getters. r=erahm
Currently it's completely unclear at use sites that the getters for `once`
static prefs return the pref value from startup, rather than the current pref
value. (Bugs have been caused by this.) This commit improves things by changing
the getter name to make it clear that the pref value obtained is from startup.

This required changing things within libpref so it distinguishes between the
"base id" (`foo_bar`) and the "full id" (`foo_bar` or
`foo_bar_DoNotUseDirectly` or `foo_bar_AtStartup` or
`foo_bar_AtStartup_DoNotUseDirectly`; the name used depends on the `mirror` and
`do_not_use_directly` values in the YAML definition.) The "full id" is used in
most places, while the "base id" is used for the `GetPrefName_*` and
`GetPrefDefault_*` functions.

(This is a nice demonstration of the benefits of the YAML file, BTW. Making
this change with the old code would have involved adding an entry to every
single pref in StaticPrefList.h.)

The patch also rejigs the comment at the top of StaticPrefList.yaml, to clarify
some things.

Differential Revision: https://phabricator.services.mozilla.com/D38604
2019-07-22 02:10:14 +00:00
Nicholas Nethercote
8069550dc0 Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

Differential Revision: https://phabricator.services.mozilla.com/D36396
2019-06-28 14:09:05 +10:00
Jean-Yves Avenard
78876bce84 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259
2019-05-26 14:30:14 +00:00
Gurzau Raul
938877e121 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard
39ec5f8bd1 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259
2019-05-24 11:32:54 +00:00
Gurzau Raul
8d7b43d90a Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard
f2a1e58ceb Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259
2019-05-22 22:27:37 +00:00
Jean-Yves Avenard
3ee5eb33fd Bug 1548795 - P1. Don't use StaticPrefs in GPU process. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29984
2019-05-09 23:12:12 +00:00
Jean-Yves Avenard
e4617e698a Bug 1521370 - Add crash guard around VPX decoder creation. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21477
2019-03-13 02:36:08 +00:00
Ryan Hunt
ad7b7dbb30 Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106
2019-02-25 16:05:29 -06:00
Jean-Yves Avenard
535ccbafea Bug 1528652 - Don't use WMF for decoding VP9 with alpha content. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D20957
2019-02-25 01:17:31 +00:00
Gabriele Svelto
7e234e998c Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240
2018-11-28 17:25:23 +00:00
Sylvestre Ledru
ffcff1a73a Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard
35417b50af Bug 1496529 - P9. Enable low latency decoding on Windows. r=bryce
Depends on D7908

Differential Revision: https://phabricator.services.mozilla.com/D7909
2018-10-09 16:59:32 +00:00
Jean-Yves Avenard
114a5f8829 Bug 1322234 - P1. Add option to disable hardware decoding. r=bryce
For know will only be used with Windows WMF decoders.

Differential Revision: https://phabricator.services.mozilla.com/D7615
2018-10-04 09:42:56 +00:00
Jean-Yves Avenard
453820b3cc Bug 1493198 - P2. Use enum for describing color depth. r=mattwoodrow
Depends on D6662

Differential Revision: https://phabricator.services.mozilla.com/D6663
2018-09-25 20:44:55 +00:00
Jean-Yves Avenard
ec67dea72e Bug 1409664 - P12. Don't attempt to play non-supported AAC sampling rate. r=padenot
Summary:
We know those sampling rate aren't supported and cause initialization errors later.

Depends on D1624

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1625
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
4ac90139a5 Bug 1470754 - Remove AMD VP9 MFT support r=bryce
Not even AMD supports it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D1793
2018-06-25 17:49:48 +00:00
Nicholas Nethercote
e585e8ddb3 Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY
2018-03-20 09:48:56 +11:00
Nicholas Nethercote
8c3b240d24 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index
2017-11-13 17:16:06 +11:00
James Cheng
2eebf3d7e5 Bug 1407919 - Part7 - Check bit depth in PDM::Supports. r=gerald,jya
MozReview-Commit-ID: ATW9sZeDCTu
2017-10-17 01:04:37 +08:00
Jean-Yves Avenard
c3708988e0 Bug 1403622 - Allow VP8 HW decoder where known not to crash. r=cpearce
Windows 10 Falls Creator Update build 16287 is known to have the fix to the problem that made bug 1403063 necessary.

MozReview-Commit-ID: 5m3ZWMes1yl
2017-10-09 10:43:54 +02:00
Jean-Yves Avenard
d32949611d Bug 1403063 - Disable VP8 HW decoder on Windows. r=gerald
MozReview-Commit-ID: KJLfSFYyTWu
2017-09-26 08:08:12 +02:00
Jean-Yves Avenard
aa45f8a845 Bug 1397307 - P8. Pass averaged video frame rate to constructor. r=mattwoodrow
MozReview-Commit-ID: FMFz3RdFsHA
2017-09-12 17:55:03 +02:00
Alastor Wu
7273ec7525 Bug 1397141 - part2 : move resolution constraints to WMFVideoMFTManager r=jya
WMFDecoderModule should only focus on whether the mime type is supported or not.
Let WMFVideoMFTManager do the checking.

MozReview-Commit-ID: K6jPfrntu7s
2017-09-13 15:05:37 +08:00