Found during a review of RTCDtlsTransport, mWindow is not needed here
because RTCDTMFSender inherits from DOMEventTargetHelper.
Differential Revision: https://phabricator.services.mozilla.com/D84571
It somehow compiles fine currently without on Android, but relies on
implicit function declarations on Linux aarch64, which broke with
bug 822978, which turned the corresponding warning into an error.
It turns out OPUS_ARM_MAY* defines are set when the OPUS_ARM_PRESUME*
ones are set in the cmake build system upstream[1], and it also turns
out that not setting them actually disables some of the neon code. The
fixed point variant used for Android, however, fails to build in that
case because it relies on a function that is only available on arm
builds.
1. It's worth noting that the upstream autoconf build system does *not*
set OPUS_ARM_MAY* or OPUS_ARM_PRESUME* at all.
Differential Revision: https://phabricator.services.mozilla.com/D83474
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
Pick commits:
a971bf1 - Bump the priority of audiounit-rust in default init
ea39471 - Merge branch 'Filoppi-patch-1'
2cc3a02 - Fix conversion from com_heap_ptr.
0bd0338 - Merge branch 'patch-1' of https://github.com/Filoppi/cubeb into Filoppi-patch-1
b69886c - As suggested
20cb7e0 - Fixed small memory leak
Applying a patch on top of a971bf1a045b0e5dcaffd2a15c3255677f43cd2d
Differential Revision: https://phabricator.services.mozilla.com/D54055
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
The capabilities field is for the physical device, device_caps is for the
specific /dev/videoX device that has been opened. The device_caps field is
only populated if V4L2_CAP_DEVICE_CAPS is set, so we should check that, and
fall back to capabilities if it is not set.
Differential Revision: https://phabricator.services.mozilla.com/D82377
All changes in these files are a result of code formatting being applied.
When these files were under webrtc, they were treated as third party code and
not formatting. By moving them, formatting is now applied.
Differential Revision: https://phabricator.services.mozilla.com/D80544
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.
This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget
Differential Revision: https://phabricator.services.mozilla.com/D80354
All uses are always the main thread and its derivative (obtained via EventTargetFor method) or nullptr.
Depends on D80421
Differential Revision: https://phabricator.services.mozilla.com/D80422
Chrome will not accept sdp with ssrc-group:FID on recvonly msections, causing
calls to fail to be established between Firefox and Chrome when only a
microphone is present on the Firefox side.
Differential Revision: https://phabricator.services.mozilla.com/D80034
Chrome will not accept sdp with ssrc-group:FID on recvonly msections, causing
calls to fail to be established between Firefox and Chrome when only a
microphone is present on the Firefox side.
Differential Revision: https://phabricator.services.mozilla.com/D80034
We have a clang-plugin check that discourages raw `vsnprintf`, but for some reason it doesn't catch this before clang 11. I _think_ it's related to earlier versions not being able to see that `len` is a constant, but I'm not really sure.
Differential Revision: https://phabricator.services.mozilla.com/D79918
Here we unify the 'run_after' section with 'file-updates' just naming
them 'update-actions'. This will allow a simpler schema and a clearer
picture of the order of actions that are taken.
Differential Revision: https://phabricator.services.mozilla.com/D76428
Additionally, raise voluptuous.Invalid errors so the message provided in
the Exception is shown to the user on error.
Differential Revision: https://phabricator.services.mozilla.com/D75697
Depends on D75696
This section is for expressing actions that occur after extracting
the files, before vendoring is completed. While we support running
scripts (or at least, we will...) this section can be used for simple
actions that don't need scripts.
Also, add the dav1d excluded files.
Differential Revision: https://phabricator.services.mozilla.com/D75696
Depends on D75695
Add license-file to allow one to specify a special file the
project's license is in.
Add 'vendor-directory' to allow vendoring the files into a
separate directory (e.g. under third_party.) Remove a contradictory
comment.
Remove 'revision' from 'vendoring'. This doesn't make sense to me:
'vendoring' is about how to update the library. In a future iteration
we may wish to restrict updates to a branch; but specifying a revision
is specifically about _not_ updating. It appears the intent of revision
was to identify what revision was currently in-tree; but that information
should live in the 'origin' section.
Differential Revision: https://phabricator.services.mozilla.com/D75694
Depends on D75896
Includes removing an error code for a function that never fails, and removing
an error return when the function successfully did what it said it would.
Differential Revision: https://phabricator.services.mozilla.com/D78929
The CDM header bump has moved some enums, as well as using enum classes instead
of old style enums. This patch updates consumers of these enums to be compatible
with the new headers.
Drive by remove `using namespace cdm` from a couple of files as
- In some places I'd already been using fully qualified names.
- I prefer the fully qualified names as they make it clear when enums are coming
from the cdm namespace and `cdm::` is not a particularly more verbose thing to
have on identifiers.
Differential Revision: https://phabricator.services.mozilla.com/D78343
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.
Differential Revision: https://phabricator.services.mozilla.com/D77496
With RTX enabled, we have multiple SSRCs associated with a single MID, but the
filter code assumes that only one binding will be present. This change allows
a set of SSRCs to be associated with a MID.
Differential Revision: https://phabricator.services.mozilla.com/D76894
Note that transportId is not implemented and is not a stat but a key back into
the stats report. It identifies the related transport stats object. We don't
have transport stats, so this can not be implemented at the moment.
Differential Revision: https://phabricator.services.mozilla.com/D57116
Since this passes IsConsistent() and data_ is null, capacity_ must be zero,
which implies size_ is zero, and so we attempt to copy zero bytes from a null
pointer. This doesn't seem to crash, but is still undefined behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D76913
The side effect of not filtering on V4L2_CAP_VIDEO_CAPTURE is that every device
is enumerated twice. Because we look up devices by name, and the device that
supports V4L2_CAP_VIDEO_CAPTURE seems to always appear first in /dev/video,
this does not seem to end up with us ever choosing an inappropriate device. We
might get away with just filtering device names from the list, but if the order
of devices ever changed in /dev/video there could be problems.
Differential Revision: https://phabricator.services.mozilla.com/D75593
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.
Differential Revision: https://phabricator.services.mozilla.com/D75376
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.
Differential Revision: https://phabricator.services.mozilla.com/D75375
The current code will only set the TranmissionOffset extension if
capture_time_ms is > 0, but when adjusting timestamps for rtx packets, it is
adjusted without first checking to see if it is valid, which will cause invalid
values of capture_time_ms to be written to TranmissionOffset, leading to assertion
failures.
This bug is still present on tip of libwebrtc, so we'll also need to prepare a
patch for upstream.
Depends on D74842
Differential Revision: https://phabricator.services.mozilla.com/D75528
This imports a few fixes from tip of libwebrtc, which now supports mid, rid
and rrid. The rtx packet is now allocated as max_packet_size_, which is
necessary to have enough capacity for the rrid. It takes the
CopyHeaderAndExtensionsToRtxPacket function from upstream, which omits
copying extensions that should not be copied over, such as rid. It is necessary
to make AllocateExtension and FindExtension public in order for this
function to work.
It then copies the rid from the source packet over to rrid in the rtx packet.
Upstream has code for this as well, but taking it would require more
extensive changes to our copy of libwebrtc. We can drop these local
modifications with the next update.
Differential Revision: https://phabricator.services.mozilla.com/D74840
In order for the SendSideCongestionController to work properly, it needs the
timestamp at which the packets were sent. This is set by calling
Call::OnSentPacket when a packet is sent. Without the sent timestamp, it drops
the estimated available bandwidth so low that only one simulcast stream will
be allocated any bandwidth.
Differential Revision: https://phabricator.services.mozilla.com/D75310
This imports a few fixes from tip of libwebrtc, which now supports mid, rid
and rrid. The rtx packet is now allocated as max_packet_size_, which is
necessary to have enough capacity for the rrid. It takes the
CopyHeaderAndExtensionsToRtxPacket function from upstream, which omits
copying extensions that should not be copied over, such as rid. It is necessary
to make AllocateExtension and FindExtension public in order for this
function to work.
It then copies the rid from the source packet over to rrid in the rtx packet.
Upstream has code for this as well, but taking it would require more
extensive changes to our copy of libwebrtc. We can drop these local
modifications with the next update.
Depends on D74839
Differential Revision: https://phabricator.services.mozilla.com/D74840
Upstream has removed the mode used when use_desktop_relative_cursor_position_
is set to false as well as the associated override of OnMouseCursorPosition,
so the next time we update libwebrtc, this is the behaviour we will have.
Enabling it now fixes cursor display on Linux, which at the moment only works
for some windows.
Depends on D71392
Differential Revision: https://phabricator.services.mozilla.com/D71394
I think inner_window_ was added to handle the fact that window_ may not be
the same as child_window which could throw off the coordinates. Since we made
these modifications, upstream has added the XTranslateCoordinates call that
handles this case, so our local modifications are no longer necessary.
Differential Revision: https://phabricator.services.mozilla.com/D71392
This requires --build-peers-said-large-imports-were-ok since
third_party/rust/mp4parse/src/lib.rs is 113KB. This code is just moving from
media/mp4parse-rust to third_party/rust, so it's not really adding to net code
size.
Differential Revision: https://phabricator.services.mozilla.com/D74488
With rtx enabled, we can't just switch ssrcs when we receive a packet with an
unrecognized ssrc. This changes the ReceiveRTPPacket call to take the entire
rtp header, and then examines the payload type. If the payload type is
associated with rtx or ulpfec, the ssrc will not be changed. This is what is
done by the libwebrtc unsignaled ssrc change code, so this behaviour should
match what Chrome does.
Differential Revision: https://phabricator.services.mozilla.com/D72230
This changes the constructor to not take any parameters for consistency
with how the other parameters are handled. It also fixes serialization, the
current code will output an ascii character rather than the numeric value.
Differential Revision: https://phabricator.services.mozilla.com/D72222
We currently retry sending queries on all failures to write to the socket on
the assumption that write errors represent transient errors. With this change,
we treat EPERM has a permanent error and drop queries if we see it. This is
not a problem when sending answers, as we don't retry in case of errors there,
on the assumption that the other side will retry their query in the future.
We do have code to limit the number of times we attempt an mDNS query, but we
didn't hit it in this case, because it only counts sends that are successful.
Differential Revision: https://phabricator.services.mozilla.com/D73492
JSEP transceivers were previously held in a vector, in the order that they were
created. However, these could be removed, which meant that the indexing was not
stable. Under most circumstances this did not matter, however there was a
wrinkle with implicit rollback in repeated sRD. Re-applying a remote offer that
had created a transceiver would destroy that transceiver, and create a new one
to replace it. However, JS was not informed, because to PeerConnectionImpl it
looked like nothing had changed. Now, transceivers are indexed in a stable way,
which allows this bug to be fixed, and makes things a little less confusing.
Differential Revision: https://phabricator.services.mozilla.com/D70400
JSEP transceivers were previously held in a vector, in the order that they were
created. However, these could be removed, which meant that the indexing was not
stable. Under most circumstances this did not matter, however there was a
wrinkle with implicit rollback in repeated sRD. Re-applying a remote offer that
had created a transceiver would destroy that transceiver, and create a new one
to replace it. However, JS was not informed, because to PeerConnectionImpl it
looked like nothing had changed. Now, transceivers are indexed in a stable way,
which allows this bug to be fixed, and makes things a little less confusing.
Differential Revision: https://phabricator.services.mozilla.com/D70400
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail. As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.
Differential Revision: https://phabricator.services.mozilla.com/D71964
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail. As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.
Differential Revision: https://phabricator.services.mozilla.com/D71964
With transport-cc enabled, we get feedback calls into AudioSendStream occuring
on the sts thread. Since AudioSendStream is constructed on the main thread,
this trips up the worker_thread_checker_ checks. The functions that are called
end up doing their work using AudioCodingModuleImpl::ModifyEncoder, which
takes a lock, so it should be safe to remove these assertions.
We've had to do similar things to ChannelProxy in the past to get stats
working from the sts thread. ChannelProxy has been removed upstream, but we
should consider changing our use of AudioSendStream with the next libwebrtc
update so that is always called from the same thread.
Differential Revision: https://phabricator.services.mozilla.com/D72157
If we're shutting down and mSocketThread is no longer accepting work,
this dispatch can fail. As far as I can see, fully fixing this would
require changes to nsIThread in order to allow checking whether the
thread is shutting down.
Differential Revision: https://phabricator.services.mozilla.com/D71964
Pick commits:
9caa5b1 - Only print the filename when logging (#581)
8a4170a - sun: Line continuation character not needed
9696902 - sun: POLL_TIMEOUT is no longer used
159fb99 - sun: Add my email address to the copyright header.
e3b409f - sun: Refactoring: reduce duplication in stream structure.
36aa8b1 - sun: Make the purpose of some variables clearer.
1654468 - sun: Update header inclusion.
38ef439 - sun: Convert floats to LINEAR32 instead of LINEAR16
4dbacae - Remove test for registering device changed callback twice
7f94e27 - Force Rust builds to always rerun cargo.
3e23b25 - Remove TODO, we've done all of those, or they don't apply anymore
Differential Revision: https://phabricator.services.mozilla.com/D70546
--HG--
extra : moz-landing-system : lando
In rare cases, the random number generator can fail to initialize when
generating a v4 UUID, causing a panic and crash. This adds code to catch that
panic and return a nil (all zeros) UUID instead. Using a nil UUID seems better
from a user privacy perspective than failing to obfuscate the host address and
leaking it when it is expected to be hidden.
Longer term, we might want to switch over to using nsIUUIDGenerator, but that
would require changes to how the socket process is initialized.
Differential Revision: https://phabricator.services.mozilla.com/D70172
--HG--
extra : moz-landing-system : lando
Emptiness of values should be checked using the `empty` method, and not
by comparing the size to 0. Fix such case in the code of
ClearKeyDecryptionManager.cpp module.
Differential Revision: https://phabricator.services.mozilla.com/D70206
--HG--
extra : moz-landing-system : lando
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.
Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.
The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.
DocGroups have also been moved to BrowsingContextGroup.
Depends on D67636
Differential Revision: https://phabricator.services.mozilla.com/D65936
--HG--
extra : moz-landing-system : lando
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.
Depends on D64390
Differential Revision: https://phabricator.services.mozilla.com/D67631
--HG--
extra : moz-landing-system : lando
This patch makes nsIDNSByTypeRecord extend nsIDNSRecord, but implementations
will safely forward the nsIDNSRecord methods to `nullptr`, meaning they will
throw an error when called.
Consumers should try to QI the nsIDNSRecord to nsIDNSByTypeRecord (or any
future types) and use that.
Differential Revision: https://phabricator.services.mozilla.com/D69326
--HG--
extra : moz-landing-system : lando
TRACE_AUDIO_CALLBACK() and TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...) log to a hardcoded thread id number. This creates confusion when more than one MTG is running because logs from different threads are depicted to the same thread line and overlapping each other. Those logging commands have been removed and the TRACE* command is used that it logs per thread-id.
Differential Revision: https://phabricator.services.mozilla.com/D69031
--HG--
extra : moz-landing-system : lando
There is no need to use the Git repository, its only change compared to 0.1.6
is that some random tidbit has been fixed in the README file.
Depends on D69805
Differential Revision: https://phabricator.services.mozilla.com/D69806
--HG--
extra : moz-landing-system : lando
Mostly a matter of:
rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'
And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).
Differential Revision: https://phabricator.services.mozilla.com/D69828
--HG--
extra : moz-landing-system : lando
Mostly a matter of:
rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'
And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).
Differential Revision: https://phabricator.services.mozilla.com/D69828
--HG--
extra : moz-landing-system : lando
This change includes support to negotiate the transport-wide-cc RTP extension
needed to enable sender side bandwidth estimation in WebRTC. When this
extension is supported in both sides during the Offer/Answer negotiation the
transport_cc mode is enabled in the WebRTC engine so that this mode is used
instead of the legacy receiver-side (REMB based) mechanism.
The change is inspired on this fork by medooze team:
https://github.com/medooze/gecko-dev/pull/2/files
Co-authored-by: ggarber <gustavogb@gmail.com>
Differential Revision: https://phabricator.services.mozilla.com/D68734
--HG--
extra : moz-landing-system : lando
Also update the update-rust.sh script in a couple ways:
- Stop copying the source for mp4parse_fallible into the tree; use crates.io
- Include submodules in mp4parse-rust checkout; needed for tests
- Exclude unnecessary build.rs from mp4parse_fallible, it was causing problems
- Update mp4rust_capi/Cargo.toml patch to exclude cdylib. It's only necessary for test_ffi and causes build problems otherwise
Differential Revision: https://phabricator.services.mozilla.com/D68139
--HG--
extra : moz-landing-system : lando
This essentially implements the "queue a task" step required by the spec, which
ensures that if JS checks stats multiple times without relinquishing the event
loop, it will see the same thing each time.
Differential Revision: https://phabricator.services.mozilla.com/D64468
--HG--
extra : moz-landing-system : lando
Primarily, this removes code that was compensating for inconsistencies between webrtc.org's timestamps, and JS timestamps. Also, this removes a few bits of indirection on GetRtpSources; that's all going to go directly to RTCRtpReceiver now. None of this code is being moved elsewhere.
Depends on D50395
Differential Revision: https://phabricator.services.mozilla.com/D64234
--HG--
extra : moz-landing-system : lando
This means we won't have to re-implement all of our JSImpl workarounds in c++.
Also, rename a variable in a way that made it easier to read this code.
Differential Revision: https://phabricator.services.mozilla.com/D50395
--HG--
extra : moz-landing-system : lando
This essentially implements the "queue a task" step required by the spec, which
ensures that if JS checks stats multiple times without relinquishing the event
loop, it will see the same thing each time.
Differential Revision: https://phabricator.services.mozilla.com/D64468
--HG--
extra : moz-landing-system : lando
Primarily, this removes code that was compensating for inconsistencies between webrtc.org's timestamps, and JS timestamps. Also, this removes a few bits of indirection on GetRtpSources; that's all going to go directly to RTCRtpReceiver now. None of this code is being moved elsewhere.
Depends on D50395
Differential Revision: https://phabricator.services.mozilla.com/D64234
--HG--
extra : moz-landing-system : lando
This means we won't have to re-implement all of our JSImpl workarounds in c++.
Also, rename a variable in a way that made it easier to read this code.
Differential Revision: https://phabricator.services.mozilla.com/D50395
--HG--
extra : moz-landing-system : lando
We're seeing what looks like occasional late callbacks in
VideoCaptureImpl::DeliverCapturedFrame on OS X. When we call stopCapture, it in
turns calls directOutputToNil which should cause any newly capture frames to be
dropped. It is not clear from the existing code or the documentation what would
happen to any frames which are already enqueued. It looks like it is possible
for frames to be delivered on the old queue, which would explain late callbacks.
Differential Revision: https://phabricator.services.mozilla.com/D67486
--HG--
extra : moz-landing-system : lando