Commit Graph

85 Commits

Author SHA1 Message Date
Peter Van der Beken
1c499dc49d Bug 1766130 - Properly propagate errors from Promise creation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144515
2022-05-02 07:44:23 +00:00
Jeff Muizelaar
82b8c364ae Bug 1766509. Add telemetry to track whether H264 is enabled. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D144827
2022-04-28 14:41:50 +00:00
Byron Campen
5972557f2f Bug 1611957: Make EncodingConstraints.maxFps a Maybe instead of having 0 represent no limit. r=ng
0 is a valid limit in setParameters according to the spec. For now, we treat
max-fr=0 in SDP as no limit, since that is what we have been doing.

Differential Revision: https://phabricator.services.mozilla.com/D144009
2022-04-26 14:07:37 +00:00
Peter Van der Beken
25d42b6822 Bug 1766122 - Make PeerConnectionImpl::Chain return an already_AddRefed<Promise>. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D144511
2022-04-26 09:24:16 +00:00
Byron Campen
a1901ab02b Bug 1763654: MOZ_CRASH instead of returning nullptr in here. r=mjf
Returning nullptr still release crashes, but is harder to tell what happened.

Differential Revision: https://phabricator.services.mozilla.com/D143230
2022-04-11 16:48:34 +00:00
Byron Campen
6a118e2946 Bug 1616937: Hold strong refs to the PC in Transceiver/Sender/Receiver. r=mjf
These are cycle collected, so no need to use this weakptr stuff.

Differential Revision: https://phabricator.services.mozilla.com/D142383
2022-04-05 18:39:14 +00:00
Byron Campen
8bb7aeae11 Bug 1616937: Remove main thread parameters/members. r=mjf
This ability to set the main thread has never been used, and in many cases is
not possible due to things being cycle collected (and therefore
main-thread-only).

Differential Revision: https://phabricator.services.mozilla.com/D142382
2022-04-05 18:39:13 +00:00
Byron Campen
f6df86f2e2 Bug 1616937: Move RTCRtpSender to c++ r=mjf,webidl,smaug
Also involves moving identity-related stuff to MediaPipelineTransmit.

Differential Revision: https://phabricator.services.mozilla.com/D141770
2022-04-05 18:39:13 +00:00
Byron Campen [:bwc]
13bbd8b24e Bug 1624989: Move RTCPeerConnection's operations chain to c++ r=jib,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D141738
2022-04-05 18:39:12 +00:00
Jeff Muizelaar
f5d7a8a56c Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio,ng
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-25 13:33:02 +00:00
Csoregi Natalia
d90b66a01f Backed out changeset 956a3ddb6ea0 (bug 1759931) for failures on test_peerConnection_stats.html. CLOSED TREE 2022-03-21 23:21:15 +02:00
Jeff Muizelaar
b38b110513 Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-21 19:31:56 +00:00
Cristian Tuns
48e186171e Backed out changeset 2a13a8e2de82 (bug 1759931) for causing mochitest failures in test_peerConnection_simulcastAnswer.html CLOSED TREE 2022-03-17 00:59:59 -04:00
Jeff Muizelaar
802f86587f Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-17 01:50:17 +00:00
Byron Campen
360e733e89 Bug 1755318: Wait until PeerConnectionImpl::Close completes its work before deregistering. r=mjf
This ensures we do not end up in a situation where PC handles stop working
before the work done by Close is complete.

Differential Revision: https://phabricator.services.mozilla.com/D139544
2022-03-01 22:16:53 +00:00
Byron Campen
ff76482abd Bug 1755318: Prevent the cycle collector from unlinking TransceiverImpl until PC has given up its reference. r=mjf
PeerConnectionImpl needs its TransceiverImpls to be fully functional until it
is done closing, because Close performs a stats query.

Differential Revision: https://phabricator.services.mozilla.com/D139217
2022-03-01 22:16:53 +00:00
Byron Campen
5bfa08c617 Bug 1755318: Ensure that PeerConnectionImpl::Close() is called before destruction. r=mjf
In some cases, PeerConnectionImpl's refcount will go to 0 without needing the
cycle collector to call unlink on it, which is what we rely on to call Close().
So, we make sure that refcount cannot go to 0 until Close is called (either
due to an unlink, or an explicit close from JS or PeerConnectionCtx).

Differential Revision: https://phabricator.services.mozilla.com/D139216
2022-03-01 22:16:52 +00:00
Byron Campen
2e7771acc4 Bug 1755318: Remove some dead code. r=mjf
The ICE state "closed" is not (and never has been) used, and even if it were,
we would probably not want to decrement the PeerConnection count then anyway.
Also, remove an unused function.

Differential Revision: https://phabricator.services.mozilla.com/D139414
2022-03-01 22:16:52 +00:00
Byron Campen
e6c43ede02 Bug 1755318: Check to see if there is a BrowsingContext before trying to use it. r=mjf
If JS does not call close when the window closes, this might not be there.

