Commit Graph

3468 Commits

Author SHA1 Message Date
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
Andreas Pehrson
af57fdc27d Bug 1601034 - Only update the conduit in replaceTrack() if the track source changed between camera and non-camera. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D56620

--HG--
extra : moz-landing-system : lando
2019-12-12 21:39:26 +00:00
Andreas Pehrson
d03a022cc6 Bug 1601034 - Add a ProcessedMediaTrack layer in MediaPipelineTransmit to handle replaceTrack of ended tracks. r=dminor,padenot
Before this patch, if a send audio MediaStreamTrack ended, we ended up not
sending anything over the network. If replaceTrack() at that point replaced the
ended track with a live one, we'd start sending data again, but the rtp stream
would continue from where the previous track ended.

Having a gap in audio like that would confuse a receiver's *video* jitter
buffer, because it's trying to sync to an audio track that just had a massive
amount of "jitter" (it can't tell the difference).

This patch fixes this by adding a track layer in MediaPipelineTransmit that
remains active for as long as the MediaPipeline is active. Thus if the send
audio MediaStreamTrack ends, we continue sending silence over the network, which
the receiver can understand. If later replaced, the receiver sees real audio
instead of silence and continues gracefully.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 16:53:43 +00:00
Ciure Andrei
dd135cd361 Backed out 2 changesets (bug 1601034) for causing gtest mediapipeline_unittest.cpp failures CLOSED TREE
Backed out changeset 6a429cfa6440 (bug 1601034)
Backed out changeset e17753103d27 (bug 1601034)
2019-12-12 18:48:01 +02:00
Andreas Pehrson
d117c5de66 Bug 1601034 - Only update the conduit in replaceTrack() if the track source changed between camera and non-camera. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D56620

--HG--
extra : moz-landing-system : lando
2019-12-12 09:35:37 +00:00
Andreas Pehrson
02224ebfcd Bug 1601034 - Add a ProcessedMediaTrack layer in MediaPipelineTransmit to handle replaceTrack of ended tracks. r=dminor,padenot
Before this patch, if a send audio MediaStreamTrack ended, we ended up not
sending anything over the network. If replaceTrack() at that point replaced the
ended track with a live one, we'd start sending data again, but the rtp stream
would continue from where the previous track ended.

Having a gap in audio like that would confuse a receiver's *video* jitter
buffer, because it's trying to sync to an audio track that just had a massive
amount of "jitter" (it can't tell the difference).

This patch fixes this by adding a track layer in MediaPipelineTransmit that
remains active for as long as the MediaPipeline is active. Thus if the send
audio MediaStreamTrack ends, we continue sending silence over the network, which
the receiver can understand. If later replaced, the receiver sees real audio
instead of silence and continues gracefully.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 15:23:43 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
june wilde
bb30244e33 Bug 1395259 - Remove win32k usage from webrtc's TaskQueue; r=dminor
Removes calls to the win32k API.
Replaces hardware and event timers with waitable timers.
Removes handling various task objects through the thread message queue.
Removes ProcessQueuedMessages, CancelTimers functions.
Adds event handle for stopping the TaskQueue thread.
Adds ReplyHandler class as an in between for TaskQueue objects to post tasks to each other without worrying if the other TaskQueue remains valid.
Adds rtc::CriticalSection's for timer_tasks_.
Removes ThreadState scoped class.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 16:11:32 +00:00
Nico Grunbaum
f77baeeca3 Bug 1570549 - P8 - Restore SDP comparison telemetry;r=bwc
This moves the telemetry and preferences out into their own files and restores the parse result telemetery.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:52 +00:00
Nico Grunbaum
76b1352f58 Bug 1570549 - P7 - Add SDP pref defaults; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52329

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:44 +00:00
Nico Grunbaum
44bb324bfb Bug 1570549 - P6 - Use hybrid parser in JsepSessionImpl; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52328

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:37 +00:00
Nico Grunbaum
94a27a1007 Bug 1570549 - P5 - Adding shim SDP parsing interface with pref controls - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52327

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:29 +00:00
Nico Grunbaum
b4fb3512e5 Bug 1570549 - P4 - Refactor parsing comparison entry point - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52326

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:22 +00:00
Nico Grunbaum
3428e183af Bug 1570549 - P3 - Add SDP logger; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52325

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:10 +00:00
Nico Grunbaum
53b0127879 Bug 1570549 - P2 - refactor unit tests - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52324

--HG--
extra : moz-landing-system : lando
2019-11-24 03:45:02 +00:00
Nico Grunbaum
0abad4cc61 Bug 1570549 - P1 - refactor into common SDP parser interface - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52323

--HG--
rename : media/webrtc/signaling/src/sdp/SdpErrorHolder.h => media/webrtc/signaling/src/sdp/SdpParser.h
extra : moz-landing-system : lando
2019-11-24 03:44:55 +00:00
Brindusan Cristian
1cde1fcaf7 Backed out 8 changesets (bug 1570549) for wpt failures at RTCTrackEvent-fire.html.
Backed out changeset 1d487300d143 (bug 1570549)
Backed out changeset 7d4be5f410c9 (bug 1570549)
Backed out changeset d328f63d66a8 (bug 1570549)
Backed out changeset e0dbf967bc68 (bug 1570549)
Backed out changeset 3469d786723d (bug 1570549)
Backed out changeset 1435516b2085 (bug 1570549)
Backed out changeset 3364ed9a7862 (bug 1570549)
Backed out changeset 94346355a426 (bug 1570549)

--HG--
rename : media/webrtc/signaling/src/sdp/SdpParser.h => media/webrtc/signaling/src/sdp/SdpErrorHolder.h
2019-11-23 11:24:03 +02:00
Nico Grunbaum
ab7812c038 Bug 1570549 - P8 - Restore SDP comparison telemetry;r=bwc
This moves the telemetry and preferences out into their own files and restores the parse result telemetery.

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

--HG--
extra : moz-landing-system : lando
2019-11-23 04:46:07 +00:00
Nico Grunbaum
6b9797515a Bug 1570549 - P6 - Use hybrid parser in JsepSessionImpl; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52328

--HG--
extra : moz-landing-system : lando
2019-11-23 04:45:47 +00:00
Nico Grunbaum
730d3c6f69 Bug 1570549 - P5 - Adding shim SDP parsing interface with pref controls - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52327

--HG--
extra : moz-landing-system : lando
2019-11-23 04:45:40 +00:00
Nico Grunbaum
e41c1d95b1 Bug 1570549 - P4 - Refactor parsing comparison entry point - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52326

--HG--
extra : moz-landing-system : lando
2019-11-23 04:45:33 +00:00
Nico Grunbaum
195e8eaf1f Bug 1570549 - P3 - Add SDP logger; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52325

--HG--
extra : moz-landing-system : lando
2019-11-23 04:45:31 +00:00
Nico Grunbaum
0f880559e0 Bug 1570549 - P2 - refactor unit tests - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52324

--HG--
extra : moz-landing-system : lando
2019-11-23 04:45:23 +00:00
Nico Grunbaum
f1362ebca3 Bug 1570549 - P1 - refactor into common SDP parser interface - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52323

--HG--
rename : media/webrtc/signaling/src/sdp/SdpErrorHolder.h => media/webrtc/signaling/src/sdp/SdpParser.h
extra : moz-landing-system : lando
2019-11-23 04:45:21 +00:00
Noemi Erli
2871c44dd4 Backed out 8 changesets (bug 1570549) for causing build bustages in sdp_unittests.cpp CLOSED TREE
Backed out changeset 0574444bda48 (bug 1570549)
Backed out changeset 19c2658031e2 (bug 1570549)
Backed out changeset 0817d4ca061d (bug 1570549)
Backed out changeset 629c2fec174c (bug 1570549)
Backed out changeset 3bfbbda57d4c (bug 1570549)
Backed out changeset ac4ef8625479 (bug 1570549)
Backed out changeset dc0e0e020273 (bug 1570549)
Backed out changeset 94df2bb99c20 (bug 1570549)

--HG--
rename : media/webrtc/signaling/src/sdp/SdpParser.h => media/webrtc/signaling/src/sdp/SdpErrorHolder.h
2019-11-23 04:45:55 +02:00
Nico Grunbaum
ecd11a5b59 Bug 1570549 - P8 - Restore SDP comparison telemetry;r=bwc
This moves the telemetry and preferences out into their own files and restores the parse result telemetery.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 23:42:34 +00:00
Nico Grunbaum
4e0f17d1a0 Bug 1570549 - P6 - Use hybrid parser in JsepSessionImpl; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52328

--HG--
extra : moz-landing-system : lando
2019-11-22 23:42:28 +00:00
Nico Grunbaum
7d5e889eeb Bug 1570549 - P5 - Adding shim SDP parsing interface with pref controls - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52327

--HG--
extra : moz-landing-system : lando
2019-11-22 23:42:26 +00:00
Nico Grunbaum
e1a21a71f6 Bug 1570549 - P4 - Refactor parsing comparison entry point - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52326

--HG--
extra : moz-landing-system : lando
2019-11-22 23:41:27 +00:00
Nico Grunbaum
17a87d116f Bug 1570549 - P3 - Add SDP logger; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52325

--HG--
extra : moz-landing-system : lando
2019-11-22 23:41:19 +00:00
Nico Grunbaum
61c3c8a467 Bug 1570549 - P2 - refactor unit tests - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52324

--HG--
extra : moz-landing-system : lando
2019-11-22 23:41:12 +00:00
Nico Grunbaum
beefd85ad7 Bug 1570549 - P1 - refactor into common SDP parser interface - r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D52323

--HG--
rename : media/webrtc/signaling/src/sdp/SdpErrorHolder.h => media/webrtc/signaling/src/sdp/SdpParser.h
extra : moz-landing-system : lando
2019-11-22 23:41:05 +00:00
Jed Davis
4992ca410f Bug 1545504 - Strengthen bounds check in WebRTC PhysicalSocketServer. r=jesup
PhysicalSocketServer isn't currently used by Mozilla's WebRTC
integration, but just in case, let's make sure that this array index is
bounds-checked in actual use, not just in debug builds (which tend to
never see realistic test conditions).

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

--HG--
extra : moz-landing-system : lando
2019-11-17 03:40:50 +00:00
Nico Grunbaum
975181c5f0 Bug 1580156 - set WebRTC thread name r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D51975

--HG--
extra : moz-landing-system : lando
2019-11-07 20:22:42 +00:00
Sylvestre Ledru
c786684183 Bug 1562642 - add missing license in media/webrtc/signaling/src/sdp/ r=drno
Depends on D52582

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

--HG--
extra : moz-landing-system : lando
2019-11-11 21:42:41 +00:00
Dan Minor
1945617175 Bug 1592620 - Add whitelist for mDNS hostname obfuscation; r=bwc
This adds a whitelist of domains for which mDNS hostname obfuscation is
disabled. The implementation is an updated version of the old screensharing
whitelist code.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 17:17:11 +00:00
Byron Campen [:bwc]
c5a5c754d7 Bug 1588588: Get MediaPipeline to use the new timestamp implementation, and fix a typo in how we calculate expiries for CSRC stats. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D50113

--HG--
extra : moz-landing-system : lando
2019-11-07 23:07:09 +00:00
Byron Campen [:bwc]
f5e5fe0d20 Bug 1588588: Remove jsimpl for RTCStatsReport, and refactor to prepare for moving some stats functionality to RTCRtpReceiver/Sender. r=smaug,ng
Differential Revision: https://phabricator.services.mozilla.com/D49195

--HG--
extra : moz-landing-system : lando
2019-11-07 23:07:05 +00:00
Brindusan Cristian
06dcacf2e7 Backed out changeset 0163a2b9ca5c (bug 1592620) for mochitest failures at test_dataChannel_hostnameObfuscationWhitelist.html. CLOSED TREE 2019-11-08 17:09:08 +02:00
Dan Minor
4438d45346 Bug 1592620 - Add whitelist for mDNS hostname obfuscation; r=bwc
This adds a whitelist of domains for which mDNS hostname obfuscation is
disabled. The implementation is an updated version of the old screensharing
whitelist code.

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

--HG--
extra : moz-landing-system : lando
2019-11-07 20:59:29 +00:00
Dan Minor
8db9191ae9 Bug 1588817 - Only enable host obfuscation when running in content process; r=drno
The mDNS code makes use of the StunAddrsRequest which does not exist when
we are running with e10s disabled. If e10s is disabled, PeerConnectionMedia
will not be in the content process, and we can disable hostname obfuscation
in that case.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 18:04:31 +00:00
Andreas Pehrson
ad9fc60102 Bug 1588055 - Remove use of nsAutoPtr in MediaPipeline. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D49239

--HG--
extra : moz-landing-system : lando
2019-11-06 05:11:00 +00:00
Andreas Pehrson
28c99e5390 Bug 1588055 - Fix MediaPipeline static-analysis warnings and make RefPtr passing consistent. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D48957

--HG--
extra : moz-landing-system : lando
2019-11-06 05:11:02 +00:00
Andreas Pehrson
494c9c3aad Bug 1212237 - Use a content principal by default for received tracks. r=bwc
This swaps things around so that received tracks in peer connections have a
content principal instead of a null principal initially.

This puts an extra requirement on us to not output any frames under the content
principal after ALPN has been negotiated with requested privacy, but before this
private principal has been signaled to the MediaPipelines. The private principal
is signaled from the STS thread, via the main thread, whereas media is consumed
directly by MediaPipelines after being received on the STS thread.

This patch adds an extra signaling path directly from the STS thread that tells
MediaPipelines to make their PrincipalHandle private, and to ignore any data
until the private PrincipalHandle is set. It also moves the responsibility of
updating the principal of the received MediaStreamTracks from TransceiverImpl
to MediaPipeline, so it's all in the same path.

This lets all MediaStream and MediaStreamTrack APIs consume received tracks
directly after getting exposed to JS without errors. In case privacy is later
requested, consumers that have already been set up must handle this on the fly.
(They do, in specs and impls)

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

--HG--
extra : moz-landing-system : lando
2019-11-06 05:11:04 +00:00
Andreas Pehrson
8624ea2658 Bug 1212237 - s/nsIEventTarget/nsISerialEventTarget/ in media/webrtc. r=bwc
nsISerialEventTarget is more semantically accurate for these uses, as the
dispatched runnables cannot run in parallel. It also allows us to use
InvokeAsync in future patches, as that function only takes nsISerialEventTarget.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 05:10:58 +00:00