Commit Graph

7075 Commits

Author SHA1 Message Date
Dan Minor
2507ef392a Bug 1554976 - Move thread assertion inside if statement in OnLookupComplete; r=mjf
Checking this assertion outside of the if statement can result in
a use-after-free in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D42152

--HG--
extra : moz-landing-system : lando
2019-08-28 13:12:13 +00:00
Dan Minor
c3d8942d0f Bug 1554976 - Make mDNS service a singleton; r=mjf
The current code causes one mDNS service to be created for each PeerConnection.
Due to Bug 1569311, the services persist until shutdown, which can lead to a
lot of mDNS threads running on sites which use WebRTC for fingerprinting. This
change makes it so we start at most one mDNS service.

I've filed Bug 1569955 to look at shutting down the mDNS service after the
last hostname is unregistered. As an alternative, if we fix Bug 1569311, we
could also use refcounting and stop the mDNS service after the last
StunAddrsRequestParent is freed.

Differential Revision: https://phabricator.services.mozilla.com/D42151

--HG--
extra : moz-landing-system : lando
2019-08-28 13:12:01 +00:00
Dan Minor
d54770d4a5 Bug 1554976 - Use mdns_service to generate UUIDs; r=mjf
With the move to the socket process, the UUID service is no longer available
in nricectx. This adds a pair of helper functions to mdns_service to generate
UUIDs and uses them to generate hostnames inside nricectx.

Differential Revision: https://phabricator.services.mozilla.com/D42150

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:49 +00:00
Dan Minor
b07a76f4bd Bug 1554976 - Obfuscate default rtp and rtcp candidates if required; r=ng
The default RTP candidate is used to populate the c= line in SDP. Rather than
using the mDNS address, which sipcc can not parse, we use 0.0.0.0:9, which is
what Chromium has chosen as well [1].

For RTCP, the mDNS obfuscated address is used.

[1] https://webrtc.googlesource.com/src.git/+/3ae59d33a310280e2f21ed4c53849950171e48e8

Differential Revision: https://phabricator.services.mozilla.com/D38498

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:42 +00:00
Dan Minor
2da923ff0b Bug 1554976 - Add plumbing to enable/disable host address obfuscation; r=mjf
This only enables mDNS on OS X for now. Some versions of Windows lack mDNS
support, there are some oddities with resolving IPv6 addresses on Linux, and
Android has not yet been tested. All of these will be addressed in follow on
bugs.

Differential Revision: https://phabricator.services.mozilla.com/D38496

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:33 +00:00
Dan Minor
d467f3a90a Bug 1554976 - Register mDNS hostname if required; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38495

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:24 +00:00
Dan Minor
717793ab02 Bug 1554976 - Copy actual address to CandidateInfo in MediaTransportHandler; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38494

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:20 +00:00
Dan Minor
9fa62a0a55 Bug 1554976 - Generate mDNS addresses in nricectx; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38493

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:14 +00:00
Dan Minor
6803a86c10 Bug 1554976 - Add methods to register/unregister mDNS hostnames to StunAddrsRequestParent; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D38492

--HG--
extra : moz-landing-system : lando
2019-08-28 13:11:11 +00:00
Dan Minor
a17af56ba5 Bug 1554976 - Add rust mdns library to mtransport; r=ng,dragana
This adds a mdns_service to mtransport to handle responding to mDNS queries.
All hostnames will be generated from UUIDs, so the responder assumes that it
is the only responder for a hostname which is registered with it. Because of
this, the responder does not first make a DNS query itself to see if any other
responder is handling a hostname, and does not wait a random amount of time
before replying, both of which are required by the specification to avoid
collisions with other responders.

Differential Revision: https://phabricator.services.mozilla.com/D38489

--HG--
extra : moz-landing-system : lando
2019-08-28 13:09:59 +00:00
Kershaw Chang
5018d39958 Bug 1571987 - Forward proxy check request to parent process r=dragana,bwc
Differential Revision: https://phabricator.services.mozilla.com/D41004

