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

21120 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 8e14b4cc53 Bug 1743834 - Split initialization and start in AudioSinkWrapper. r=alwu
No change in functionality, this is to prepare for the next patch that will do
the initialization asynchronously because it's expensing and blocking.

Differential Revision: https://phabricator.services.mozilla.com/D144999
2022-05-24 13:09:09 +00:00
Paul Adenot 2efd70ad47 Bug 1765554 - Relax clock monotonicity assertion on Windows, for investigation. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144195
2022-05-24 13:09:09 +00:00
Paul Adenot dab92f728e Bug 1743834 - Assert the media clock monotonicity with MOZ_ASSERT. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D143823
2022-05-24 13:09:08 +00:00
Paul Adenot 1f44d7e428 Bug 1743834 - When no packet are in the queue when shutting down the AudioStream, try our best to provide timing data. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141992
2022-05-24 13:09:08 +00:00
Paul Adenot 0eebe8ba74 Bug 1743834 - Fix static-analysis warning. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141991
2022-05-24 13:09:08 +00:00
Paul Adenot 880373650f Bug 1743834 - Don't start with an AudioSink if muted from the start. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141990
2022-05-24 13:09:07 +00:00
Paul Adenot f390de1f06 Bug 1743834 - Correctly set the start time when the audio callbacks actually are called, the first time audio audio clock starts to be in use. r=alwu,media-playback-reviewers
The base clock for the new audio stream is precisely the time when the clock
source changes from the system clock to the audio clock, accounting for the time
it takes to actually starts the stream. This allows avoiding discontinuities
when switching clocks.

Differential Revision: https://phabricator.services.mozilla.com/D136237
2022-05-24 13:09:07 +00:00
Paul Adenot a6e5c1f4ff Bug 1743834 - Detect when switching clock provider in AudioSinkWrapper. r=alwu,media-playback-reviewers
This will allow detecting the first time the AudioSinkWrapper starts using the
clock from an audio stream after having been muted (=using the system clock) for
some time, to correct the timing.

Differential Revision: https://phabricator.services.mozilla.com/D136236
2022-05-24 13:09:06 +00:00
Paul Adenot f048891e77 Bug 1743834 - Wait for the audio callbacks to start being called before using the audio clock. r=alwu,media-playback-reviewers
Because we're generally using high latency on the cubeb stream used by
AudioStream instance, it can take some time for the callbacks to start being
called, and the for the audio clock (cubeb_stream_get_position(...)) to advance.

This waits for the first callback to be called before using the clock of the
audio stream, and the system clock keeps being in use until then.

Differential Revision: https://phabricator.services.mozilla.com/D136235
2022-05-24 13:09:06 +00:00
Paul Adenot 024b4fe28b Bug 1743834 - Shut down the AudioSink when audio is muted. r=alwu,media-playback-reviewers
This does the following:
- When the media is muted, shut down and release the AudioSink ;
- While the media is muted, use the system clock to make video advance ;
- Each time the clock is queried, check if some audio packets should be
discarded because they are in the past, compared to the media time ;
- While muted, if the audio finished, resolve the EndedPromise ;
- When the media is un-muted, a new AudioSink is created, and its clock starts
to be in use.

This works well and A/V sync is correct, but a micro-stuttering is perceptible
on the video when looking carefully, because of the time it takes to open the
audio stream. This is fixed in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D136234
2022-05-24 13:09:06 +00:00
Paul Adenot 017bb613c7 Bug 1743834 - Create and manage the lifetime of the AudioStream EndedPromise in AudioSinkWrapper. r=alwu,media-playback-reviewers
We're going to shutdown the AudioStream in a subsequent patch, when audio is
muted. This will allow resolving it at the right time when the media ends while
muted.

This also extracts a method to start an AudioSink, because it's going to be
started in multiple locations in a future patch.

Differential Revision: https://phabricator.services.mozilla.com/D136233
2022-05-24 13:09:05 +00:00
Paul Adenot 5ac8c5f580 Bug 1743834 - Add a logging module for AudioSink. r=alwu,media-playback-reviewers
Depends on D133642

Differential Revision: https://phabricator.services.mozilla.com/D133643
2022-05-24 13:09:05 +00:00
Paul Adenot 8b1e4a744d Bug 1743834 - Make GetClock() non-const on MediaSink, and allow the AudioSink to modify the AudioQueue. r=alwu,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133642
2022-05-24 13:09:04 +00:00
Mark Banner 5364458f47 Bug 1770727 - Fix remaining ESLint rules for sjs files. r=Gijs,necko-reviewers,kershaw
Depends on D147082

Differential Revision: https://phabricator.services.mozilla.com/D147083
2022-05-24 12:59:10 +00:00
Mark Banner 18b014551e Bug 1770727 - Fix failures of ESLint rule mozilla/use-includes-instead-of-indexOf in sjs files. r=Gijs
Depends on D147081

Differential Revision: https://phabricator.services.mozilla.com/D147082
2022-05-24 12:59:09 +00:00
Mark Banner dac6401c3b Bug 1770727 - Fix ESLint rule mozilla/use-services on sjs files and expose Services to sjs files. r=Gijs
Depends on D147080

Differential Revision: https://phabricator.services.mozilla.com/D147081
2022-05-24 12:59:09 +00:00
Mark Banner ef5633d319 Bug 1770727 - Fix some more ESLint rules on sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D147080
2022-05-24 12:59:08 +00:00
Paul Adenot 9154798471 Bug 1767549 - Move a particular crashtest that requires a working audio stack at the beginning of the test suite. r=karlt
Some of the tests in the webrtc and playback crash tests open/close lots of
stream at once, frequently putting the system audio stack in error, and no new
streams can be opened.

This patch moves a particular test that requires a working audio stack at the
beginning of the suite to make it pass consistently.

Differential Revision: https://phabricator.services.mozilla.com/D147093
2022-05-24 11:41:08 +00:00
Paul Adenot d558cd8795 Bug 1767549 - Ensure that AudioContext state transition happen at the right time w.r.t. cubeb stream initialization time. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D146713
2022-05-24 11:41:07 +00:00
Paul Adenot a8d47185e0 Bug 1767549 - Allow delaying the start of a cubeb stream for test purposes. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D146712
2022-05-24 11:41:07 +00:00
Paul Adenot 126921cf95 Bug 1767549 - Fix test_currentTime.html to wait for the initial "suspended" -> "running" transition. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D147086
2022-05-24 11:41:06 +00:00
Paul Adenot 210c49a96c Bug 1767549 - Don't (re)start an AudioContext when still on a FallbackDriver. r=karlt
Original idea by :karlt.

Differential Revision: https://phabricator.services.mozilla.com/D147085
2022-05-24 11:41:06 +00:00
Cosmin Sabou bf621169ff Backed out changeset df0ce31b1c48 (bug 1770691) for linux toolchain bustage on FFmpegVideoDecoder.cpp. 2022-05-24 14:40:49 +03:00
stransky 8775616bc9 Bug 1770691 [FFMPEG] Print/log error codes better r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D147056
2022-05-24 09:37:35 +00:00
Bogdan Szekely 0f9ad660dd Backed out 4 changesets (bug 1767549) for causing mda failures on test_slowStart.html
Backed out changeset 859a07722632 (bug 1767549)
Backed out changeset 46187304029d (bug 1767549)
Backed out changeset 8aa67afb67c4 (bug 1767549)
Backed out changeset 75326cb6e15e (bug 1767549)
2022-05-24 12:47:50 +03:00
Paul Adenot 3a97cb073e Bug 1767549 - Move a particular crashtest that requires a working audio stack at the beginning of the test suite. r=karlt
Some of the tests in the webrtc and playback crash tests open/close lots of
stream at once, frequently putting the system audio stack in error, and no new
streams can be opened.

This patch moves a particular test that requires a working audio stack at the
beginning of the suite to make it pass consistently.

Differential Revision: https://phabricator.services.mozilla.com/D147093
2022-05-24 08:52:14 +00:00
Paul Adenot 376ac34fe5 Bug 1767549 - Ensure that AudioContext state transition happen at the right time w.r.t. cubeb stream initialization time. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D146713
2022-05-24 08:52:13 +00:00
Paul Adenot 3f95ffa19f Bug 1767549 - Allow delaying the start of a cubeb stream for test purposes. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D146712
2022-05-24 08:52:13 +00:00
Paul Adenot 5f88cd32c1 Bug 1767549 - Fix test_currentTime.html to wait for the initial "suspended" -> "running" transition. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D147086
2022-05-24 08:52:12 +00:00
Paul Adenot fe3de99635 Bug 1770073 - Add a crashtest for an ADTS file. r=kinetik
Media file generated with:

> cd dom/media/test/crashtests/
> ffmpeg -i test.mp4 -c:v none test.aac

Differential Revision: https://phabricator.services.mozilla.com/D146807
2022-05-23 11:59:44 +00:00
Paul Adenot 02b7d6a058 Bug 1770073 - Allow AudioCodecSpecificBinaryBlob in WMF and ffmpeg decoders, for AAC. r=kinetik,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D146806
2022-05-23 11:59:44 +00:00
Alexandre Lissy fa426f0db4 Bug 1769033 - Dont use major version for libavcodec on OpenBSD r=gaston,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D146444
2022-05-20 08:25:03 +00:00
stransky 96eb6af142 Bug 1767568 Test AV1 decode from mp4 container only if ffvpx is used for video decode, r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D146415
2022-05-20 07:12:38 +00:00
sotaro 4f8549101c Bug 1766282 - Do not use SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy r=jgilbert,jrmuizel,gfx-reviewers
With CI's NVIDIA GPU, SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy caused rendering problem. When SharedHandle is not used, the rendering problem did not happen. But when video is rendered to WebGL texture, SharedHandle need to be used.
In this case, D3D11TextureIMFSampleImage copies original ID3D11Texture2D to a new ID3D11Texture2D and use a shared handled of the copied texture. And no video copy of future video frames are disabled.

NoCopyNV12Texture is renamed to ZeroCopyNV12Texture to clarify its meaning.

Differential Revision: https://phabricator.services.mozilla.com/D144598
2022-05-20 04:37:53 +00:00
Marian-Vasile Laza dfc5ffc7fa Backed out changeset 9bd60f359de2 (bug 1767899) for causing build bustages on EventTargetCapability.h. 2022-05-20 04:58:00 +03:00
Bryce Seager van Dyk 97a8f6862e Bug 1767899 - Guard some members that expect to be accessed on event target in TrackBuffersManager. r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D145529
2022-05-20 01:27:07 +00:00
Alexandre Lissy edeb9a2237 Bug 1770086 - Cleanup static on shutdown r=alwu
Depends on D146567

