Commit Graph

3512 Commits

Author SHA1 Message Date
Nico Grunbaum
f81beba455 Bug 1611486 - P2 - Cherry-pick webrct desktop sharing X hang fixes;r=dminor
c380e97ee6

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

--HG--
extra : moz-landing-system : lando
2020-01-30 05:26:08 +00:00
Nico Grunbaum
6a8f257529 Bug 1611486 - P1 - Cherry-pick webrct desktop sharing X hang fixes;r=dminor
4b47dd39a7

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

--HG--
extra : moz-landing-system : lando
2020-01-30 05:47:41 +00:00
Bogdan Tara
f1e0a083bc Backed out 2 changesets (bug 1611486) for bustages complaining about mouse_cursor_monitor.h and desktop_and_cursor_composer.h CLOSED TREE
Backed out changeset 881eb2c2d312 (bug 1611486)
Backed out changeset 50c7ba45875b (bug 1611486)
2020-01-28 00:48:40 +02:00
Nico Grunbaum
b76919a7e5 Bug 1611486 - P2 - Cherry-pick webrct desktop sharing X hang fixes;r=dminor
c380e97ee6

Depends on D61000

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

--HG--
extra : moz-landing-system : lando
2020-01-24 18:52:30 +00:00
Nico Grunbaum
0f2770c78b Bug 1611486 - P1 - Cherry-pick webrct desktop sharing X hang fixes;r=dminor
4b47dd39a7

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

--HG--
extra : moz-landing-system : lando
2020-01-24 19:01:49 +00:00
Dan Minor
e5395de882 Bug 1607205 - Reset RtcpEventObserver when deleting channels; r=ng
Holding a RefPtr to this in OnRtcpBye should keep the VideoConduit alive until
the callback completes. If this is not happening, it is likely that we're
racing with the destructor on the other thread. Clearing the callback early
will prevent this. This should not affect the VideoConduit because in that case
the callback is directly part of the receive stream, not attached to a channel.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 19:55:13 +00:00
Jan-Ivar Bruaroey
f79191282b Bug 1598543 - Cleanup upstream constants to also use size instead of length. r=dminor
Depends on D58144

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

--HG--
extra : moz-landing-system : lando
2020-01-21 21:59:35 +00:00
Coroiu Cristina
73c0827187 Backed out 2 changesets (bug 1322095) for build bustage at dist/include/mtransport/runnable_utils.h on a CLOSED TREE
Backed out changeset 14e115ba7f12 (bug 1322095)
Backed out changeset 078c0fe497b7 (bug 1322095)
2020-01-23 19:50:51 +02:00
Eric Rahm
e120eee6b8 Bug 1322095 - Part 1b: Update callbacks to support moved args and convert nsAutoPtr usage. r=jya
In order to support the update to move args when invoking callbacks we:
 - Convert anything that was using WrapRunnable with `nsAutoPtr` to `UniquePtr`
 - Convert anything that was using a non-const ref as a param to either a
   const ref or a by-val copy

Addtionally we convert the remaining `nsAutoPtr` usage to `UniquePtr`.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 17:38:18 +00:00
Ciure Andrei
130717e496 Backed out 16 changesets (bug 1591199) for causing mda failures CLOSED TREE
Backed out changeset cd44655b2740 (bug 1591199)
Backed out changeset a67f2a68965d (bug 1591199)
Backed out changeset 9ae196dc62b9 (bug 1591199)
Backed out changeset dc0ab0642f92 (bug 1591199)
Backed out changeset 96091b875760 (bug 1591199)
Backed out changeset 5811f7b48aee (bug 1591199)
Backed out changeset 8ba6518dfd42 (bug 1591199)
Backed out changeset ac47d18c085c (bug 1591199)
Backed out changeset 897e8de078fa (bug 1591199)
Backed out changeset 3bc58d0f0b35 (bug 1591199)
Backed out changeset 55a69e5443ab (bug 1591199)
Backed out changeset 4973bd5df42d (bug 1591199)
Backed out changeset 48bfe1c627e1 (bug 1591199)
Backed out changeset a1a1f71b91fc (bug 1591199)
Backed out changeset 447c8b096f5a (bug 1591199)
Backed out changeset 7e67ac9f5591 (bug 1591199)
2020-01-23 07:54:16 +02:00
Byron Campen [:bwc]
c035458265 Bug 1591199: Don't assert when a candidate is gathered for a transceiver that is not associated, since that can happen in certain rollback scenarios. r=mjf
Depends on D60308

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