--HG--
extra : moz-landing-system : lando
2019-08-24 05:37:00 +00:00
Sylvestre Ledru
d264b841c9 Bug 1576502 - Fix some wording issues r=mhoye
Differential Revision: https://phabricator.services.mozilla.com/D43363

--HG--
extra : moz-landing-system : lando
2019-08-27 15:38:58 +00:00
Paul Adenot
c23f8dcae9 Bug 1576168 - Update audio_thread_priority to 0.19.1. r=pehrsons
This changes the hard-limit of `RLIMIT_RTTIME` to be the maximum available
(200ms on my system), and keep the soft limit to the same number.

Having different numbers allow catching SIGXCPU before getting SIGKILL.

Differential Revision: https://phabricator.services.mozilla.com/D43402

--HG--
extra : moz-landing-system : lando
2019-08-27 08:00:36 +00:00
Dan Minor
1555cd2006 Bug 1570548 - Check if mDecoder is null in WebrtcMediaDataDecoder::Release; r=bryce
In InitDecode it is possible for mDecoder to be null if the CreateDecoder call
fails, in which case an error code is returned. Release is called by
GenericDecoder::~VCMGenericDecoder regardless of whether InitDecode succeeds, so
we need to check if mDecoder is null in Release.

Differential Revision: https://phabricator.services.mozilla.com/D43469

--HG--
extra : moz-landing-system : lando
2019-08-26 17:50:46 +00:00
Coroiu Cristina
38d7f20baa Backed out 2 changesets (bug 1576168) for build bustages on a CLOSED TREE
Backed out changeset 3ea6795200b1 (bug 1576168)
Backed out changeset 4e8fc76cd529 (bug 1576168)
2019-08-26 19:46:38 +03:00
Paul Adenot
1029a3ce04 Bug 1576168 - Update audio_thread_priority to 0.19.0. r=pehrsons
This changes the hard-limit of `RLIMIT_RTTIME` to be the maximum available
(200ms on my system), and keep the soft limit to the same number.

Having different numbers allow catching SIGXCPU before getting SIGKILL.

Differential Revision: https://phabricator.services.mozilla.com/D43402

--HG--
extra : moz-landing-system : lando
2019-08-26 14:20:22 +00:00
Dan Minor
7c3097eb13 Bug 1565800 - Use local copy of _captureCapability in OnIncomingFrame; r=jolin
In OnIncomingFrame() we check if the capture has started by calling
CaptureStarted() which holds a lock. If StopCapture() is called on the
control thread after we check CaptureStarted() it is possible that
_captureCapability will be zeroed out prior to frame being delivered because
the lock has been released. This would result in an unknown video type in
CalcBufferSize() and trigger an assertion there. This creates a local copy of
_captureCapability with the lock held to ensure it is not zeroed out when the
frame is delivered.

Differential Revision: https://phabricator.services.mozilla.com/D42338

--HG--
extra : moz-landing-system : lando
2019-08-21 15:52:31 +00:00
Tijl Coosemans
9c3421dfef Bug 1575876 - Drop header unused on FreeBSD that breaks with new libc++. r=bwc
--HG--
extra : histedit_source : ef16b712dcd62120d01b902a5f734a8163c907a3
2019-08-24 01:38:05 +03:00
Matthew Gregan
36165906fe Bug 1575679 - Update libnestegg to pick up PR 65. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D42966

--HG--
extra : moz-landing-system : lando
2019-08-21 21:50:42 +00:00
Ryan Alderete
4b595ec1a8 Bug 1570158 - Add proxy information to candidates table in about:webrtc r=bwc,baku
This adds a field to about:webrtc which indicates whether an associated
candidate is behind a proxy or not.

Differential Revision: https://phabricator.services.mozilla.com/D39974