Differential Revision: https://phabricator.services.mozilla.com/D146848
2022-05-19 23:50:59 +00:00
Joel Maher 4645118c87 Bug 1392106 - remove obsolete reftest win7 conditions. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D146633
2022-05-19 12:27:29 +00:00
Mark Banner 7c198e01fd Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-18 08:13:19 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Bryce Seager van Dyk 3df14aa79d Bug 1747760 - P10: Remove AudioInfo.mExtraData. r=kinetik
This is no longer needed as the codec specific data member covers all codec
specific data.

Differential Revision: https://phabricator.services.mozilla.com/D145523
2022-05-17 23:09:08 +00:00
Bryce Seager van Dyk 45ccca4aaf Bug 1747760 - P9: Handle Vorbis data with Vorbis codec specific variant. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D145522
2022-05-17 23:09:08 +00:00
Bryce Seager van Dyk d9f0575073 Bug 1747760 - P8: Handle Opus data using Opus codec specific variant. r=kinetik.
This means as of this patch
- All mp4 specific audio codecs are handled. There's some more we could
  theoretically get, stuff like ALAC, but it's not clear to me we handle them
  following demuxing. I've left a catch all in the mp4 demuxing code just in
  case.
- We no longer pack the codec-delay/preskip at the head of the opus binary blob.
  This means that the binary blob is just the opus header data and the container
  specific preskip has its own member. My hope is this is clearer and easier to
  understand. It also means we can drop some of the code we had for packing the
  delay/preskip into a binary blob.

Differential Revision: https://phabricator.services.mozilla.com/D145521
2022-05-17 23:09:07 +00:00
Bryce Seager van Dyk 8f2f3c219d Bug 1747760 - P7: Handle aac codec specific data using aac codec specific variant. r=kinetik
This should be the last change needed for a number of our platform specific
decoders to be switched entirely over to the new variant types. As such, we can
move them from the lenient `ForceGetAudioCodecSpecificBlob` and to
`GetAudioCodecSpecificBlob` to enforce handling of codecs that don't use
trivially blob like codec specific data.

Differential Revision: https://phabricator.services.mozilla.com/D145520
2022-05-17 23:09:07 +00:00
Bryce Seager van Dyk a9c5796d3d Bug 1747760 - P6: Use Wave specific codec data for Wave audio. r=kinetik
We don't store Wave specific info, but this means that we have a struct in place
if we ever want to add such data + gives us more typing info for codec specific
data.

Differential Revision: https://phabricator.services.mozilla.com/D145519
2022-05-17 23:09:07 +00:00
Bryce Seager van Dyk 8ea4c13088 Bug 1747760 - P5: Handle flac codec specific data using flac codec specific variant. r=kinetik
This also populates flac codec specific data for flac in mp4, which appears to
have been overlooked.

Depends on D134730

Differential Revision: https://phabricator.services.mozilla.com/D134731
2022-05-17 23:09:06 +00:00
Bryce Seager van Dyk a56255ef1f Bug 1747760 - P4: Handle mp3 codec specific data using mp3 codec specific variant. r=kinetik
This switches the mp3 codec specific handling from using a binary blob to
instead use a typed structure.

Depends on D134729

Differential Revision: https://phabricator.services.mozilla.com/D134730
2022-05-17 23:09:06 +00:00
Bryce Seager van Dyk 60ac1098c6 Bug 1747760 - P3: Rework audio codec specific data to use new variant with a generic blob. r=kinetik
This switches existing code to use the new variant style codec specific
information for audio, but retains the binary blob style apporach everywhere.

There should be no functional changes following this refactor. Internally all
codec specific data is still stored in blobs. This allows a baseline from which
we can modify specific codecs to use more constrained versions of the variant.

Depends on D134728

Differential Revision: https://phabricator.services.mozilla.com/D134729
2022-05-17 23:09:05 +00:00
Bryce Seager van Dyk 713bc6678c Bug 1747760 - P2: Add IPC code for new codec types. r=kinetik
This updates our IPC code so we can send and receive the new types introduced in
the prior patch.

Depends on D134727

Differential Revision: https://phabricator.services.mozilla.com/D134728
2022-05-17 23:09:05 +00:00
Bryce Seager van Dyk 7c0e11d14c Bug 1747760 - P1: Add audio codec specific info variant to help give more type info for codec specific data. r=kinetik
This introduces structures that will be used to store different audio codec
specific data. The idea is that we can communicate stricter type information
with these + better document the different structures. My primary goal is to aid
in developer comprehension, and to make changes around our codec handling easier
and less opaque.

Differential Revision: https://phabricator.services.mozilla.com/D134727
2022-05-17 23:09:05 +00:00
Chun-Min Chang 0cf97957c8 Bug 1765230 - Rename test name and correct comments r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D146476
2022-05-17 23:08:04 +00:00
Chun-Min Chang c5d44ed663 Bug 1765230 - Wait for error stop before `StopAudio()` r=padenot
`TestDeviceInputTrack.ErrorCallback` has the same racing issue as the
bug 1765312's one (See D144637). We should wait for the
cubeb-stream-stop called by the forced-error's background thread before
calling `NonNativeInputTrack::StopAudio()` to avoid getting the stopped
state callback before the error callback.

Differential Revision: https://phabricator.services.mozilla.com/D146475
2022-05-17 23:08:04 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 5865f044db Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-17 16:50:33 +00:00
Mark Banner 4acbb4ff59 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
Nico Grunbaum f1908f161d Bug 1760843 - P0 - fix desktop capture frame timing;r=jib
A previous patch introduced an inner loop within the desktop capture run
loop. The PlatformUIThread always does a single execution of the run
loop before it goes into its alertable sleep -> dispatch -> repeat
cycle. We should not be looping within the desktop capture impl and
should allow the platform UI thread to repeated dispatch to the capture
impl instead. Additionally the startup code was racy with the shutdown
code. Fixing the former caused lock ups durring shutdown while startup
was still happening. Static analysis guards were added in this patch
to help reduce the fragility of this code.

Differential Revision: https://phabricator.services.mozilla.com/D141937
2022-05-17 06:06:05 +00:00
Byron Campen 2ac0551241 Bug 1768559: Do something safe in this weird corner case. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D145979
2022-05-17 00:01:26 +00:00
Molnar Sandor c8400a0b45 Backed out 2 changesets (bug 1760843) for causing wpt failures in /screen-capture/getdisplaymedia.https.html CLOSED TREE
Backed out changeset 198b1e078f7e (bug 1760843)
Backed out changeset d4b6bfda83c5 (bug 1760843)
2022-05-17 00:32:39 +03:00
Nico Grunbaum a0bb9c82df Bug 1760843 - P0 - fix desktop capture frame timing;r=jib
A previous patch introduced an inner loop within the desktop capture run
loop. The PlatformUIThread always does a single execution of the run
loop before it goes into its alertable sleep -> dispatch -> repeat
cycle. We should not be looping within the desktop capture impl and
should allow the platform UI thread to repeated dispatch to the capture
impl instead. Additionally the startup code was racy with the shutdown
code. Fixing the former caused lock ups durring shutdown while startup
was still happening. Static analysis guards were added in this patch
to help reduce the fragility of this code.

Differential Revision: https://phabricator.services.mozilla.com/D141937
2022-05-16 18:12:35 +00:00
stransky 6e9d95d04a Bug 1759784 [Linux] Pass frame size to VideoFramePool r=alwu
This is similar to Bug 1750858 but for VA-API.

Depends on D146086

Differential Revision: https://phabricator.services.mozilla.com/D146087
2022-05-14 06:48:37 +00:00
stransky 62fb18fc79 Bug 1759784 [Linux] Update VideoFramePool to pass frame size along VA-API surface decriptor r=alwu
This is similar to Bug 1750858 but for VA-API, in this patch we set cropped frame size.

Depends on D146085

Differential Revision: https://phabricator.services.mozilla.com/D146086
2022-05-14 06:48:37 +00:00
Jens Stutte 13675ac0e6 Bug 1766572: Part 1 - Remove obsolete ShutdownPhase::XPCOMShutdownLoaders. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D145082
2022-05-13 15:47:52 +00:00
Paul Adenot 3d44a8f8d1 Bug 1762620 - Add a test with a wav file that has 255 audio channels. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D143624
2022-05-13 08:35:53 +00:00
Mike Hommey a1a746f5b9 Bug 1768999 - Replace unqualified use of std::move in ChromiumCDMAdapter.cpp. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D146153
2022-05-13 00:45:24 +00:00
Dana Keeler fb67326470 Bug 1768047 - introduce HMAC C++ helper and remove nsICryptoHMAC r=jschanck,necko-reviewers,kershaw,padenot
This patch removes the redundant nsICryptoHMAC interface and implementation,
updates front-end code to use WebCrypto, and changes back-end code to use the
helper class HMAC introduced by this patch.

This also removes the last uses of nsIKeyObject and nsIKeyObjectFactory, and
thus those interfaces and implementations as well.

Differential Revision: https://phabricator.services.mozilla.com/D145656
2022-05-12 22:24:29 +00:00
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
stransky c0cb7fd820 Bug 1750388 [Linux] Switch back to SW decode if HW decode is slow r=alwu
Switch back to SW decode when frame decode time and averange decode time is bigger
than frame interval for defined number of frames.

Differential Revision: https://phabricator.services.mozilla.com/D145871
2022-05-12 12:40:14 +00:00
criss 715c6ab9a9 Backed out 10 changesets (bug 1747760) for causing wpt failures on mediasource-correct-frames-after-reappend.html. CLOSED TREE
Backed out changeset aae68dac17d0 (bug 1747760)
Backed out changeset dbb36eb962f7 (bug 1747760)
Backed out changeset 51ded936bda1 (bug 1747760)
Backed out changeset 706c89c31a6d (bug 1747760)
Backed out changeset ede5ba8832cb (bug 1747760)
Backed out changeset 4740c9cf6d51 (bug 1747760)
Backed out changeset 71e0dd7f0dad (bug 1747760)
Backed out changeset 0f6c6489a2c6 (bug 1747760)
Backed out changeset ad0284c66cb0 (bug 1747760)
Backed out changeset b0b666cba2ce (bug 1747760)
2022-05-12 01:37:32 +03:00
Bryce Seager van Dyk 6dc932b8e0 Bug 1747760 - P10: Remove AudioInfo.mExtraData. r=kinetik
This is no longer needed as the codec specific data member covers all codec
specific data.

