In retrospect this is too dependent on scheduling. We can and should do
something better. This will be easier to implement once I implement real offline
support for suspend/resume for offline MediaTrackGraph for OfflineAudioContext I
think.
Differential Revision: https://phabricator.services.mozilla.com/D123730
The SetupEMEPref helper is no longer needed. This patch removes it from tests.
This patch does some minimal restyling and simplifying of the tests following
removal, but largely does not change them. There should be *no* logic changed in
the tests following the patch. They should run as before.
Differential Revision: https://phabricator.services.mozilla.com/D123630
We will fail to get the service if this function is called and we're already in
shutdown. Call sites for this function do not guard against doing so (and I'm
not sure there's a nice way to check). So we need to handle failure in the
function and have call sites check if this failed.
An alternative function is added, MustGetShutdownBarrier, which maintains the
original behaviour. Callers that still wish to crash on failure can instead opt
to use this function.
Differential Revision: https://phabricator.services.mozilla.com/D123001
It would be nice to be able to auto-generate a string, but on Windows we only
have a very long name with all the qualifiers, and it's unreadable in practice
in the marker view.
This allows having names that are more human friendly and shorter. Generally
it's going to be the name of the function though.
Differential Revision: https://phabricator.services.mozilla.com/D122737
Add several test cases to cover our cbcs path. These test a number of different
patterns. These patterns are
- 1:9, 5:5, 10:0. These are more conventional patterns.
- 7:7, 9:8. These are not conventional. Both go against the spec by not summing
to 10. This tests we can appropriately handle unconventional cases.
Note that the spec says patterns should only be applied to video tracks. So in
all cases the audio actually use 0:0 (full encryption). So these test cases also
cover the 0:0 case.
Differential Revision: https://phabricator.services.mozilla.com/D123498
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.
This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.
Differential Revision: https://phabricator.services.mozilla.com/D122345
for consistency with getDisplayMedia().
System callers are trusted to be excluded from the requirement.
The exclusion may not be strictly necessary for capture previews, but removes
any doubt and simplifies testing.
Differential Revision: https://phabricator.services.mozilla.com/D122193
This adds coverage via the clearkey CDM to ensure that the output protection
query is working as intended. These tests ensure that the output protection
machinery recognizes when browsers windows are being captured, and this is
reflected by the clear key CDM changing key status on a test key id.
Two cases are covered:
1. Media playback is started, then during media playback a screen capture is
started and stopped. The test checks that we set restricted key status while
capture is active, and stop doing so once the capture stops.
2. Start a screen capture then start media playback, then stop capture while
playback is still active. This is similar to the first case, but the media
should start in a restricted state, as capture is ongoing when playback starts.
Differential Revision: https://phabricator.services.mozilla.com/D122784
With the new ThreadRegistration classes, it becomes more important to properly balance registrations with unregistrations. Though mismatches are safely handled when they happen, in particular missing unregistrations can lead to leaks that make tests fail.
This patch changes `PROFILER_REGISTER_THREAD` in TaskController.cpp to `AUTO_PROFILER_REGISTER_THREAD`, to ensure that TaskController threads get unregistered when they're finished.
In AsyncLogger.h, a pair of `PROFILER_REGISTER_THREAD` and `PROFILER_UNREGISTER_THREAD` is converted to a single `AUTO_PROFILER_REGISTER_THREAD`. This is equivalent, but the latter is safer, in case the code in-between later changes to include early breaks or returns.
Differential Revision: https://phabricator.services.mozilla.com/D123228