--HG--
extra : moz-landing-system : lando
2020-01-22 02:49:47 +00:00
Byron Campen [:bwc]
3a032d2e6e Bug 1591199: Fix a race where sRD(offer) could mute a track, then an RTP packet could arrive that unmutes it before negotiation completed, this time without needing to stop the conduit and send a bunch of extra RTCP BYEs. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D59521

--HG--
extra : moz-landing-system : lando
2020-01-17 20:42:31 +00:00
Byron Campen [:bwc]
38683c83e0 Bug 1591199: Use correct time-base for rtcp stats comparison. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D59519

--HG--
extra : moz-landing-system : lando
2020-01-17 20:42:19 +00:00
Byron Campen [:bwc]
ef05245396 Bug 1591199: Reduce redundant code. r=mjf,smaug
Differential Revision: https://phabricator.services.mozilla.com/D56404

--HG--
extra : moz-landing-system : lando
2020-01-22 13:34:52 +00:00
Byron Campen [:bwc]
684cbd078e Bug 1591199: Queue updates to pending/current descriptions. r=mjf,jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D56403

--HG--
extra : moz-landing-system : lando
2020-01-22 13:34:14 +00:00
Byron Campen [:bwc]
c8592cdfc2 Bug 1591199: Task queueing fixes in c++ r=jib
Differential Revision: https://phabricator.services.mozilla.com/D56395

--HG--
extra : moz-landing-system : lando
2020-01-17 20:40:13 +00:00
Cosmin Sabou
3c58f21e22 Backed out changeset f117d9332a08 (bug 1607205) for causing gtest crashes. 2020-01-22 20:12:54 +02:00
Dan Minor
30ead31cc6 Bug 1607205 - Reset RtcpEventObserver when deleting receive stream; r=ng
Holding a RefPtr to this in OnRtcpBye should keep the VideoConduit alive until
the callback completes. If this is not happening, it is likely that we're
racing with the destructor on the other thread. Clearing the callback early
will prevent this. This should not affect the VideoConduit because in that case
the callback is directly part of the receive stream, not attached to a channel.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 16:06:28 +00:00
Jan-Ivar Bruaroey
85c420c220 Bug 1547106: Throw OperationError in createDataChannel() if id in use. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D60569

--HG--
extra : moz-landing-system : lando
2020-01-22 14:20:26 +00:00
Alex Chronopoulos
53c369d992 Bug 1608877 - Ignore async transmission start if a new stop has arrived. r=padenot
In `MediaPipelineTransmit::SetTrack()` when a track of different MTG is replaced, the transmission is stopped and restarted asynchronously. This can create a problem if a new stop has arrived in the meantime. The transmission should not be restarted in that case.

This change adds a boolean, to check when an asynchronous start is expected and ignores it if not needed.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:23:43 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Dan Minor
65d8a501e7 Bug 1605815 - Defer registering hostnames until StartIceChecks; r=mjf
Currently we register mDNS hostnames when we gather the local interfaces. By
waiting until StartIceChecks is called, it is less likely that we will end up
starting the mdns_service for a site which is not using WebRTC for
communication. This is more efficient, and avoids surprises like triggering
the Windows Firewall dialog for sites which are using WebRTC to gather local
IP addresses.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 23:05:25 +00:00
Aaron Klotz
62c88b3762 Bug 1608577: Part 2 - Remove |using namespace mozilla::java| from webrtc; r=bwc
Depends on D59796

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

--HG--
extra : moz-landing-system : lando
2020-01-14 14:32:03 +00:00
Dan Minor
4e67f4e69b Bug 1547354 - Hold mMutex during stats calls; r=ng
We did this for the VideoConduit in Bug 1404992, but not for the AudioConduit
because of the ongoing webrtc.org upstream merge.

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