Differential Revision: https://phabricator.services.mozilla.com/D145523
2022-05-11 19:20:05 +00:00
Bryce Seager van Dyk b1bdfce5fc Bug 1747760 - P9: Handle Vorbis data with Vorbis codec specific variant. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D145522
2022-05-11 19:20:04 +00:00
Bryce Seager van Dyk 8c1b8958f3 Bug 1747760 - P8: Handle Opus data using Opus codec specific variant. r=kinetik.
This means as of this patch
- All mp4 specific audio codecs are handled. There's some more we could
  theoretically get, stuff like ALAC, but it's not clear to me we handle them
  following demuxing. I've left a catch all in the mp4 demuxing code just in
  case.
- We no longer pack the codec-delay/preskip at the head of the opus binary blob.
  This means that the binary blob is just the opus header data and the container
  specific preskip has its own member. My hope is this is clearer and easier to
  understand. It also means we can drop some of the code we had for packing the
  delay/preskip into a binary blob.

Differential Revision: https://phabricator.services.mozilla.com/D145521
2022-05-11 19:20:04 +00:00
Bryce Seager van Dyk 2bd1dfbe36 Bug 1747760 - P7: Handle aac codec specific data using aac codec specific variant. r=kinetik
This should be the last change needed for a number of our platform specific
decoders to be switched entirely over to the new variant types. As such, we can
move them from the lenient `ForceGetAudioCodecSpecificBlob` and to
`GetAudioCodecSpecificBlob` to enforce handling of codecs that don't use
trivially blob like codec specific data.

Differential Revision: https://phabricator.services.mozilla.com/D145520
2022-05-11 19:20:04 +00:00
Bryce Seager van Dyk 59a6df4acd Bug 1747760 - P6: Use Wave specific codec data for Wave audio. r=kinetik
We don't store Wave specific info, but this means that we have a struct in place
if we ever want to add such data + gives us more typing info for codec specific
data.

Differential Revision: https://phabricator.services.mozilla.com/D145519
2022-05-11 19:20:03 +00:00
Bryce Seager van Dyk bf2f3ab323 Bug 1747760 - P5: Handle flac codec specific data using flac codec specific variant. r=kinetik
This also populates flac codec specific data for flac in mp4, which appears to
have been overlooked.

Depends on D134730

Differential Revision: https://phabricator.services.mozilla.com/D134731
2022-05-11 19:20:03 +00:00
Bryce Seager van Dyk 4fe6f9c9af Bug 1747760 - P4: Handle mp3 codec specific data using mp3 codec specific variant. r=kinetik
This switches the mp3 codec specific handling from using a binary blob to
instead use a typed structure.

Depends on D134729

Differential Revision: https://phabricator.services.mozilla.com/D134730
2022-05-11 19:20:03 +00:00
Bryce Seager van Dyk 50cd3726bf Bug 1747760 - P3: Rework audio codec specific data to use new variant with a generic blob. r=kinetik
This switches existing code to use the new variant style codec specific
information for audio, but retains the binary blob style apporach everywhere.

There should be no functional changes following this refactor. Internally all
codec specific data is still stored in blobs. This allows a baseline from which
we can modify specific codecs to use more constrained versions of the variant.

Depends on D134728

Differential Revision: https://phabricator.services.mozilla.com/D134729
2022-05-11 19:20:02 +00:00
Bryce Seager van Dyk 80991759c8 Bug 1747760 - P2: Add IPC code for new codec types. r=kinetik
This updates our IPC code so we can send and receive the new types introduced in
the prior patch.

Depends on D134727

Differential Revision: https://phabricator.services.mozilla.com/D134728
2022-05-11 19:20:02 +00:00
Bryce Seager van Dyk 967f559a4e Bug 1747760 - P1: Add audio codec specific info variant to help give more type info for codec specific data. r=kinetik
This introduces structures that will be used to store different audio codec
specific data. The idea is that we can communicate stricter type information
with these + better document the different structures. My primary goal is to aid
in developer comprehension, and to make changes around our codec handling easier
and less opaque.

Differential Revision: https://phabricator.services.mozilla.com/D134727
2022-05-11 19:20:01 +00:00
Bryce Seager van Dyk 36ec87d3bc Bug 1768409 - Don't log mType everywhere in TrackBuffersManager. r=alwu
Only log mType when we're updating it or using it.

Differential Revision: https://phabricator.services.mozilla.com/D145928
2022-05-11 19:15:22 +00:00
alwu 1ba7e83a72 Bug 1756260 - part10 : fix macOS build error. r=media-playback-reviewers,bryce
> /builds/worker/fetches/MacOSX10.12.sdk/usr/include/MacTypes.h:542:16: error: reference to 'Point' is ambiguous

The point type conflicts with the `gfx::Point`, so move the media data out of the unify build.

Differential Revision: https://phabricator.services.mozilla.com/D146021
2022-05-11 17:46:15 +00:00
alwu 37cbb23832 Bug 1756260 - part9 : only execute engine's methods after it got intialized correctly and not in a shutdown state. r=jolin
If we call them too early, the IPC connection might not be created yet.

Differential Revision: https://phabricator.services.mozilla.com/D144629
2022-05-11 17:46:15 +00:00
alwu ba6f805451 Bug 1756260 - part8 : use a light-weight state object on ExternalEngineStateMachine. r=jolin
These state object help to store variables only be used in a certain state, which avoid the chance to modify them in an incorrect state.

Also now it's able to do the cleaning for the state transition.

Differential Revision: https://phabricator.services.mozilla.com/D143678
2022-05-11 17:46:15 +00:00
alwu adc699369a Bug 1756260 - part7 : use ExternalEngineStateMachine in MediaSourceDecoder. r=jolin
Now it's just used for testing and development purpose.

In the future, this should only be used for encrypted playback and we would also need a fallback mechanism if the external engine fails.

Differential Revision: https://phabricator.services.mozilla.com/D140592
2022-05-11 17:46:14 +00:00
alwu 05c11eb55b Bug 1756260 - part6 : create remote decoders based on the engine Id. r=jolin
Implement a new decoder module which would use the media engine Id to create the decoder, which is implemented by WMF Media Engine API.

The actual data flow would be like that, the encoded data would be passed to the RDD process by using the remote decoder, and remote decoder would feed the data into media engine decoder, such as MFMediaEngineVideoStream and MFMediaEngineAudioStream.

Differential Revision: https://phabricator.services.mozilla.com/D143805
2022-05-11 17:46:14 +00:00
alwu ba773486a6 Bug 1756260 - part5 : pass the engine Id via IPC. r=jolin
We need to padd the media engine Id to the remote process in order to create correct remote decoders.

Differential Revision: https://phabricator.services.mozilla.com/D143807
2022-05-11 17:46:13 +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
alwu 8f62b3b6f3 Bug 1756260 - part3 : implement a mechanism to communicate with the MediaEngine in the remote process. r=jolin
This patch implements a new IPDL which is used for communicating with the remote media engine. It will be used between the content process and the RDD process.

For each media engine pair, they would share an unique ID, which is used to indentify different engine pairs (if any) and for querying a specific engine via Id, which is implemented in the next patch.

Depends on D140014

Differential Revision: https://phabricator.services.mozilla.com/D139204
2022-05-11 17:46:13 +00:00
alwu d072277522 Bug 1756260 - part2 : implement a new state machine for the external engine. r=jolin
This patch introduces a new type of state machine that is used when the playback is controlled by an external playback engine which would provide high level operations but hide most low level tasks from its client. Eg. Media Foundation Media Engine.

The extenral engine should use events to communicate this state machine, and state machine should address those events in order to fullfill the need of the external engine.

Differential Revision: https://phabricator.services.mozilla.com/D140014
2022-05-11 17:46:12 +00:00
alwu 6bf81c9c16 Bug 1756260 - part1 : split some of current state machine methods and variables to another new base class preparing for a new type of state machine. r=jolin
In following patch, we will implement a new type of state machine. In order to avoid redundant code, this patch splits some basic share codes into a new base class.

Differential Revision: https://phabricator.services.mozilla.com/D140013
2022-05-11 17:46:11 +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 c142fc6abc Bug 1756260 - part10 : fix macOS build error. r=media-playback-reviewers,bryce
> /builds/worker/fetches/MacOSX10.12.sdk/usr/include/MacTypes.h:542:16: error: reference to 'Point' is ambiguous

The point type conflicts with the `gfx::Point`, so move the media data out of the unify build.

Differential Revision: https://phabricator.services.mozilla.com/D146021
2022-05-11 02:57:21 +00:00
alwu 7db2f326f9 Bug 1756260 - part9 : only execute engine's methods after it got intialized correctly and not in a shutdown state. r=jolin
If we call them too early, the IPC connection might not be created yet.

Differential Revision: https://phabricator.services.mozilla.com/D144629
2022-05-11 02:57:21 +00:00
alwu f4b75758e5 Bug 1756260 - part8 : use a light-weight state object on ExternalEngineStateMachine. r=jolin
These state object help to store variables only be used in a certain state, which avoid the chance to modify them in an incorrect state.

Also now it's able to do the cleaning for the state transition.

Differential Revision: https://phabricator.services.mozilla.com/D143678
2022-05-11 02:57:20 +00:00
alwu 0f62b3199d Bug 1756260 - part7 : use ExternalEngineStateMachine in MediaSourceDecoder. r=jolin
Now it's just used for testing and development purpose.

In the future, this should only be used for encrypted playback and we would also need a fallback mechanism if the external engine fails.

Differential Revision: https://phabricator.services.mozilla.com/D140592
2022-05-11 02:57:20 +00:00
alwu a5185fd54e Bug 1756260 - part6 : create remote decoders based on the engine Id. r=jolin
Implement a new decoder module which would use the media engine Id to create the decoder, which is implemented by WMF Media Engine API.

The actual data flow would be like that, the encoded data would be passed to the RDD process by using the remote decoder, and remote decoder would feed the data into media engine decoder, such as MFMediaEngineVideoStream and MFMediaEngineAudioStream.

Differential Revision: https://phabricator.services.mozilla.com/D143805
2022-05-11 02:57:19 +00:00
alwu f1a2bf741a Bug 1756260 - part5 : pass the engine Id via IPC. r=jolin
We need to padd the media engine Id to the remote process in order to create correct remote decoders.