Differential Revision: https://phabricator.services.mozilla.com/D139215
2022-03-01 22:16:51 +00:00
Byron Campen
a93391c40e Bug 1755318: Move the RemovePeerConnection call to Close. r=mjf
This avoids the situation where PeerConnectionCtx is holding onto bare pointers
to PeerConnectionImpl whose refcounts have gone to 0, which is a pretty big
footgun.

Differential Revision: https://phabricator.services.mozilla.com/D139214
2022-03-01 22:16:51 +00:00
Byron Campen
c05293781b Bug 1755318: Remove some obfuscatory indirection. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D139213
2022-03-01 22:16:51 +00:00
Byron Campen
a45b095647 Bug 1755318: Stop using a strong ref in StunAddrsHandler. r=mjf
StunAddrsHandler is not cycle collected, so it would either need to be made
cycle-collected, or it would need to use a weak ref instead. The latter is
much easier, since PeerConnectionImpl can clear that weak ref when appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D139212
2022-03-01 22:16:50 +00:00
Byron Campen
ac0cb57d6f Bug 1755318: Refactor PacketDumper to no longer hold a strong ref to PeerConnectionImpl. r=mjf
There is now at most a single instance of PacketDumper per PeerConnectionImpl,
and it is owned by that PeerConnectionImpl. The flags/settings for packet dump
are kept in the PacketDumper itself instead of in PeerConnectionImpl, which
allows the early return optimization in Dump to work without a reference to the
PC.

Differential Revision: https://phabricator.services.mozilla.com/D139211
2022-03-01 22:16:50 +00:00
Byron Campen
635613e8cb Bug 1755318: Make PeerConnectionImpl cycle-collected. r=mjf,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D139209
2022-03-01 22:16:49 +00:00
Byron Campen
b20581a10d Bug 1402997: Fix bug where PeerConnectionWrapper would crash if PeerConnectionCtx is shut down. r=mjf
Depends on D138544

Differential Revision: https://phabricator.services.mozilla.com/D138545
2022-02-15 15:37:03 +00:00
Byron Campen
5364084637 Bug 1402997: Some simplifications. r=mjf
Depends on D138543

Differential Revision: https://phabricator.services.mozilla.com/D138544
2022-02-15 15:37:02 +00:00
Byron Campen
8fc933fe0a Bug 1402997: Move PCMedia's functionality to PCImpl. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D138543
2022-02-15 15:37:02 +00:00
Byron Campen [:bwc]
17942e9ee2 Bug 1253706: Compensate for bug 1751509 by waiting for gathering to finish. r=jib
Also add some logging that was useful, remove some cruft, add a little
exception-safety, and some formatting changes.

Differential Revision: https://phabricator.services.mozilla.com/D137530
2022-02-08 23:38:01 +00:00
Byron Campen [:bwc]
bd28661782 Bug 1253706: Move initial configuration setting into a setConfiguration call. r=mjf,emilio
Having a single codepath for this should make things easier to maintain.

Differential Revision: https://phabricator.services.mozilla.com/D135366
2022-02-08 23:37:56 +00:00
Byron Campen [:bwc]
8db5b03c33 Bug 1253706: Create and use MediaTransportHandler::SetIceConfig. r=mjf
Used to be built into CreateIceCtx, but needed to be stand-alone so it
could be called subsequently. Necessitated adding some members so pref-based
config state could be saved for later use.

Differential Revision: https://phabricator.services.mozilla.com/D135365
2022-02-08 23:37:56 +00:00
Byron Campen
7bf9e1862c Bug 1253706: Webidl/JS for RTCPeerConnection.setConfiguration r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135363
2022-02-08 23:37:55 +00:00
Cristian Tuns
ee71627d21 Backed out 17 changesets (bug 1253706, bug 1752896) for causing Gtest failures CLOSED TREE
Backed out changeset ff344a02b277 (bug 1253706)
Backed out changeset 91a32bbc9193 (bug 1253706)
Backed out changeset fe16d24ab482 (bug 1253706)
Backed out changeset 145e94926991 (bug 1253706)
Backed out changeset ee68db9eb695 (bug 1253706)
Backed out changeset 47e6ed20b5af (bug 1253706)
Backed out changeset 4c2f46c1235c (bug 1253706)
Backed out changeset 4c158f767584 (bug 1253706)
Backed out changeset 8efacf071abb (bug 1253706)
Backed out changeset 61e1c3949250 (bug 1253706)
Backed out changeset 77f4be697b38 (bug 1253706)
Backed out changeset 095ce58afb6a (bug 1253706)
Backed out changeset 180fd6a03442 (bug 1253706)
Backed out changeset 2a227c50a598 (bug 1253706)
Backed out changeset 65e035023ca2 (bug 1253706)
Backed out changeset f16083aa8183 (bug 1253706)
Backed out changeset cc684f283be4 (bug 1752896)
2022-02-07 11:45:03 -05:00
Byron Campen [:bwc]
ee347b343a Bug 1253706: Compensate for bug 1751509 by waiting for gathering to finish. r=jib
Also add some logging that was useful, remove some cruft, add a little
exception-safety, and some formatting changes.