--HG--
extra : moz-landing-system : lando
2019-08-21 10:04:45 +00:00
Ryan Alderete
dccf61abe4 Bug 1574512 - Fix error handling in nr_ice_set_target_for_default_local_address_lookup() r=bwc
If the remote IP address and port number are unable to be converted to a
transport address, the context was incorrectly left with a pointer to zeroed
out memory, which causes nr_ice_get_default_local_address() to abort.  Freeing
the address and setting the pointer to null on failure should allow the
fallback to be used to retrieve the default local address.

Differential Revision: https://phabricator.services.mozilla.com/D42661

--HG--
extra : moz-landing-system : lando
2019-08-20 15:46:59 +00:00
Alastor Wu
0e392d0f13 Bug 1568101 - part7 : rename 'MediaDataDecoderCodec' to 'MediaDataCodec'. r=jolin
As this class is not only used for creating decoder, also for encoder, it's more proper to rename it as `MediaDataCodec`.

Differential Revision: https://phabricator.services.mozilla.com/D41443

--HG--
rename : media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp => media/webrtc/signaling/src/media-conduit/MediaDataCodec.cpp
rename : media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.h => media/webrtc/signaling/src/media-conduit/MediaDataCodec.h
extra : moz-landing-system : lando
2019-08-19 08:03:55 +00:00
Alastor Wu
e0241d05dc Bug 1568101 - part6 : set bitrate. r=jolin
Use `BitrateAdjuster` to calculate bitrate and prevent to set bitrate too often, because certain hardware encoders tend to consistently overshoot the bitrate that they are configured to encode at.

Differential Revision: https://phabricator.services.mozilla.com/D40533

--HG--
extra : moz-landing-system : lando
2019-08-19 07:34:08 +00:00
Alastor Wu
9bd4a96457 Bug 1568101 - part5 : implement encoding. r=jolin,jya
In order to encode video frame, we have to convert `webrtc::VideoFrame` to gecko's video data, and then send this YUV-based video data to the encoder.

The encoder won't return an encoded frame everytime when we call its `encode()`, so we have to wait until there are valid samples added to `mEncodedFrames`.

Then, convert the `MediaRawData` to `webrtc::EncodedImage` and provide an NAL entries list to indicate where the NALs are in the encoded bytes stream and how large they are. We would send those data back
to the consumer of the encoder via calling a callback function `OnEncodedImage()`.

Differential Revision: https://phabricator.services.mozilla.com/D40532

--HG--
extra : moz-landing-system : lando
2019-08-20 07:41:33 +00:00
Alastor Wu
86b6cfa0eb Bug 1568101 - part4 : implement a generic refcounting encoder interface. r=jya
`RefCountedWebrtcVideoEncoder` is a generic interface which supports refcounting, using that can ensure the encoder is always alive even if using it in an async task.

So now both `WebrtcGmpVideoEncoder` and `WebrtcMediaDataEncoder` would inherit from `RefCountedWebrtcVideoEncoder`.
We can use `WebrtcVideoEncoderProxy` to wrap them and return `WebrtcVideoEncoderProxy` for the use in the WebRTC pineline.

Differential Revision: https://phabricator.services.mozilla.com/D41855

--HG--
extra : moz-landing-system : lando
2019-08-19 08:03:15 +00:00
Alastor Wu
c636eac2d6 Bug 1568101 - part3 : implement initializing and releasing encoder. r=jolin
In this patch, we implement how to create a platform encoder, init an encoder and release it when we don't need it anymore.

In addition, as the encoder factory only supports h264 for now, so all configuration related to encoder would be h264 specific.

Differential Revision: https://phabricator.services.mozilla.com/D40531

--HG--
extra : moz-landing-system : lando
2019-08-19 07:52:11 +00:00
Alastor Wu
58ec457e76 Bug 1568101 - part2 : use a static pref to control the feature. r=jolin
Use a static pref to control this feature and turn it off by default.

Differential Revision: https://phabricator.services.mozilla.com/D40530