Differential Revision: https://phabricator.services.mozilla.com/D143807
2022-05-11 02:57:19 +00: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
alwu 76281d27f2 Bug 1756260 - part3 : implement a mechanism to communicate with the MediaEngine in the remote process. r=jolin
This patch implements a new IPDL which is used for communicating with the remote media engine. It will be used between the content process and the RDD process.

For each media engine pair, they would share an unique ID, which is used to indentify different engine pairs (if any) and for querying a specific engine via Id, which is implemented in the next patch.

Depends on D140014

Differential Revision: https://phabricator.services.mozilla.com/D139204
2022-05-11 02:57:18 +00:00
alwu 71bcbbf669 Bug 1756260 - part2 : implement a new state machine for the external engine. r=jolin
This patch introduces a new type of state machine that is used when the playback is controlled by an external playback engine which would provide high level operations but hide most low level tasks from its client. Eg. Media Foundation Media Engine.

The extenral engine should use events to communicate this state machine, and state machine should address those events in order to fullfill the need of the external engine.

Differential Revision: https://phabricator.services.mozilla.com/D140014
2022-05-11 02:57:18 +00:00
alwu 2b0a067fdc Bug 1756260 - part1 : split some of current state machine methods and variables to another new base class preparing for a new type of state machine. r=jolin
In following patch, we will implement a new type of state machine. In order to avoid redundant code, this patch splits some basic share codes into a new base class.

Differential Revision: https://phabricator.services.mozilla.com/D140013
2022-05-11 02:57:17 +00:00
Byron Campen 918543a8e9 Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145679
2022-05-10 18:07:19 +00:00
stransky 541fdba919 Bug 1768651 [ffmpeg] Log decode time for every frame r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145966
2022-05-10 17:39:30 +00:00
Andreea Pavel 390f7009e9 Merge autoland to mozilla-central a=merge 2022-05-10 12:54:35 +03:00
Butkovits Atila 6683515559 Backed out changeset c11ccbe584a2 (bug 1586109) for causing toolchains bustages on central. CLOSED TREE 2022-05-10 08:19:09 +03:00
Narcis Beleuzu bd0e17ff20 Merge autoland to Mozilla-Central. a=merge 2022-05-10 06:47:37 +03:00
Kagami Sascha Rosylight c9828e8f91 Bug 1768189 - Part 22: Apply modernize-concat-nested-namespaces to dom/media/webrtc/transport/ipc/WebrtcTCPSocketParent.h ... r=andi
Depends on D145755

Differential Revision: https://phabricator.services.mozilla.com/D145756
2022-05-09 20:41:11 +00:00
Kagami Sascha Rosylight c4ef20eca6 Bug 1768189 - Part 21: Apply modernize-concat-nested-namespaces to dom/media/webaudio/IIRFilterNode.h ... r=andi
Depends on D145754

Differential Revision: https://phabricator.services.mozilla.com/D145755
2022-05-09 20:41:11 +00:00
Kagami Sascha Rosylight 4283c3f1dc Bug 1768189 - Part 20: Apply modernize-concat-nested-namespaces to dom/media/systemservices/CamerasParent.h ... r=andi
Depends on D145753

Differential Revision: https://phabricator.services.mozilla.com/D145754
2022-05-09 20:41:10 +00:00
Kagami Sascha Rosylight 7795dbcc68 Bug 1768189 - Part 19: Apply modernize-concat-nested-namespaces to dom/media/gmp/GMPStorageParent.h ... r=media-playback-reviewers,bryce
Depends on D145752

Differential Revision: https://phabricator.services.mozilla.com/D145753
2022-05-09 20:41:10 +00:00
Kagami Sascha Rosylight 921c9d66d0 Bug 1768189 - Part 18: Apply modernize-concat-nested-namespaces to dom/media/PrincipalChangeObserver.h ... r=media-playback-reviewers,bryce
Depends on D145751

Differential Revision: https://phabricator.services.mozilla.com/D145752
2022-05-09 20:41:10 +00:00
Kagami Sascha Rosylight 36c4c2abca Bug 1768189 - Part 17: Apply modernize-concat-nested-namespaces to dom/ipc/URLClassifierParent.h ... r=andi
Depends on D145750

Differential Revision: https://phabricator.services.mozilla.com/D145751
2022-05-09 20:41:09 +00:00
Norisz Fay 3ab130ec64 Backed out 15 changesets (bug 1743834, bug 1765554) for causing bug 1768473
Backed out changeset 41d154330f7f (bug 1743834)
Backed out changeset f09bb9e00c17 (bug 1743834)
Backed out changeset 569b8d3a9fcd (bug 1743834)
Backed out changeset 9c37cd8faac3 (bug 1765554)
Backed out changeset 4c12bdcae40a (bug 1743834)
Backed out changeset 1155d1d6db79 (bug 1743834)
Backed out changeset ee700aa90a1b (bug 1743834)
Backed out changeset 150ecd10e53a (bug 1743834)
Backed out changeset 4076e2055960 (bug 1743834)
Backed out changeset 966ceb9947fa (bug 1743834)
Backed out changeset f604fe0f8d02 (bug 1743834)
Backed out changeset 61ec6368ddcd (bug 1743834)
Backed out changeset c0a1eaca1d90 (bug 1743834)
Backed out changeset 798e05478220 (bug 1743834)
Backed out changeset b92a638392da (bug 1743834)
2022-05-09 19:39:59 +03:00
Byron Campen 3a6dbeb8f4 Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145679
2022-05-09 14:30:41 +00:00
Paul Adenot 8573aebfe4 Bug 1743834 - Trigger the audibility event at the beginning of the initialization of an audio stream, when un-muting. r=alwu
The initialization itself can take some time and this audibility event is used
to prioritize the process, that will soon become audible, on at least Windows,
so it's better to get prioritized slightly ahead of time.

We should eventually untie audibility from priorities, but this hasn't happened
yet. Instead, we should make it so silent audio for an extended period of time
causes a shutdown of the cubeb stream, it's a lot more efficient.

Differential Revision: https://phabricator.services.mozilla.com/D145328
2022-05-09 13:20:54 +00:00
Paul Adenot 6900b5e9d0 Bug 1743834 - After unmuting, re-initialize the AudioSink asynchronously. r=alwu
On Windows (in particular, but also not quick on other OS, depending on the
hardware being used), opening a system-level audio stream (using cubeb)
can be very long. It's a blocking call from the MDSM thread. The MDSM can't
query the clock and update video frames while the stream is being opened,
resulting in the video freezing.

On the other hand, we don't want the clock starting to increase while first
starting the media, it's better to block the MDSM in this case.

This patch changes `AudioSinkWrapper::StartAudioSink` to have two modes:
- A synchronous mode for the first opening (and therefore for seeking, etc.)
- An asynchronous mode to use when the stream is unmuted: the AudioSinkWrapper
will continue to use a clock based on the system clock, until the system-level
audio stream is effectively opened, at which point it will switch to using it
for the clock.

This new mode does the initialization on a background thread, but starts the
system-level audio stream from the MDSM thread (it's fast enough and simplifies
the code a lot).

The promises are created synchronously, because this is what the MDSM expects,
but they are rejected in case of failure.

Finally, an edge case is handled: if the stream is stopped while it's being
opened asynchronously. This is detected, and instead of starting the
system-level audio stream, the stream is shut down.

Differential Revision: https://phabricator.services.mozilla.com/D145000
2022-05-09 13:20:54 +00:00
Paul Adenot e2faa2f92c Bug 1743834 - Split initialization and start in AudioSinkWrapper. r=alwu
No change in functionality, this is to prepare for the next patch that will do
the initialization asynchronously because it's expensing and blocking.

Differential Revision: https://phabricator.services.mozilla.com/D144999
2022-05-09 13:20:53 +00:00
Paul Adenot 7a75d02824 Bug 1765554 - Relax clock monotonicity assertion on Windows, for investigation. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144195
2022-05-09 13:20:52 +00:00
Paul Adenot 78c87cfbc3 Bug 1743834 - Assert the media clock monotonicity with MOZ_ASSERT. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D143823
2022-05-09 13:20:52 +00:00
Paul Adenot db8b7abf47 Bug 1743834 - When no packet are in the queue when shutting down the AudioStream, try our best to provide timing data. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141992
2022-05-09 13:20:52 +00:00
Paul Adenot 9840a23c31 Bug 1743834 - Fix static-analysis warning. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141991
2022-05-09 13:20:51 +00:00
Paul Adenot f8ef45ed87 Bug 1743834 - Don't start with an AudioSink if muted from the start. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141990
2022-05-09 13:20:51 +00:00
Paul Adenot 68188c63fa Bug 1743834 - Correctly set the start time when the audio callbacks actually are called, the first time audio audio clock starts to be in use. r=alwu,media-playback-reviewers
The base clock for the new audio stream is precisely the time when the clock
source changes from the system clock to the audio clock, accounting for the time
it takes to actually starts the stream. This allows avoiding discontinuities
when switching clocks.

Differential Revision: https://phabricator.services.mozilla.com/D136237
2022-05-09 13:20:51 +00:00
Paul Adenot 8a10c3c36c Bug 1743834 - Detect when switching clock provider in AudioSinkWrapper. r=alwu,media-playback-reviewers
This will allow detecting the first time the AudioSinkWrapper starts using the
clock from an audio stream after having been muted (=using the system clock) for
some time, to correct the timing.

Differential Revision: https://phabricator.services.mozilla.com/D136236
2022-05-09 13:20:50 +00:00
Paul Adenot b42e188e30 Bug 1743834 - Wait for the audio callbacks to start being called before using the audio clock. r=alwu,media-playback-reviewers
Because we're generally using high latency on the cubeb stream used by
AudioStream instance, it can take some time for the callbacks to start being
called, and the for the audio clock (cubeb_stream_get_position(...)) to advance.

This waits for the first callback to be called before using the clock of the
audio stream, and the system clock keeps being in use until then.

Differential Revision: https://phabricator.services.mozilla.com/D136235
2022-05-09 13:20:50 +00:00
Paul Adenot 7bf06a2b04 Bug 1743834 - Shut down the AudioSink when audio is muted. r=alwu,media-playback-reviewers
This does the following:
- When the media is muted, shut down and release the AudioSink ;
- While the media is muted, use the system clock to make video advance ;
- Each time the clock is queried, check if some audio packets should be
discarded because they are in the past, compared to the media time ;
- While muted, if the audio finished, resolve the EndedPromise ;
- When the media is un-muted, a new AudioSink is created, and its clock starts
to be in use.