Differential Revision: https://phabricator.services.mozilla.com/D137530
2022-02-07 15:26:08 +00:00
Byron Campen [:bwc]
e848b6ecd2 Bug 1253706: Move initial configuration setting into a setConfiguration call. r=mjf,emilio
Having a single codepath for this should make things easier to maintain.

Differential Revision: https://phabricator.services.mozilla.com/D135366
2022-02-07 15:26:04 +00:00
Byron Campen [:bwc]
f0cf33bbc6 Bug 1253706: Create and use MediaTransportHandler::SetIceConfig. r=mjf
Used to be built into CreateIceCtx, but needed to be stand-alone so it
could be called subsequently. Necessitated adding some members so pref-based
config state could be saved for later use.

Differential Revision: https://phabricator.services.mozilla.com/D135365
2022-02-07 15:26:04 +00:00
Byron Campen
b84e02b350 Bug 1253706: Webidl/JS for RTCPeerConnection.setConfiguration r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135363
2022-02-07 15:26:03 +00:00
Andreas Pehrson
58e1d56092 Bug 1225722 - Populate and coalesce RTCCodecStats to transport-level. r=bwc,jib
Differential Revision: https://phabricator.services.mozilla.com/D135868
2022-02-01 23:12:29 +00:00
Andreas Pehrson
d858fcfac3 Bug 1225722 - Wire up RTCCodecStats from GetStats. r=bwc,jib
This patch contains the plumbing work for taking all coalesced codec stats
for a peer connection and mapping them to rtp stream stats and their codecIds.

It depends on two skeleton methods; one for populating and coalescing all codec
stats to transport level, and one for filtering out only the codec stats
referred to by rtp stream stats.

Differential Revision: https://phabricator.services.mozilla.com/D135865
2022-02-01 23:12:27 +00:00
Andreas Pehrson
1e6698c54d Bug 1225722 - Modularize RTCStatsIdGenerator::RewriteIds somewhat. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D135864
2022-02-01 23:12:27 +00:00
Andreas Pehrson
229835875c Bug 1225722 - Make PeerConnectionImpl::GetSenderStats take a TransceiverImpl. r=bwc
This allows us to round up codec, receiver and sender stats from within the same
loop (over transceivers).

Differential Revision: https://phabricator.services.mozilla.com/D135863
2022-02-01 23:12:26 +00:00
Andreas Pehrson
ec99f6e02f Bug 1225722 - Make the MediaType in JsepCodecDescription instances static. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D136625
2022-02-01 23:12:25 +00:00
Andreas Pehrson
1a6dac202e Bug 1751532 - Do not expose rtp stream stats until there is packet flow. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D137042
2022-01-27 16:23:52 +00:00
Andreas Pehrson
99d36d5f37 Bug 1745707 - Rewrite ids in the RTCRtpReceiver::GetStats() path. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D133637
2021-12-14 12:52:25 +00:00
Andreas Pehrson
6bf97ad83e Bug 1745707 - Put id-rewriting into the id generator. r=ng
As the id generator is already a shared resource, this seems like a natural fit.

Differential Revision: https://phabricator.services.mozilla.com/D133636
2021-12-14 12:52:25 +00:00
Kagami Sascha Rosylight
e79b2b87d9 Bug 1743439 - Part 3: Mark callers in dom/media as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133362
2021-12-09 19:56:08 +00:00
Alexandru Michis
b3616631ef Backed out 6 changesets (bug 1743439) for causing bustages in AnimationEventDispatcher.h
CLOSED TREE

Backed out changeset 792c405d4afc (bug 1743439)
Backed out changeset 0376e73c7dce (bug 1743439)
Backed out changeset 23202094bc00 (bug 1743439)
Backed out changeset ba0fa3a8fa0e (bug 1743439)
Backed out changeset 7ad2746ec876 (bug 1743439)
Backed out changeset a919ef50cf33 (bug 1743439)
2021-12-09 19:36:12 +02:00
Kagami Sascha Rosylight
13ec1ddc55 Bug 1743439 - Part 3: Mark callers in dom/media as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D133362
2021-12-09 17:16:49 +00:00
Andreas Pehrson
5e648b2d45 Bug 1477548 - Make framesEncoded per-ssrc. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D130371
2021-11-09 13:03:06 +00:00
Andreas Pehrson
5436bb8dee Bug 1477548 - Issue RTP stats per-ssrc. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D130370
2021-11-09 13:03:05 +00:00
Nico Grunbaum
477345bfa8 Bug 1739266 - P2 - record sdpSemantics even when no ICE servers have been supplied;r=mjf
This fixes a bracketing error that was causing the sdpSemantics not to be recorded when no ICE configuration was supplied.

Depends on D130316

Differential Revision: https://phabricator.services.mozilla.com/D130522
2021-11-05 23:43:16 +00:00