--HG--
extra : moz-landing-system : lando
2019-08-08 23:38:21 +00:00
Alastor Wu
9fd259ee61 Bug 1568101 - part1 : implement a basic interface for WebrtcMediaDataEncoderCodec. r=jolin
Implement a basic interface for `WebrtcMediaDataEncoder`, which will only be used on OSX for encoding h264 only.

Differential Revision: https://phabricator.services.mozilla.com/D40529

--HG--
extra : moz-landing-system : lando
2019-08-09 20:58:06 +00:00
Andreas Pehrson
49244b4fad Bug 1571705 - Clarify mInputStream guarantees in MediaStreamTrack. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D41508

--HG--
extra : moz-landing-system : lando
2019-08-19 19:26:25 +00:00
Paul Adenot
5366291789 Bug 1574914 - Bump audio_thread_priority to 0.18. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D42504

--HG--
extra : moz-landing-system : lando
2019-08-19 13:50:08 +00:00
Simon Sapin
c65755ac41 Bug 1568540 - Update the url crate to 2.0 r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42364

--HG--
extra : moz-landing-system : lando
2019-08-17 16:26:27 +00:00
Chun-Min Chang
4c2709e357 Bug 1574644 - Update cubeb-coreaudio-rs to version 71faddb. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D42382

--HG--
extra : moz-landing-system : lando
2019-08-16 22:20:30 +00:00
Mike Hommey
c53b03de07 Bug 1572986 - Link libmozavutil against libatomic when needed. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D41483

--HG--
extra : moz-landing-system : lando
2019-08-12 16:47:40 +00:00
Sylvestre Ledru
645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Tom Schuster
2c4cb96468 Bug 1558915 - Use infallible nsIURI::SchemeIs everywhere. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D41367

--HG--
extra : moz-landing-system : lando
2019-08-09 15:17:06 +00:00
Andreas Pehrson
50628ddd24 Bug 1570673 - Add an active state to VideoFrameConverter and propagate it from MediaPipeline. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D40598

--HG--
extra : moz-landing-system : lando
2019-08-05 18:00:48 +00:00
Kershaw Chang
18d3f24206 Bug 1570950 - Make sure the IPC channel is closed before destroying r=jld
The stack from crash report suggests that ChildImpl was deleted at the end of function GetOrCreateSocketActorForCurrentThread(). This only happens when SendInitBackground failed, so we have to close the IPC channel before ChildImpl getting destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D40838

--HG--
extra : moz-landing-system : lando
2019-08-06 21:17:40 +00:00
Nicholas Nethercote
2bdd4bbfd0 Bug 1570212 - Convert media.webrtc.net.force_disable_rtcp_reception to a static pref. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D40154

--HG--
extra : moz-landing-system : lando
2019-08-02 12:33:17 +00:00
Ryan Alderete
41872c8747 Bug 1452713 - Update webRTCIPHandlingPolicy to match Chrome r=bwc,mixedpuppy
Previously, the network.webRTCIPHandlingPolicy "disable_non_proxied_udp" only
enabled the use of WebRTC if a proxy was configured and the WebRTC service
supported TURN TCP.

This aims to match Chrome's behavior by forcing the use of a proxy if one is
configured, otherwise falling back to mode 3 (no host candidates and default
route only).

Also, remove some dead code left over from the old way of routing TURN
communications through an HTTP proxy.

Differential Revision: https://phabricator.services.mozilla.com/D37892

--HG--
extra : moz-landing-system : lando
2019-08-02 21:33:46 +00:00
Chun-Min Chang
817f6f88f6 Bug 1570446 - P2: Update cubeb-coreaudio-rs to version ee0f981. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D39979

--HG--
extra : moz-landing-system : lando
2019-08-02 18:29:37 +00:00
Chun-Min Chang
f29bfc124d Bug 1570446 - P1: Update script importing cubeb-coreaudio-rs to gecko. r=padenot
- Don't import the build settings since the settings in gecko is more
complicated.
- Print out the picked commits when running the scripts