--HG--
extra : moz-landing-system : lando
2020-01-10 15:08:04 +00:00
Sylvestre Ledru
c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Dan Minor
cf2f3f94a1 Bug 1607579 - Add pref to disable mute on RTCP bye or timeout; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D59163

--HG--
extra : moz-landing-system : lando
2020-01-08 19:07:46 +00:00
Dan Minor
fad95a456d Bug 1604497 - Avoid division by zero in I420Buffer::CropAndScaleFrom; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D58150

--HG--
extra : moz-landing-system : lando
2019-12-24 19:45:51 +00:00
John Lin
28491d1c76 Bug 1599799 - p2: discard frame when callback is invalid. r=jya
Client of WebrtcMediaDataEncoder unregisters callback before calling
Shutdown(). When a pending encode promise gets resolved after that,
it will cause null pointer error.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 12:00:34 +00:00
Dan Minor
b375bb6973 Bug 1605419 - Use GetDocumentURI instead of GetDocBaseURI for hostname obfuscation whitelist; r=jib
Differential Revision: https://phabricator.services.mozilla.com/D58040

--HG--
extra : moz-landing-system : lando
2019-12-23 11:10:16 +00:00
Dan Minor
d0477ca760 Bug 1595479 - Remove unnecessary StartTransmitting from ConfigureSendMediaCodec; r=ng
We don't need to start transmitting until the transceiver asks us to. Doing
this early leads to creating and tearing down an audio send stream
unnecessarily, generating extra RTCP byes. These changes make the behaviour
consistent with the VideoConduit version.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 20:55:54 +00:00
Dan Minor
34ce54c77a Bug 1595479 - Remove unnecessary cast from UpdateConduitRtpExtmap; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D57863

--HG--
extra : moz-landing-system : lando
2019-12-20 20:55:26 +00:00
Dan Minor
d67ce316c5 Bug 1595479 - Call Stop as part of Transceiver shutdown; r=ng
This consolidates the shutdown code and ensures that an RTCP bye is sent
as part of tearing down a PeerConnection.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 20:55:03 +00:00
Dan Minor
f50ddd24b2 Bug 1595479 - Add RtcpEventObserver to Conduits and Transceiver; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D57860

--HG--
extra : moz-landing-system : lando
2019-12-20 20:54:35 +00:00
Dan Minor
0cd4afab2d Bug 1595479 - Plumb RtcpEventObserver through Channel and VideoReceiveStream; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D57859

--HG--
extra : moz-landing-system : lando
2019-12-20 20:53:56 +00:00
Dan Minor
f3e464071c Bug 1595479 - Add RtcpEventObserver to RtcpReceiver; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D57858

--HG--
extra : moz-landing-system : lando
2019-12-20 20:53:19 +00:00
Nico Grunbaum
8ef8e3598b Bug 1602739 - P2 - make opaque stats IDs in PeerConnectionImpl;r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D57949

--HG--
extra : moz-landing-system : lando
2019-12-20 20:20:34 +00:00
Nico Grunbaum
271de92265 Bug 1602739 - P1 - Add stats ID generator;r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D57948

--HG--
extra : moz-landing-system : lando
2019-12-20 20:41:21 +00:00
Alex Chronopoulos
1bb4949d41 Bug 1604746 - Start the pipeline after stopping to avoid thread races. r=padenot
With tracks in different MTGs we risk of having thread races if we stop and start immediatelly. Previously, stoping and starting was happenign to the same MTG so this problem did not exist. This change wires a promise in the `MediaTrack::RemoveListener` method and perform the start when that step has been completed.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 17:03:42 +00:00
Alex Chronopoulos
59fb3dc5da Bug 1604746 - Recreate the send track in the MTG of the provided track if they belong to different MTGs. r=padenot
In `MediaPipelineTransmit::SetTrack()` the provided `MediaStreamTrack` connects to the existing send-track. This step crashes if the two tracks belong to different MTGs. With this change, when the two tracks belong to different MTGs, the existing send-track is stopped and deleted and a new send-track is created in the same MTG with the provided `MediaStreamTrack`.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 15:13:56 +00:00
Michael Froman
762801c6fa Bug 1548318 - pt 2 - fix a typo in PeerConnectionMedia::FlushIceCtxOperationQueueIfReady. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D56814

