Here, Maybe can be used instead. Also, the returned string is always a literal
string, which makes MimeResultType a trivial type now.
Differential Revision: https://phabricator.services.mozilla.com/D97071
If an audio input is closed and then re-opened for the same AudioInputProcessing
listener, we end up re-using the same input packetizer. This would lead to the
data buffered in the input packetizer to be unaccounted for, inadvertently
triggering an assert.
This patch makes us clear the input packetizer when stopping an audio input such
that we have no state that can be unaccounted for.
Differential Revision: https://phabricator.services.mozilla.com/D97309
for consistency with ErrorResult and dom::Promise, which will mean no reverse
conversion is required for rejecting Promises.
Differential Revision: https://phabricator.services.mozilla.com/D95967
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.
This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.
We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.
Differential Revision: https://phabricator.services.mozilla.com/D96364
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.
This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.
We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.
Differential Revision: https://phabricator.services.mozilla.com/D96364
This patch adds identifiers to existing log messages in the mic source and
AudioInputProcessing, and adds new log messages for complete tracing of frames.
Differential Revision: https://phabricator.services.mozilla.com/D95940
When opening a second input track, there will already be some data from its
first instantiation in the driver's scratch buffer. If we ignore this data, we
end up buffering too much in AudioInputProcessing::Pull and tripping an assert.
Differential Revision: https://phabricator.services.mozilla.com/D95939
Without this patch, AudioInputProcessing wouldn't be aware of an audio driver
changing to another driver, be it a system driver or an audio driver that starts
on its fallback.
It could fail an assert since neither of those new drivers would append any
input data, so AudioInputProcessing would run out of buffered data but not know
to reset the state doing the bookkeeping for this.
Differential Revision: https://phabricator.services.mozilla.com/D95938
With a dedicated MediaTrack subclass for microphone input we can now coordinate
appending real data and pulling silence in a single place. This makes it easier
to control the amount of buffering needed, and the timing expectations around
pulling silence.
All in all, we can remove most of the state for the assertions, and the complex
logic surrounding them.
Differential Revision: https://phabricator.services.mozilla.com/D95936
This was mainly driven by the need of querying this track for its channel count,
but it also moves us one usage away from SourceMediaTrack, which is a
longer-term goal (because of SourceMediaTrack::mMutex).
Differential Revision: https://phabricator.services.mozilla.com/D95934
Some WebrtcMediaDataEncoder methods are blocking and wait for platform encoder
operations to complete. Running them in one thread pool/task queue will lead
to dead lock.
Differential Revision: https://phabricator.services.mozilla.com/D94464
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This renames the thread and identifiers derived from the thread's name. This is
to avoid ambiguity over if the thread relates to the MediaController class,
which it does not.
Differential Revision: https://phabricator.services.mozilla.com/D93806
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This moves most of the JsepTrack functionality for dealing with duplicate
payload types to a new EnsurePayloadTypeNotDuplicate method in
JsepCodecDescription. It also adds a virtual EnsureNoDuplicatePayloadTypes
method that checks the appropriate payload types for each codec type.
Differential Revision: https://phabricator.services.mozilla.com/D92112