Differential Revision: https://phabricator.services.mozilla.com/D40097

--HG--
extra : moz-landing-system : lando
2019-08-02 18:29:25 +00:00
Paul Adenot
6e399961ed Bug 1570948 - Bump audio_thread_priority to 0.17. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D40410

--HG--
extra : moz-landing-system : lando
2019-08-02 12:44:33 +00:00
Dan Minor
97c5db53eb Bug 1561923 - Remove expired WebRTC telemetry; r=drno,bwc
Differential Revision: https://phabricator.services.mozilla.com/D37757

--HG--
extra : moz-landing-system : lando
2019-07-31 19:57:55 +00:00
Andreas Pehrson
4b3fa9c67e Bug 1493613 - Move MediaStream control from DOMMediaStream to MediaStreamTrack. r=padenot
This is inherently large, because modifying these bits of DOMMediaStream and
MediaStreamTrack affects all consumers and producers of all DOMMediaStreams and
MediaStreamTracks.

Things are generally much simpler now.

Producers of tracks now create a MediaStream in the graph, add it to a
MediaStreamTrackSource subclass that takes ownership of it, and add the source
to a MediaStreamTrack. Should the producer need a DOMMediaStream it is now much
simpler to create as the only thing needed is the current window. The stream is
a rather simple wrapper around an array of MediaStreamTracks.

HTMLMediaElement is still not as straight forward as other consumers since it
consumes the DOMMediaStream directly, as opposed to a set of tracks.
The new MediaStreamRenderer helper class helps bridge the gap between this fact
and the new track-based MediaStreamGraph interface, as it needs to juggle
registering multiple audio tracks for audio output. This hooks into existing
HTMLMediaElement logic and brings a welcome simplification to all the glue
previously needed there.

Differential Revision: https://phabricator.services.mozilla.com/D37934

--HG--
extra : moz-landing-system : lando
2019-07-31 07:58:17 +00:00
Andreas Pehrson
719dfe4ede Bug 1493613 - Update muted state through MediaStreamTrackSource. r=bwc,smaug
This ensures all clones of the original track also receives the new muted state.

Differential Revision: https://phabricator.services.mozilla.com/D37933

--HG--
extra : moz-landing-system : lando
2019-07-31 09:35:06 +00:00
Nicholas Nethercote
cd426e3ad2 Bug 1569526 - Remove return values from Add*VarCache(). r=KrisWright
They're infallible in practice and always `NS_OK`. (This stems from
`AddVarCacheNoAssignment()` always returning `NS_OK`.)

As a result, the commit removes lots of unnecessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D39804

--HG--
extra : moz-landing-system : lando
2019-07-30 06:19:46 +00:00
Matthew Gregan
536af4fbf3 Bug 1569460 - Update AudioIPC to f6f56c43. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D39802

--HG--
extra : moz-landing-system : lando
2019-07-29 23:17:56 +00:00
Andrea Marchesini
cef26c06c6 Bug 1567892 - PeerConnectionMedia should use nsIProtocolProxyService on the parent process - PProxyConfigLookup IPC protocol, r=bwc,kershaw,jld
Differential Revision: https://phabricator.services.mozilla.com/D39010

--HG--
extra : moz-landing-system : lando
2019-07-29 12:27:59 +00:00
Mike Hommey
7acef03e16 Bug 1569331 - Use the more traditional way to override dependencies for coreaudio-sys. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39579

--HG--
extra : moz-landing-system : lando
2019-07-27 00:35:09 +00:00
Matthew Gregan
e0fdf04539 Bug 1569090 - Update audioipc to 177ebd96. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D39453

--HG--
rename : media/audioipc/audioipc/src/async.rs => media/audioipc/audioipc/src/async_msg.rs
extra : moz-landing-system : lando
2019-07-27 13:14:23 +00:00