--HG--
extra : moz-landing-system : lando
2019-12-18 18:47:34 +00:00
Michael Froman
21bf0d2c35 Bug 1548318 - pt 1 - get new local addrs when gathering ICE candidates after ICE restart. r=bwc
- Convert to a StunAddrRequestState enum so there is now a pending state,
    rather than just done/not done.  This is to make sure we don't have
    multiple stun addrs requests in flight at the same time.
  - Reset the stun addrs in PeerConnectionMedia from PeerConnectionImpl when
    PeerConnectionImpl::SetSignalingState_m detects ICE restart in an offer.
  - GatherIfReady will now request new stun addrs if none are available.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 15:19:11 +00:00
Nico Grunbaum
76dcc2f02b Bug 1601561 - Move parser names to static functions.;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D57131

--HG--
extra : moz-landing-system : lando
2019-12-16 14:07:13 +00:00
Byron Campen [:bwc]
3ec709712b Bug 1408256: Fix bug where renegotiation would un-set a previously negotiated max-fs. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D55890

--HG--
extra : moz-landing-system : lando
2019-12-17 19:45:00 +00:00
Byron Campen [:bwc]
d4420e0bb9 Bug 1408256: Tests for bug. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D55889

--HG--
extra : moz-landing-system : lando
2019-12-17 19:19:01 +00:00
Dan Minor
e3b31c2c02 Bug 1603790 - Only add unobfuscated addresses to mSignaledAddresses; r=mjf
We should only add a hostname to mSignaledAddresses if it is not obfuscated.
Prior to Bug 1567201 this was handled by an early exit in
MediaTransportHandlerSTS::AddIceCandidate if the address was obfuscated.
With the changes in Bug 1567201, that early exit went away and we're now adding
all addresses to mSignaledAddresses which breaks hiding prflx and srflx
addresses. Unfortunately, this is not something that easily unit testable.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 21:05:46 +00:00
Nico Grunbaum
2cfc1ded7d Bug 1598923 - Fix known WEBRTCSDP issues blocking parallel parsing mode in Nightly;r=drno
Bug 1598923 - P1 - Remove use of description API and use format in SDP rust to C bindings;r?drno

Bug 1598923 - P2 - Add pref to select strictness of SDP parsing success;r?drno

Bug 1598923 - P3 - Update to WEBRTC-SDP 0.3.2;r?drno

Bug 1598923 - P4 - update to WEBRTC-SDP 0.3.3;r?mjf

Bug 1598923 - P5 - Adapt channel handling to WEBRTC-SDP changes;r?mjf

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

--HG--
extra : moz-landing-system : lando
2019-12-13 08:17:16 +00:00
Jeff Walden
e57173377f Bug 1439659 - Make |MOZ_{LITTLE,BIG}_ENDIAN| into function macros so that invoking them inside |#if| conditions when they haven't been defined yet is a compile error. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57038

--HG--
extra : moz-landing-system : lando
2019-12-13 20:51:04 +00:00
Andreas Pehrson
486a4ba711 Bug 1601034 - Do not block main thread in mediapipeline_unittest.cpp. r=bwc
The STS thread dispatches SyncRunnables to main thread. There are two cases of
blocking affected here:
- SyncRunnables from main to STS:
  Can cause a deadlock.
- PR_Sleep on the main thread:
  Effectively sleeps STS too, if STS dispatches a SyncRunnable to main during
  main's sleep.

This patch gets rid of both of these.

Depends on D57001

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

--HG--
extra : moz-landing-system : lando
2019-12-12 21:50:06 +00:00
Andreas Pehrson
a13470c3da Bug 1601034 - Set the MediaPipelineTransmit send track in a dedicated method to enable unit tests. r=bwc
Depends on D56620

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

--HG--
extra : moz-landing-system : lando
2019-12-12 21:50:14 +00:00