This works well and A/V sync is correct, but a micro-stuttering is perceptible
on the video when looking carefully, because of the time it takes to open the
audio stream. This is fixed in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D136234
2022-05-09 13:20:50 +00:00
Paul Adenot 0795585040 Bug 1743834 - Create and manage the lifetime of the AudioStream EndedPromise in AudioSinkWrapper. r=alwu,media-playback-reviewers
We're going to shutdown the AudioStream in a subsequent patch, when audio is
muted. This will allow resolving it at the right time when the media ends while
muted.

This also extracts a method to start an AudioSink, because it's going to be
started in multiple locations in a future patch.

Differential Revision: https://phabricator.services.mozilla.com/D136233
2022-05-09 13:20:49 +00:00
Paul Adenot 7b56cea329 Bug 1743834 - Add a logging module for AudioSink. r=alwu,media-playback-reviewers
Depends on D133642

Differential Revision: https://phabricator.services.mozilla.com/D133643
2022-05-09 13:20:49 +00:00
Paul Adenot 8709902435 Bug 1743834 - Make GetClock() non-const on MediaSink, and allow the AudioSink to modify the AudioQueue. r=alwu,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133642
2022-05-09 13:20:48 +00:00
stransky 4cb28bd2f4 Bug 1768191 [ffmpeg] Calculate and log ffmpeg playback speed r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145725
2022-05-09 08:53:04 +00:00
Jan-Ivar Bruaroey 3c244c325c Bug 1760765 - Clean up OriginKeyStore handling. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D143097
2022-05-09 01:33:02 +00:00
Cristian Tuns 858d232088 Backed out changeset 63a2716431f9 (bug 1586109) for causing build bustages on RTCRtpTransceiver.cpp CLOSED TREE 2022-05-06 17:03:00 -04:00
Randell Jesup d36e07f860 Bug 1207753 - ffmpeg integration thread-safety annotations r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D132436
2022-05-06 19:53:17 +00:00
Byron Campen db341d7b94 Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145679
2022-05-06 17:39:29 +00:00
sotaro 417b6e90df Bug 1766203 - Release all IMFSamples before destroying video MFTDecoder r=media-playback-reviewers,gfx-reviewers,jrmuizel,alwu
Crashes of Bug 1764753 seemed to happen during closing video MFTDecoder or closing IMFSample after closing video MFTDecoder. We might need to release all IMFSamples before destroying video MFTDecoder.

Differential Revision: https://phabricator.services.mozilla.com/D144537
2022-05-06 15:22:41 +00:00
Jeff Muizelaar e5f178ecd3 Bug 1768033 - Record more detailed telemetry in has_h264. r=alwu
This should let us distinguish between pre-load, during-load
and post-load

Differential Revision: https://phabricator.services.mozilla.com/D145637
2022-05-05 19:24: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
stransky 6431645c43 Bug 1767568 Test AV1 decode from mp4 container only if ffvpx is used, r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145406
2022-05-05 08:59:28 +00:00
stransky eec93043fb Bug 1762725 [VA-API] Keep AVHWFrameContext instead of AVHWDeviceContext r=alwu
This one reverts Bug 1759137 and switch back to reference hw_frames_ctx. We need that as hw_frames_ctx holds surface pool which can be recreated when h.264 VA-API decoder seeks in video stream.

Differential Revision: https://phabricator.services.mozilla.com/D145094
2022-05-05 08:58:09 +00:00
Jeff Muizelaar 87262da293 Bug 1767826 - Fix MEDIA_GMP_UPDATE_CONTENT_PROCESS_HAS_H264 telemetry. r=bryce
HasPluginForAPI in the parent process doesn't really work properly
anymore. Instead just check for the API and tags when building the
capability list.

Differential Revision: https://phabricator.services.mozilla.com/D145474
2022-05-04 19:42:31 +00:00
Lee Salzman 7044dfb26a Bug 1719881 - Disable test_capture_stream_av_sync on Linux asan. r=aosmond
test_capture_stream_av_sync is still intermittent when running under asan,
even though it was disabled for tsan in bug 1713397. This gets much worse
then run under accelerated Canvas2D, so just disable it for asan for now
as well to solve the intermittent.

Differential Revision: https://phabricator.services.mozilla.com/D144981
2022-05-04 16:19:06 +00:00
Norisz Fay 5e0cdd011f Backed out changeset 4192a14c490c (bug 1760765) for causing leakcheck failures 2022-05-04 17:49:45 +03:00
Chris H-C 94867a6ae6 Bug 1763235 - Update metrics.yamls to file-level tags, new front matter r=perry.mcmanis,application-update-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D145141
2022-05-04 14:16:19 +00:00
Jan-Ivar Bruaroey db7f412e31 Bug 1760765 - Clean up OriginKeyStore handling. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D143097
2022-05-04 14:04:23 +00:00
Jeff Muizelaar eb45fac6ab Bug 1767334. Add some telemetry about whether H264 encoding is available in the parent. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D145265
2022-05-03 23:46:05 +00:00
Karl Tomlinson d814d3c0cf Bug 1735923 - error on opacity change r=edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D143865
2022-05-03 22:12:40 +00:00
Zaggy1024 f5adfe31a0 Bug 1767467 - Fix hardware H264 decoding support detection on Windows. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145383
2022-05-03 22:06:30 +00:00
Mike Hommey a3e1d0e570 Bug 1766371 - Fix class-varargs warnings in Windows builds. r=nika,mjf
dom/bindings/BindingUtils.cpp(202,62): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                         static_cast<unsigned>(errorNumber), funcNameStr.get(),
                                                             ^
dom/bindings/BindingUtils.cpp(203,26): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                         ifaceName.get());
                         ^
dom/media/webrtc/transport/third_party/nICEr/src/ice/ice_component.c(582,15): error: passing object of class type 'nr_transport_addr' (aka 'struct nr_transport_addr_') through variadic function [-Werror,-Wclass-varargs]
              component->stream->turn_servers[j].turn_server.addr);
              ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(44,45): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
        wprintf(L"%s is not registered.\n", aNames[i].get());
                                            ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(49,30): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
        wprintf(L"%s:%4d\n", aNames[i].get(), *entry);
                             ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(248,30): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
      wprintf(L"JSON: %s\n", json.get());
                             ^
xpcom/io/nsLocalFileWin.cpp(1647,20): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                   NS_ConvertASCIItoUTF16(nsDependentCString(aField)).get());
                   ^

Differential Revision: https://phabricator.services.mozilla.com/D144665
2022-05-03 21:48:22 +00:00
Mike Hommey ec71e64fa5 Bug 1766561 - Fix various formatting errors. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,padenot,kershaw
- Missing/Extra formatting directives
- Typos in formatting directives
- Non-literal strings used as formatting strings
- Wrong types passed as argument
- Swapped/Wrong arguments
- Commas between parts of unique formatting strings

Differential Revision: https://phabricator.services.mozilla.com/D144921
2022-05-03 20:49:10 +00:00
Mike Hommey 08edf30a1b Bug 1766561 - Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144917
2022-05-03 20:49:08 +00:00
Mike Hommey 1663cab462 Bug 1766561 - Add missing l modifier for HRESULT formatting. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144915
2022-05-03 20:49:07 +00:00
Mike Hommey 12df1ed1b6 Bug 1766561 - Use %lu for Windows Error types (DWORD). r=rkraesig,xpcom-reviewers,application-update-reviewers,mhowell,bobowen,necko-reviewers,keeler,media-playback-reviewers,bytesized,barret,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144914
2022-05-03 20:49:07 +00:00
Cristian Tuns 333465c319 Backed out changeset 389fef3e4368 (bug 1767334) for causing mochitest failures on GMPServiceParent.cpp CLOSED TREE 2022-05-03 10:08:13 -04:00
Cristian Tuns c39878171b Backed out 2 changesets (bug 1767170) for causing mochitest failures on test_peerConnection_stats.html
Backed out changeset 6a9644bbebed (bug 1767170)
Backed out changeset cdaeac6adf56 (bug 1767170)
2022-05-03 10:07:29 -04:00
stransky d8febb7fc5 Bug 1766797 Add AV1 test to TestMediaDataDecoder r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144929
2022-05-03 13:25:56 +00:00
Jeff Muizelaar acd2c0f52f Bug 1767334. Add some telemetry about whether H264 encoding is available in the parent. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D145265
2022-05-03 13:17:43 +00:00
Norisz Fay 114c4be082 Bug 1767170 - Linting fix r=fix CLOSED TREE 2022-05-03 16:24:46 +03:00
Jeff Muizelaar 4e9620adae Bug 1767170 - Add some more outbound-rtp stats. r=ng,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D145177
2022-05-03 12:51:36 +00:00
Tooru Fujisawa 76f3cf7f70 Bug 1765156 - Part 3: Use SpecialPowers.ChromeUtils.import in dom/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D144084
2022-05-03 06:32:25 +00:00
Butkovits Atila 422f7c4d05 Merge mozilla-central to autoland. CLOSED TREE 2022-05-03 00:51:11 +03:00
Butkovits Atila ea12341925 Merge autoland to mozilla-central. a=merge 2022-05-03 00:36:36 +03:00
Nika Layzell d5c301d0bc Bug 1738106 - Part 4: Support ThreadSafeWeakPtr in TaskQueue, r=xpcom-reviewers,mccr8
This will be used to allow the BackgroundEventTarget to safely hold weak
references to active TaskQueues managed by it.

Differential Revision: https://phabricator.services.mozilla.com/D142605
2022-05-02 20:37:35 +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
Jeff Muizelaar c5077a5261 Bug 1767163 - Serialize stats from bug 1759931. r=ng
This serialization wasn't added when the stats from bug 1759931 were
added.

Differential Revision: https://phabricator.services.mozilla.com/D145172
2022-05-02 19:53:44 +00:00
alwu 9aee6fcacd Bug 1767118 - fix MinGW build error. r=media-playback-reviewers,bryce
Differential Revision: https://phabricator.services.mozilla.com/D145198
2022-05-02 11:01:35 +00:00
Peter Van der Beken e77783380e Bug 1766130 - Properly propagate errors from Promise creation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144515
2022-05-02 07:44:23 +00:00
alwu eb4bfc22f7 Bug 1764855 - link some MF functions from mfplat.dll r=media-playback-reviewers,jolin
Some functions we're going to use in bug 1758789 haven't been linked yet.

Differential Revision: https://phabricator.services.mozilla.com/D143802
2022-04-30 00:59:05 +00:00
Chun-Min Chang cecfff8df3 Bug 1765312 - Wait for error stop before AudioInputSource::Stop() r=padenot
We need to wait for the stream stop called by the forced error
before calling `AudioInputSource::Stop` to ensure the callback order in
the test. Otherwise, the stream stop called by the forced error on the
background thread will race with the stream stop called by the
`AudioInputSource::Stop` in its task thread.

The problem of the intermittently unexpected callbacks can be reproduced
by adding a delay/thread-sleep in the forced-error's background thread
task. When MockCubeb runs into the error state by `ForceError()`, it
will create a background-thread task to stop the cubeb stream. On the
other hand, when `AuidioInputSource::Stop` is called, it will create a
task to stop the cubeb stream first and then destroy the cubeb stream,
on its own task thread. Most of time, when `AudioInputSource::Stop` is
called, the underlying cubeb stream has been stopped by the brackground
task, so the `MockCubebStream` won't fire the stopped-state callback.
`MockCubeb::StopStream` in `MockCubebStream::Stop()` called by
`AudioInputSource::Stop()` will return a `CUBEB_ERROR` in this case
since no stream needs to be stopped, and so no callback need to be
fired.

However, in rare cases, the stream stop on the AudioInputSource's task
thread finishes before the one in the background thread. Hence, the
`MockCubebStream::Stop()` called by `AudioInputSource::Stop()` can stop
the stream successfully and then fire a stopped state callback.

We don't care what thread stop the stream in
`TestAudioInputSource.ErrorCallback` test, as long as the error-state
cabllback can be forwarded correctly and the stream can be destroyed in
the end. To avoid the racy stream stop calls between the background
thread and the task thread, we don't call `AudioInputSource::Stop()`
until stream is stopped in background thread.

Differential Revision: https://phabricator.services.mozilla.com/D144637
2022-04-29 16:30:29 +00:00
Mike Hommey 028ad1b883 Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 09:14:12 +00:00
Molnar Sandor 60e7e646e9 Backed out changeset 740c29a7efb2 (bug 1766797) for causing gtest failures in TestMediaDataDecoder. CLOSED TREE 2022-04-29 11:26:41 +03:00
stransky 0ea838e309 Bug 1766797 Add AV1 test to TestMediaDataDecoder r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144929
2022-04-29 07:29:51 +00:00
Norisz Fay 6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
Mike Hommey 9cd056be1e Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 00:43:32 +00:00
Jeff Muizelaar 64b078eb27 Bug 1766509. Add telemetry to track whether H264 is enabled. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D144827
2022-04-28 14:41:50 +00:00
stransky a83575a014 Bug 1762378 Allow to use AV1 in mp4 container r=alwu
Claim support for video/mp4 media container when codec is missing as it can contain AV1 media.

Differential Revision: https://phabricator.services.mozilla.com/D144160
2022-04-28 09:18:02 +00:00
Zaggy1024 f96894e4be Bug 1757823 - Use D3D11 APIs to check specific video codec profiles on Windows to determine hardware support. r=alwu
This will enable hardware decoding for 10-bit VP9 and AV1 on supported systems.

Differential Revision: https://phabricator.services.mozilla.com/D144258
2022-04-28 01:59:20 +00:00
Butkovits Atila dc9b8a9f33 Backed out changeset 9958701c1640 (bug 1757823) for causing bustages. CLOSED TREE 2022-04-28 02:35:34 +03:00
Zaggy1024 1a95f6b127 Bug 1757823 - Use D3D11 APIs to check specific video codec profiles on Windows to determine hardware support. r=alwu
This will enable hardware decoding for 10-bit VP9 and AV1 on supported systems.

Differential Revision: https://phabricator.services.mozilla.com/D144258
2022-04-27 23:19:35 +00:00
Mike Hommey 00732bfa12 Bug 1766375 - Fix implicit-fallthrough warnings in Windows builds. r=media-playback-reviewers,necko-reviewers,rkraesig,xpcom-reviewers,nika,bryce,kershaw
dom/media/platforms/wmf/WMFEncoderModule.cpp(31,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case MediaDataEncoder::CodecType::VP9:
    ^
dom/media/platforms/wmf/WMFEncoderModule.cpp(31,5): note: insert '[[fallthrough]];' to silence this warning
    case MediaDataEncoder::CodecType::VP9:
    ^
    [[fallthrough]];
netwerk/test/gtest/TestNamedPipeService.cpp(212,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    default:  // error
    ^
netwerk/test/gtest/TestNamedPipeService.cpp(212,5): note: insert '[[fallthrough]];' to silence this warning
    default:  // error
    ^
    [[fallthrough]];
widget/windows/KeyboardLayout.cpp(1973,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    default:
    ^
widget/windows/KeyboardLayout.cpp(1973,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    default:
    ^
    U_FALLTHROUGH;
widget/windows/WinMouseScrollHandler.cpp(633,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case SB_PAGEDOWN:
    ^
widget/windows/WinMouseScrollHandler.cpp(633,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case SB_PAGEDOWN:
    ^
    U_FALLTHROUGH;
widget/windows/WinMouseScrollHandler.cpp(640,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case SB_LINEDOWN:
    ^
widget/windows/WinMouseScrollHandler.cpp(640,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case SB_LINEDOWN:
    ^
    U_FALLTHROUGH;
widget/windows/nsLookAndFeel.cpp(188,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case ColorID::MozMenuhovertext:
    ^
widget/windows/nsLookAndFeel.cpp(188,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case ColorID::MozMenuhovertext:
    ^
    U_FALLTHROUGH;
widget/windows/nsLookAndFeel.cpp(194,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case ColorID::Highlighttext:
    ^
widget/windows/nsLookAndFeel.cpp(194,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case ColorID::Highlighttext:
    ^
    U_FALLTHROUGH;
widget/windows/nsLookAndFeel.cpp(469,15): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
              case ABE_BOTTOM:
              ^
widget/windows/nsLookAndFeel.cpp(469,15): note: insert 'U_FALLTHROUGH;' to silence this warning
              case ABE_BOTTOM:
              ^
              U_FALLTHROUGH;
widget/windows/nsNativeThemeWin.cpp(2540,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case StyleAppearance::Button:
    ^
widget/windows/nsNativeThemeWin.cpp(2540,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case StyleAppearance::Button:
    ^
    U_FALLTHROUGH;
widget/windows/nsNativeThemeWin.cpp(3278,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case StyleAppearance::Checkbox:
    ^
widget/windows/nsNativeThemeWin.cpp(3278,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case StyleAppearance::Checkbox:
    ^
    U_FALLTHROUGH;
widget/windows/nsNativeThemeWin.cpp(3332,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case StyleAppearance::Tabpanel:
    ^
widget/windows/nsNativeThemeWin.cpp(3332,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case StyleAppearance::Tabpanel:
    ^
    U_FALLTHROUGH;
widget/windows/nsNativeThemeWin.cpp(3461,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case StyleAppearance::Menuarrow: {
    ^
widget/windows/nsNativeThemeWin.cpp(3461,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case StyleAppearance::Menuarrow: {
    ^
    U_FALLTHROUGH;
widget/windows/nsWindow.cpp(1339,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case eWindowType_toplevel:
    ^
widget/windows/nsWindow.cpp(1339,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case eWindowType_toplevel:
    ^
    U_FALLTHROUGH;
widget/windows/nsWindow.cpp(1422,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case eWindowType_toplevel:
    ^
widget/windows/nsWindow.cpp(1422,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case eWindowType_toplevel:
    ^
    U_FALLTHROUGH;
widget/windows/nsWindow.cpp(3379,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case eTransparencyGlass:
    ^
widget/windows/nsWindow.cpp(3379,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case eTransparencyGlass:
    ^
    U_FALLTHROUGH;
widget/windows/nsWindow.cpp(5595,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case WM_MOUSELEAVE: {
    ^
widget/windows/nsWindow.cpp(5595,5): note: insert 'U_FALLTHROUGH;' to silence this warning
    case WM_MOUSELEAVE: {
    ^
    U_FALLTHROUGH;
xpcom/io/SpecialSystemDirectory.cpp(572,5): error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
    case Win_Programs: {
    ^
xpcom/io/SpecialSystemDirectory.cpp(572,5): note: insert '[[fallthrough]];' to silence this warning
    case Win_Programs: {
    ^
    [[fallthrough]];

Differential Revision: https://phabricator.services.mozilla.com/D144668
2022-04-27 22:12:53 +00:00
Jeff Muizelaar 00d62a96a1 Bug 1765898. Expose GetEncoderInfo() for out of tree encoders. r=bwc
The Qp thresholds are taken from h264_encoder_impl.cc

Adding a ScalingSettings for WebrtcGmpVideoEncoder will enable the quality
scaler for WebrtcGmpVideoEncoder which will fix the resolution not being
changed at low bitrates.

Differential Revision: https://phabricator.services.mozilla.com/D144485
2022-04-27 19:35:13 +00:00
Jeff Muizelaar 6e2effa62e Bug 1766473. Implement some inbound-rtc/outbound-rtc stats needed for MS Teams. r=ng,emilio
The calculation of framesSent/framesReceved matches webrtc_video_engine.cc.

framesSent:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/media/engine/webrtc_video_engine.cc;l=2611;drc=edab26bf11e993e5069d433e8c2186ad2dee012e

framesReceived:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/media/engine/webrtc_video_engine.cc;l=3159;drc=edab26bf11e993e5069d433e8c2186ad2dee012e

Differential Revision: https://phabricator.services.mozilla.com/D144724
2022-04-27 19:12:37 +00:00
Alexandre Lissy 23e4d9ffd9 Bug 1766275 - Dont create WMF video decoders for utility process r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144608
2022-04-27 17:58:24 +00:00
Zaggy1024 8fbdbc249c Bug 1765842 - Part 2 - Make AV1ChangeMonitor aware of errors while reading sequence headers from AV1 media. r=alwu
Rather than passing corrupted samples to a decoder, MediaChangeMonitor will now throw a decoding error if parsing fails, and a useful message will be printed to the developer console indicating what caused the issue.

Differential Revision: https://phabricator.services.mozilla.com/D144384
2022-04-27 16:47:30 +00:00
Zaggy1024 74100427a0 Bug 1765842 - Part 1 - Fix two inconsistencies between reading and writing AV1 sequence headers. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144383
2022-04-27 16:47:29 +00:00
Alexandre Lissy c49495fe2e Bug 1765372 - Enable Arbitrary Code Guard for Utility processes r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D144607
2022-04-27 14:05:42 +00:00
Tom Ritter 41f8e427e9 Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-27 12:57:38 +00:00
Tom Ritter cf5cc35a2d Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-27 12:57:37 +00:00
Tom Ritter 981a623dfe Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value
is sanitized) we should no longer perform this check.

This is also good because it eliminates security code you
have to have (and thus accidently omitting it is a
vulnerability) and changes it to security code that happens
automatically, and is enforced by the compiler (via mandatory
ctor argument.)

Depends on D141414

Differential Revision: https://phabricator.services.mozilla.com/D141415
2022-04-27 12:57:36 +00:00
Tom Ritter ea3a8f9f97 Bug 1752332: Correctly populate the sanitized bit for PreferenceUpdate r=KrisWright
PreferenceUpdate is the IPC message notifying a child process
that a preference has been updated. To correctly decide whether
or not a value should be sanitized in it, we need to know
what type of destination process it is; we add parameters to
Preferences::GetPreference indicating that.

Inside of ToDomPref we call ShouldSanitizePreference to
correctly populate the sanitized bit.

Depends on D141412

Differential Revision: https://phabricator.services.mozilla.com/D141413
2022-04-27 12:57:36 +00:00
Tom Ritter ce8ed8e849 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-27 12:57:35 +00:00
Tom Ritter dae964f1a8 Bug 1752332: Tell ShouldSyncPreference if the destination is a web content process r=KrisWright
A couple places where it might be a web content process
still pass 'false' - this will be corrected in a later
patch.

Depends on D141410

Differential Revision: https://phabricator.services.mozilla.com/D141411
2022-04-27 12:57:35 +00:00
Tom Ritter 32adae1779 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-27 12:57:34 +00:00
Tom Ritter 1e49cf60d8 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-27 12:57:34 +00:00
Mike Hommey af7d5859d7 Bug 1766377 - Fix some sign-compare warnings by using ProcessId more consistently. r=nika,necko-reviewers,kershaw
dom/media/ipc/RDDProcessManager.cpp(320,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
      gpuProcessPid != -1 ? gpuProcessPid : base::GetCurrentProcId();
      ~~~~~~~~~~~~~ ^  ~~
dom/media/ipc/RDDProcessManager.cpp(332,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
  if (gpuProcessPid != -1) {
      ~~~~~~~~~~~~~ ^  ~~
gfx/layers/ipc/SharedSurfacesParent.cpp(360,38): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
    if (!gpm || gpm->GPUProcessPid() != -1) {
                ~~~~~~~~~~~~~~~~~~~~ ^  ~~
ipc/glue/MessageChannel.cpp(2145,13): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const base::ProcessId' (aka 'const unsigned long') [-Werror,-Wsign-compare]
    if (pid != base::kInvalidProcessId &&
        ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144688
2022-04-27 07:45:19 +00:00
Jeff Muizelaar 0c2cae7d3e Bug 1766467 - Parse QP of GMP OpenH264 encoded frames. r=bwc
The upstream OpenH264 encoder has been doing this since:
"Use QualityScaler for OpenH264 encoder.": 6d3e0c22c31bab111be833d598eea6118dfe0e83

This is needed for the quality scaler to work properly when using H264.

Differential Revision: https://phabricator.services.mozilla.com/D144717
2022-04-26 20:38:26 +00:00
Byron Campen 9324655f39 Bug 1764940: Test-case for bug. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D144064
2022-04-26 19:28:16 +00:00
Byron Campen f472b20507 Bug 1611957: Add support for RTCRtpEncodingParameters.maxFramerate r=ng,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144010
2022-04-26 14:07:38 +00:00
Byron Campen 288124e4a5 Bug 1611957: Make EncodingConstraints.maxFps a Maybe instead of having 0 represent no limit. r=ng
0 is a valid limit in setParameters according to the spec. For now, we treat
max-fr=0 in SDP as no limit, since that is what we have been doing.

Differential Revision: https://phabricator.services.mozilla.com/D144009
2022-04-26 14:07:37 +00:00
Byron Campen 97079204ac Bug 1611957: Test-cases for RTCRtpEncodingParameters.maxFramerate r=ng
Differential Revision: https://phabricator.services.mozilla.com/D144008
2022-04-26 14:07:37 +00:00
Byron Campen e95e4b7b05 Bug 1763435: Implement RTCInboundRtpStreamStats.framesPerSecond. r=ng,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144007
2022-04-26 14:07:37 +00:00
Peter Van der Beken d2a9c427b6 Bug 1766122 - Make PeerConnectionImpl::Chain return an already_AddRefed<Promise>. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D144511
2022-04-26 09:24:16 +00:00
Brad Werth 4065114084 Bug 1763781 Part 2: Update test expectations. r=jgilbert
This gives us better correctness for 10-bit vp9 reftests. In the WPTs, we
turn off some tests on macos because of the difficulty that our
screenshots have in analyzing srgb image data. It seems to consistently
report 191,255,191,73 when we are expecting 255,0,0,255.

Depends on D144039

Differential Revision: https://phabricator.services.mozilla.com/D144228
2022-04-25 21:13:38 +00:00
Brad Werth 7105deccae Bug 1763781 Part 1: Force FFmpegVideoDecoder to use MacIOSurfaceImage for HDR video. r=media-playback-reviewers,alwu
This change ensures that macOS will correctly detect the surface as a video
and use an HDR-capable display layer. Unfortunately, it invokes a slower code
path for this case. Bug 1765388 may restore this fast path for HDR video.

Differential Revision: https://phabricator.services.mozilla.com/D144039
2022-04-25 21:13:38 +00:00
Noemi Erli 6f1a1c6010 Backed out 2 changesets (bug 1763781) for causing failures in canvas-display-p3-drawImage-ImageBitmap-video.html CLOSED TREE
Backed out changeset ed2a721a38c5 (bug 1763781)
Backed out changeset e0c5508d662d (bug 1763781)
2022-04-25 22:49:20 +03:00
Brad Werth 9a1c2faa7d Bug 1763781 Part 2: Update test expectations. r=jgilbert
This gives us better correctness for 10-bit vp9 reftests. In the WPTs, we
turn off some tests on macos because of the difficulty that our
screenshots have in analyzing srgb image data. It seems to consistently
report 191,255,191,73 when we are expecting 255,0,0,255.

Depends on D144039

Differential Revision: https://phabricator.services.mozilla.com/D144228
2022-04-25 19:13:52 +00:00
Brad Werth a46aa4f7f7 Bug 1763781 Part 1: Force FFmpegVideoDecoder to use MacIOSurfaceImage for HDR video. r=media-playback-reviewers,alwu
This change ensures that macOS will correctly detect the surface as a video
and use an HDR-capable display layer. Unfortunately, it invokes a slower code
path for this case. Bug 1765388 may restore this fast path for HDR video.

Differential Revision: https://phabricator.services.mozilla.com/D144039
2022-04-25 19:13:51 +00:00
Butkovits Atila c891bf41e7 Backed out 17 changesets (bug 1752332) for causing crashes at JS::AutoAssertNoGC::AutoAssertNoGC(JSContext*). CLOSED TREE
Backed out changeset eaa4213b9e08 (bug 1752332)
Backed out changeset 2d794b61fbf7 (bug 1752332)
Backed out changeset 69cbec3e9a11 (bug 1752332)
Backed out changeset 022a68e8d603 (bug 1752332)
Backed out changeset 1ff8656b362d (bug 1752332)
Backed out changeset 46ea5b4f9ad3 (bug 1752332)
Backed out changeset e1dcb4c7cb88 (bug 1752332)
Backed out changeset f9d6bc72406f (bug 1752332)
Backed out changeset dd02b8ef0219 (bug 1752332)
Backed out changeset 3e60b77153a3 (bug 1752332)
Backed out changeset ce93b08837d2 (bug 1752332)
Backed out changeset d165042105ea (bug 1752332)
Backed out changeset 22b910308ecd (bug 1752332)
Backed out changeset d2e748ccd01c (bug 1752332)
Backed out changeset a89203990075 (bug 1752332)
Backed out changeset b580c2a3bac0 (bug 1752332)
Backed out changeset a2d5880b528f (bug 1752332)
2022-04-25 17:55:17 +03:00
Tom Ritter dbac0fccf2 Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-25 13:54:03 +00:00
Tom Ritter 90b65f0b6f Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-25 13:54:02 +00:00
Tom Ritter 790bbf4ea8 Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value
is sanitized) we should no longer perform this check.

This is also good because it eliminates security code you
have to have (and thus accidently omitting it is a
vulnerability) and changes it to security code that happens
automatically, and is enforced by the compiler (via mandatory
ctor argument.)

Depends on D141414

Differential Revision: https://phabricator.services.mozilla.com/D141415
2022-04-25 13:54:01 +00:00
Tom Ritter f9201a6b3f Bug 1752332: Correctly populate the sanitized bit for PreferenceUpdate r=KrisWright
PreferenceUpdate is the IPC message notifying a child process
that a preference has been updated. To correctly decide whether
or not a value should be sanitized in it, we need to know
what type of destination process it is; we add parameters to
Preferences::GetPreference indicating that.

Inside of ToDomPref we call ShouldSanitizePreference to
correctly populate the sanitized bit.

Depends on D141412

Differential Revision: https://phabricator.services.mozilla.com/D141413
2022-04-25 13:54:01 +00:00
Tom Ritter e7d695f54c Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-25 13:54:00 +00:00
Tom Ritter ef6d930532 Bug 1752332: Tell ShouldSyncPreference if the destination is a web content process r=KrisWright
A couple places where it might be a web content process
still pass 'false' - this will be corrected in a later
patch.

Depends on D141410

Differential Revision: https://phabricator.services.mozilla.com/D141411
2022-04-25 13:54:00 +00:00
Tom Ritter 4ef13ee7f8 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-25 13:53:59 +00:00
Tom Ritter ef57c7df72 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-25 13:53:59 +00:00
stransky b0e082230e Bug 1762725 [Linux] ReleaseVAAPIData(): Clear mLib to avoid possible doube free of mHWAVBuffer/mAVHWDeviceContext r=alwu
Depends on D144270

Differential Revision: https://phabricator.services.mozilla.com/D144271
2022-04-24 18:54:11 +00:00
stransky 96b4e76ea8 Bug 1762725 [Linux] Add more logs to LockVAAPIData()/ReleaseVAAPIData r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144270
2022-04-24 18:54:11 +00:00
stransky a967f5124e Bug 1765530 Enable AV1 decode via FFmpeg 5.0 r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144165
2022-04-24 18:53:44 +00:00
Lee Salzman 44139eec4c Bug 1766056 - Fix YUV color matrix for SWGL slow and fast paths. r=jrmuizel
The brush_yuv_image slow path expected a YUV color matrix that applies scaling,
whereas we set up a matrix for SWGL that had no scaling to support the fast path.
To work around the fact that both paths have different scaling requirements, we
pass the matrix with scaling down to the fast path and undo the scaling later
when constructing SWGL's internal YUVMatrix from it. This allows both paths to
just use the same matrix and avoids the footgun.

Differential Revision: https://phabricator.services.mozilla.com/D144479
2022-04-23 16:48:20 +00:00
Butkovits Atila ce9521dabd Backed out 2 changesets (bug 1763781) for casuing wpt failures at canvas-display-p3-drawImage-ImageBitmap-video.html. CLOSED TREE
Backed out changeset 3b1422986294 (bug 1763781)
Backed out changeset 98fd39c96de8 (bug 1763781)
2022-04-23 03:37:14 +03:00
Brad Werth 3ced9fec5c Bug 1763781 Part 2: Update test expectations. r=jgilbert
This gives us better correctness for 10-bit vp9 reftests. In the WPTs, we
turn off some tests on macos because of the difficulty that our
screenshots have in analyzing srgb image data. It seems to consistently
report 191,255,191,73 when we are expecting 255,0,0,255.

Differential Revision: https://phabricator.services.mozilla.com/D144228
2022-04-22 23:38:00 +00:00
Brad Werth adc7954234 Bug 1763781 Part 1: Force FFmpegVideoDecoder to use MacIOSurfaceImage for HDR video. r=media-playback-reviewers,alwu
This change ensures that macOS will correctly detect the surface as a video
and use an HDR-capable display layer. Unfortunately, it invokes a slower code
path for this case. Bug 1765388 may restore this fast path for HDR video.

Differential Revision: https://phabricator.services.mozilla.com/D144039
2022-04-22 23:38:00 +00:00
Brad Werth 9b7fa136e8 Bug 1764618 Part 3: Make macOS hardware decode respect transfer functions. r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D143839
2022-04-22 22:10:19 +00:00
Brad Werth e276765ca6 Bug 1764618 Part 2: Make macOS software decode respect transfer functions. r=media-playback-reviewers,gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D143838
2022-04-22 22:10:18 +00:00
Brad Werth d12ac666bc Bug 1764618 Part 1: Capture PQ or HLG transfer function in VideoInfo. r=media-playback-reviewers,alwu
The transfer function value is only used for BT2020 colorspace videos. We
capture the transfer function when the decoder is created, because it is
not updated per-frame in the VPX bitstream. If a video changes colorspace,
we keep the transfer function value in case it returns to using the BT2020
colorspace.

Differential Revision: https://phabricator.services.mozilla.com/D143665
2022-04-22 22:10:18 +00:00
Paul Adenot 2b0e6156c2 Bug 1762620 - Only pad audio buffers when doing up mixing. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D143623
2022-04-22 13:19:01 +00:00
Mike Hommey 407fae9455 Bug 1765474 - Fix unused-but-set-variable warning in OggDemuxer.cpp. r=media-playback-reviewers,padenot
dom/media/ogg/OggDemuxer.cpp:1905:7: error: variable 'hops' set but not used [-Werror,-Wunused-but-set-variable]
  int hops = 0;
      ^

Differential Revision: https://phabricator.services.mozilla.com/D144147
2022-04-22 01:25:08 +00:00
Zaggy1024 48766a7591 Bug 1765769 - Fix compilation errors with --disable-av1 set. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D144343
2022-04-21 23:21:41 +00:00
Cosmin Sabou 512562821f Backed out 16 changesets (bug 1752332) for causing unrooted hazard failures. CLOSED TREE
Backed out changeset 1e57c99c133b (bug 1752332)
Backed out changeset 090719a92e33 (bug 1752332)
Backed out changeset c9c556d2f676 (bug 1752332)
Backed out changeset 1ca918455158 (bug 1752332)
Backed out changeset 1e3858df144d (bug 1752332)
Backed out changeset 33fb4d7c0f3c (bug 1752332)
Backed out changeset 6320b4b3d12d (bug 1752332)
Backed out changeset 322bbf59820a (bug 1752332)
Backed out changeset fe8f3e1c43b0 (bug 1752332)
Backed out changeset e5d5d24b0f3b (bug 1752332)
Backed out changeset f48f4c1b0784 (bug 1752332)
Backed out changeset 61b6a151b215 (bug 1752332)
Backed out changeset 0e70bf8ca3e4 (bug 1752332)
Backed out changeset 2dadbfd0b1d7 (bug 1752332)
Backed out changeset ce9e1254e82f (bug 1752332)
Backed out changeset 3ce1d0529b34 (bug 1752332)
2022-04-21 21:33:03 +03:00
Chun-Min Chang 1ed9f039d3 Bug 1765627 - Make sure {Disc, C}onnectDeviceInput are correctly called r=padenot
Add some assertions to make sure the ConnectDeviceInput and
DisconnectDeviceInput are called at the right time.

Differential Revision: https://phabricator.services.mozilla.com/D144218
2022-04-21 16:09:58 +00:00
Tom Ritter 735f58c46f Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-21 13:22:51 +00:00
Tom Ritter 75768c0672 Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-21 13:22:49 +00:00
Tom Ritter 9334d4f749 Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value
is sanitized) we should no longer perform this check.

This is also good because it eliminates security code you
have to have (and thus accidently omitting it is a
vulnerability) and changes it to security code that happens
automatically, and is enforced by the compiler (via mandatory
ctor argument.)

Depends on D141414

Differential Revision: https://phabricator.services.mozilla.com/D141415
2022-04-21 13:22:49 +00:00
Tom Ritter 97452fcc53 Bug 1752332: Correctly populate the sanitized bit for PreferenceUpdate r=KrisWright
PreferenceUpdate is the IPC message notifying a child process
that a preference has been updated. To correctly decide whether
or not a value should be sanitized in it, we need to know
what type of destination process it is; we add parameters to
Preferences::GetPreference indicating that.

Inside of ToDomPref we call ShouldSanitizePreference to
correctly populate the sanitized bit.

Depends on D141412

Differential Revision: https://phabricator.services.mozilla.com/D141413
2022-04-21 13:22:48 +00:00
Tom Ritter 9546954a23 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-21 13:22:48 +00:00
Tom Ritter e05da6fb4c Bug 1752332: Tell ShouldSyncPreference if the destination is a web content process r=KrisWright
A couple places where it might be a web content process
still pass 'false' - this will be corrected in a later
patch.

Depends on D141410

Differential Revision: https://phabricator.services.mozilla.com/D141411
2022-04-21 13:22:47 +00:00
Tom Ritter b662df4c61 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-21 13:22:47 +00:00
Tom Ritter bb04bf6564 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-21 13:22:46 +00:00
Iulian Moraru 23f3db7957 Backed out changeset 3399a9be4b03 (bug 1764112) for causing mda crashes on test_abort.html. CLOSED TREE 2022-04-21 14:08:00 +03:00
Olli Pettay 1c0ec158ee Bug 1764112, ensure there is a reasonable SpeechRecognition object around when handling SpeechEvents, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D143455
2022-04-21 09:16:21 +00:00
Cristian Tuns 467d2abfd0 Backed out 16 changesets (bug 1752332) for causing gtest failures CLOSED TREE
Backed out changeset 2523f5463789 (bug 1752332)
Backed out changeset 8d2932869cbd (bug 1752332)
Backed out changeset 7d159898e81d (bug 1752332)
Backed out changeset 5b9bbe252fec (bug 1752332)
Backed out changeset aeb79413e987 (bug 1752332)
Backed out changeset c184c517de91 (bug 1752332)
Backed out changeset 1bc4f1780f37 (bug 1752332)
Backed out changeset 2b78f295d903 (bug 1752332)
Backed out changeset 21f015b60220 (bug 1752332)
Backed out changeset a74095dfe3da (bug 1752332)
Backed out changeset 4b04bf33486e (bug 1752332)
Backed out changeset 8566711743a8 (bug 1752332)
Backed out changeset eec507d87b2b (bug 1752332)
Backed out changeset ef50d2618c7f (bug 1752332)
Backed out changeset 1b4d316e7f20 (bug 1752332)
Backed out changeset e40a778cb93f (bug 1752332)
2022-04-20 17:23:11 -04:00
Tom Ritter 3313c98eaf Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-20 20:21:47 +00:00
Tom Ritter 43277d4358 Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-20 20:21:46 +00:00
Tom Ritter 80d036e297 Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value
is sanitized) we should no longer perform this check.

This is also good because it eliminates security code you
have to have (and thus accidently omitting it is a
vulnerability) and changes it to security code that happens
automatically, and is enforced by the compiler (via mandatory
ctor argument.)

Depends on D141414

Differential Revision: https://phabricator.services.mozilla.com/D141415
2022-04-20 20:21:45 +00:00
Tom Ritter 1cc103189e Bug 1752332: Correctly populate the sanitized bit for PreferenceUpdate r=KrisWright
PreferenceUpdate is the IPC message notifying a child process
that a preference has been updated. To correctly decide whether
or not a value should be sanitized in it, we need to know
what type of destination process it is; we add parameters to
Preferences::GetPreference indicating that.

Inside of ToDomPref we call ShouldSanitizePreference to
correctly populate the sanitized bit.

Depends on D141412

Differential Revision: https://phabricator.services.mozilla.com/D141413
2022-04-20 20:21:44 +00:00
Tom Ritter e9bd1a1b96 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-20 20:21:44 +00:00
Tom Ritter a7e00d1b86 Bug 1752332: Tell ShouldSyncPreference if the destination is a web content process r=KrisWright
A couple places where it might be a web content process
still pass 'false' - this will be corrected in a later
patch.

Depends on D141410

Differential Revision: https://phabricator.services.mozilla.com/D141411
2022-04-20 20:21:44 +00:00
Tom Ritter a77e0fbeb2 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-20 20:21:43 +00:00
Tom Ritter f0860a2493 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-20 20:21:42 +00:00
az 77c47db916 Bug 1764846 - Extend the return value of PDM's support methods to allow distinguishing between HW/SW support. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D143800
2022-04-20 18:44:48 +00:00