This reverts commit 7f16fcda0f.
Reason for reland: Re-landing after addressing issues in downstream
code and hardening the ObserverAdapter from situations where attempted
usage of data channel proxies could occur after shutting down the
peer connection and terminating the network thread.
Original change's description:
> Revert "[DataChannel] Send and receive packets on the network thread."
>
> This reverts commit fe53fec24e.
>
> Reason for revert: Speculative revert, may be breaking downstream project
>
> Original change's description:
> > [DataChannel] Send and receive packets on the network thread.
> >
> > This updates sctp channels, including work that happens between the
> > data channel controller and the transport, to run on the network
> > thread. Previously all network traffic related to data channels was
> > routed through the signaling thread before going to either the network
> > thread or the caller's thread (e.g. js thread in chrome). Now the
> > calls can go straight from the network thread to the JS thread with
> > enabling a special flag on the observer (see below) and similarly
> > calls to send data, involve 2 threads instead of 3.
> >
> > * Custom data channel observer adapter implementation that
> > maintains compatibility with existing observer implementations in
> > that notifications are delivered on the signaling thread.
> > The adapter can be explicitly disabled for implementations that
> > want to optimize the callback path and promise to not block the
> > network thread.
> > * Remove the signaling thread copy of data channels in the controller.
> > * Remove several PostTask operations that were needed to keep things
> > in sync (but the need has gone away).
> > * Update tests for the controller to consistently call
> > TeardownDataChannelTransport_n to match with production.
> > * Update stats collectors (current and legacy) to fetch the data
> > channel stats on the network thread where they're maintained.
> > * Remove the AsyncChannelCloseTeardown test since the async teardown
> > step has gone away.
> > * Remove `sid_s` in the channel code since we only need the network
> > state now.
> > * For the custom observer support (with and without data adapter) and
> > maintain compatibility with existing implementations, added a new
> > proxy macro that allows an implementation to selectively provide
> > its own implementation without being proxied. This is used for
> > registering/unregistering a data channel observer.
> > * Update the data channel proxy to map most methods to the network
> > thread, avoiding the interim jump to the signaling thread.
> > * Update a plethora of thread checkers from signaling to network.
> >
> > Bug: webrtc:11547
> > Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39760}
>
> Bug: webrtc:11547
> Change-Id: Id0d65594bf727ccea5c49093c942b09714d101ad
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300341
> Auto-Submit: Andrey Logvin <landrey@webrtc.org>
> Owners-Override: Andrey Logvin <landrey@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39764}
Bug: webrtc:11547
Change-Id: I47dfa7e7168be0cd2faab4f8f3ebf110c3728af5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300360
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39786}
This reverts commit fe53fec24e.
Reason for revert: Speculative revert, may be breaking downstream project
Original change's description:
> [DataChannel] Send and receive packets on the network thread.
>
> This updates sctp channels, including work that happens between the
> data channel controller and the transport, to run on the network
> thread. Previously all network traffic related to data channels was
> routed through the signaling thread before going to either the network
> thread or the caller's thread (e.g. js thread in chrome). Now the
> calls can go straight from the network thread to the JS thread with
> enabling a special flag on the observer (see below) and similarly
> calls to send data, involve 2 threads instead of 3.
>
> * Custom data channel observer adapter implementation that
> maintains compatibility with existing observer implementations in
> that notifications are delivered on the signaling thread.
> The adapter can be explicitly disabled for implementations that
> want to optimize the callback path and promise to not block the
> network thread.
> * Remove the signaling thread copy of data channels in the controller.
> * Remove several PostTask operations that were needed to keep things
> in sync (but the need has gone away).
> * Update tests for the controller to consistently call
> TeardownDataChannelTransport_n to match with production.
> * Update stats collectors (current and legacy) to fetch the data
> channel stats on the network thread where they're maintained.
> * Remove the AsyncChannelCloseTeardown test since the async teardown
> step has gone away.
> * Remove `sid_s` in the channel code since we only need the network
> state now.
> * For the custom observer support (with and without data adapter) and
> maintain compatibility with existing implementations, added a new
> proxy macro that allows an implementation to selectively provide
> its own implementation without being proxied. This is used for
> registering/unregistering a data channel observer.
> * Update the data channel proxy to map most methods to the network
> thread, avoiding the interim jump to the signaling thread.
> * Update a plethora of thread checkers from signaling to network.
>
> Bug: webrtc:11547
> Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39760}
Bug: webrtc:11547
Change-Id: Id0d65594bf727ccea5c49093c942b09714d101ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300341
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39764}
This updates sctp channels, including work that happens between the
data channel controller and the transport, to run on the network
thread. Previously all network traffic related to data channels was
routed through the signaling thread before going to either the network
thread or the caller's thread (e.g. js thread in chrome). Now the
calls can go straight from the network thread to the JS thread with
enabling a special flag on the observer (see below) and similarly
calls to send data, involve 2 threads instead of 3.
* Custom data channel observer adapter implementation that
maintains compatibility with existing observer implementations in
that notifications are delivered on the signaling thread.
The adapter can be explicitly disabled for implementations that
want to optimize the callback path and promise to not block the
network thread.
* Remove the signaling thread copy of data channels in the controller.
* Remove several PostTask operations that were needed to keep things
in sync (but the need has gone away).
* Update tests for the controller to consistently call
TeardownDataChannelTransport_n to match with production.
* Update stats collectors (current and legacy) to fetch the data
channel stats on the network thread where they're maintained.
* Remove the AsyncChannelCloseTeardown test since the async teardown
step has gone away.
* Remove `sid_s` in the channel code since we only need the network
state now.
* For the custom observer support (with and without data adapter) and
maintain compatibility with existing implementations, added a new
proxy macro that allows an implementation to selectively provide
its own implementation without being proxied. This is used for
registering/unregistering a data channel observer.
* Update the data channel proxy to map most methods to the network
thread, avoiding the interim jump to the signaling thread.
* Update a plethora of thread checkers from signaling to network.
Bug: webrtc:11547
Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39760}
This updates DataChannelControllerTests to shut down the DCC in the
same way it's shut down by the owning PeerConnection instance:
* Call TeardownDataChannelTransport_n()
* Call PrepareForShutdown()
Also calling PrepareForShutdown() from PC's dtor to be consistent with
how `sdp_handler_->PrepareForShutdown()` is called since it appears
that many tests do not call PC::Close() before destruction.
Bug: b/276434297
Change-Id: I0379baa0df0e764bc255b83ae0667032acfe3db0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300220
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39756}
(using no-try due to bot infra issue)
No-try: true
Bug: b/276434297
Change-Id: I33f796b501f96731c4ca76cb62c2331f10c795f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299708
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39734}
With this cl, packets that are discarded in RtpTransport now notifies Call, so that
they can be part of BWE even if they are dropped.
These packets have been recevied on the transport, and has bin decrypted
and parsed and thus can be accounted for.
The un demuxable packets are forwarded to Call similarly how RTCP packets are forwarded.
Bug: webrtc:14928
Change-Id: Ia53349c7b316c4442a3c7aac085a85ec4f4ab9ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299262
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39727}
* Change data channel creation code to return RTCError for more
detailed/accurate errors.
* Move DataChannelController::sid_allocator_ to the network thread.
* Add a temporary duplicate vector of channels on the network thread.
This will eventually be the main vector.
* Delete one test that turns out to be racy (as long as we're using
both the signaling and network threads).
Bug: webrtc:11547, webrtc:12796
Change-Id: I93ab721a09872d075046a907df60e8aee4263371
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298624
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39719}
* The pointer isn't needed for this notification. Arguably using
the internal id is more consistent with the stats code.
* Using the int makes it safer down the line to post the operation
from the network thread to the signaling thread rather than post
an object reference.
Bug: none
Change-Id: I1e9eb31d8386dca3feaa90ee3267ea98eb3e81ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299144
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39696}
This updates DataChannelController and test classes to use
GetSctpSslRole_n instead and query the role on the network thread.
Along the way this CL makes the init config struct for when constructing
data channels, mandatory. It's now passed via const& instead of by pointer. In practice a valid pointer was always being passed.
Bug: webrtc:11547
Change-Id: I0f4bbf364969cc2dec07871c297ddbef0c175f86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298307
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39676}
This allows the SslRole to be queried from the network thread which
will simplify some code paths and avoid thread hopping.
The next steps will be to remove GetSctpSslRole and only query the
DTLS role on the network thread and start combining other operations.
Bug: webrtc:11547
Change-Id: I222dc838fc5ee274a294c8d81d38b5a4ea8fea1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298302
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39642}
after the limitation to 32 TURN servers shipped in M110
BUG=webrtc:13195
Change-Id: I247e5b164188751d94eb9f4fb93aadf1dd645d2a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298308
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39634}
This removes the behavior of not requesting datachannel if the first
datachannel is closed before the offer is created.
Bug: chromium:1423562
Change-Id: I90eab0f908507e65d9ee3dff51842ee6d61a8aa9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39570}
It turns out that there were several sigslot instances across data
channel, pc and stats classes that in practice only served as means
to update two counters in RTCStatsCollector. There's already a
notification path that's suitable.
This also fixes a case where the PC instance sat in the middle
of notifications from datachannels to the datachannel controller.
Bug: webrtc:11943
Change-Id: Ic60b76021584019f82085f6651230fe2fe82d465
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295781
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39456}
Call operators do not improve code clarity, and usage was moderate.
Bug: None
Change-Id: I8d86bd7d435ce88e99f4abee8ab95a336d47dc22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292960
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39294}
Creating a data channel or negotiating it can make the SCTP transport
name go from nothing (empty string) to something. Inside the
RTCStatsCollector this is relevant because which transports we have
affect which certificates we should cache, so this is an instance of
having to call ClearStatsCache().
The bug is that we don't. This CL fixes the bug.
I tried to create unittests to cover this, but I was unable to
reproduce the race in a testing environment (if I did it would have
hit an RTC_DCHECK). Not ideal... but I hope we can land it anyway since
the fix is trivial and clearing the cache in response to API calls is
worst case harmless.
Bug: webrtc:14844
Change-Id: Ia7174cde040839e5555237db6de285297120b123
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291112
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39160}
This is a reland of commit b8023690d9
Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}
Bug: webrtc:10567
Change-Id: I558a95f7b587302b5e95f6ec26d1eb1fedf3dbed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39150}
This reverts commit fc5d627cef.
Reason for revert: Breaks upstream WPT tests
Original change's description:
> Reland "Ensure RTCRtpSenders are always created with one encoding"
>
> This is a reland of commit b8023690d9
>
> Original change's description:
> > Ensure RTCRtpSenders are always created with one encoding
> >
> > It is possible to have AddTransceiver calls with an empty array
> > of encodings or AddTrack calls. In both cases, before negotiation,
> > the sender's encodings array would be empty and it was not possible
> > to update any value.
> >
> > Now, a default entry should be created in those cases, allowing to
> > update the configuration before negotiation.
> >
> > Bug: webrtc:10567
> > Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> > Auto-Submit: Florent Castelli <orphis@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Florent Castelli <orphis@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39126}
>
> Bug: webrtc:10567
> Change-Id: I2d52fa5b1d7cfdc9dce279fcf9faf1e0129c9008
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291140
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39145}
Bug: webrtc:10567
Change-Id: If9b5adb5debb7c87a15662a8d0f232405a0e8136
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291221
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39147}
This is a reland of commit b8023690d9
Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}
Bug: webrtc:10567
Change-Id: I2d52fa5b1d7cfdc9dce279fcf9faf1e0129c9008
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291140
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39145}
This reverts commit b8023690d9.
Reason for revert: Breaking WPT tests in Chrome. Example build https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1263191/overview
Original change's description:
> Ensure RTCRtpSenders are always created with one encoding
>
> It is possible to have AddTransceiver calls with an empty array
> of encodings or AddTrack calls. In both cases, before negotiation,
> the sender's encodings array would be empty and it was not possible
> to update any value.
>
> Now, a default entry should be created in those cases, allowing to
> update the configuration before negotiation.
>
> Bug: webrtc:10567
> Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
> Auto-Submit: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39126}
Bug: webrtc:10567
Change-Id: Ib8931b38182251baac616540788a02a5fafaf670
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291120
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39132}
It is possible to have AddTransceiver calls with an empty array
of encodings or AddTrack calls. In both cases, before negotiation,
the sender's encodings array would be empty and it was not possible
to update any value.
Now, a default entry should be created in those cases, allowing to
update the configuration before negotiation.
Bug: webrtc:10567
Change-Id: I1271e2965e1a97c1e472451e0ab8867fc24f6c2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290994
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39126}
This is done by allowing implementations of AudioDeviceModule to
implement the GetStats() method. The default implementation returns
nullopt, in which case RTCAudioPlayoutStats will not be visible in the
stats.
Bug: webrtc:14653
Change-Id: I8e4aa6f1b8fcfa47a30f633d28a4013191752e20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290563
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39115}
DeliverRtpPacket use a parsed RTP packet as argument where the RTP extensions are supposed to be known.
This method is implemented in webrt::Call and temporary used by the exising method Call::DeliverRtp, but the idea is to instead avoid extra packet parsing by forwarding a RtpPacketReceived from RtpTransport::DemuxRtpPacket via WebrtcVideoChannel::OnPacketReceived and WebrtcVoiceChannel.
DeliverRtcpPacket is also implemented in Call and is directly used in PeerConnection::InitializeRtcpCallback.
Bug: webrtc:14795, webrtc:7135
Change-Id: Ib6ffe8e1229ac07fa459ee2fc9a0af8455a23bac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290401
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39015}
The implementation here has a number of changes that force the callers
that called the "channel" functions into specific interfaces rather than
just letting C++ take care of it; this should go away once there stops
being a common implementation class for those interfaces.
Bug: webrtc:13931
Change-Id: Ic4e279528a341bc0a0e88d2e1e76c90bc43a1035
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287640
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38888}
This allows callers to differentiate on whether they need the
channel for sending or receiving purposes.
Note: This CL is incomplete, in that many places cast the pointers
to the concrete subclasses "VideoMediaChannel" and "AudioMediaChannel", which are not split into sending and receiving APIs.
The long term goal is to make two MediaChannel-like class APIs, with distinct implementations, and let the RtpSender and RtpReceiver manage those objects, rather than keeping them in the RtpTransceiver.
Bug: webrtc:13931
Change-Id: I8d56defe2287bd6552b71571cc6a5ec842927fa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287040
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38844}
M108 Stable has been released, which does not contain googIPv6 anymore,
and today the last downstream dependency on this flag was removed.
Let's delete!
Bug: webrtc:14608
Change-Id: Ia2d201f0da04b14961f891687b6135fc69b7767e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285720
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38786}
Limit the number of TURN servers to 32 in order to allow the
prioritization to assume a fixed offset for (de)prioritizing
candidates. See
https://github.com/w3c/webrtc-pc/pull/2679
for discussion including some data on current usage.
Guarded by WebRTC-LimitTurnServers which is used as a killswitch.
BUG=webrtc:13195
Change-Id: Ib12726af426ae4238aa7eb6aa062c71af52d495f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38767}
BurstyPacer is currently controlled via field trials. In order for
Chrome to be able to have burst without relying on a field trial, this
parameter is added.
When all burst experiments have concluded we may be able to have a
hardcoded constant instead, but for now the parameter is added to
RTCConfiguration.
NOTRY=True
Bug: chromium:1354491
Change-Id: I386c1651dbbcbf309c15ea3d3380cf8f632b5429
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283420
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38621}
This patch adds variant of PeerConnectionInterface::AddTrack
that takes an initial_send_encodings.
This allows for setting/modifying encoding parameters before sdp
negotiation is performed/complete (e.g requested_resolution).
This is already available if using RtpTransciverInit and AddTransceiver,
but was not added to AddTrack because of concerns that it complicated matching with existing transceivers. This CL sidesteps that by never matching to a preexisting transceiver if initial_send_encodings are specified.
Note:
1) The patch adds a new method rather than an extra (e.g optional)
argument to existing AddTrack. This is to avoid problems with downstream mocks.
2) chromium "problems" was fixed in https://chromium-review.googlesource.com/c/chromium/src/+/3952684 and https://chromium-review.googlesource.com/c/chromium/src/+/3956060
Bug: webrtc:14451
Change-Id: I19b5a03872730280fbf868ca5d3a2f46443359f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278783
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38437}
Typically, remote candidates come from signalling and are deserialized
into C++ objects. The network_type field of these candidates is
always ADAPTER_TYPE_UNKNOWN.
However, in tests it is common to pass SDP and remote candidates as C++
objects. In this case, the network_type property of remote candidates
is preserved, so DCHECK might be triggered when GetStats is called.
Clearing fields that are not suitable as remote candidates fixes
this issue.
Bug: None
Change-Id: Ida01b0224bce5cf3e87bcad1ddaca35c9f4fffe7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279680
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38436}
ScalabilityMode should be validated against the currently
allowed codecs or the currently used codec.
Bug: webrtc:11607
Change-Id: Id2e6cbfad4f089de450150e1203657ed316e2f29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277403
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38433}
which have shown that it is not easily possible to restrict
the pool size to 1 and combine this with max-bundle
BUG=webrtc:12383,chromium:1328218
Change-Id: I3a7ae4a263238c1b5faa079c3cbdaf84d1b40cbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279141
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38396}
This is a reland of commit c4b0bde7f2
which changes the name of the new method and adds a deprecated
backward compatible variant with the old name.
Original change's description:
> ice server parsing: return RTCError with more details
>
> surfacing those errors to the API (without specific details) instead of just the logging.
>
> BUG=webrtc:14539
>
> Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38356}
Bug: webrtc:14539
Change-Id: I0a5482e123f25867582d62101b31ed207b95ea1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278962
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38364}
This reverts commit c4b0bde7f2.
Reason for revert: Breaks downstream tests.
Basically, ParseIceServers() and other functions have changed
the return type, and this breaks tests at compile time.
Is it possible to reland with backwards compatible versions that return
the previous type? Then they can be removed afterwards.
Original change's description:
> ice server parsing: return RTCError with more details
>
> surfacing those errors to the API (without specific details) instead of just the logging.
>
> BUG=webrtc:14539
>
> Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38356}
Bug: webrtc:14539
Change-Id: I4df936ff865f87759936c5d0425478fe51051dc8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278960
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38359}
surfacing those errors to the API (without specific details) instead of just the logging.
BUG=webrtc:14539
Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38356}
which have shown that 32 is a reasonably safe limit and informed
https://github.com/w3c/webrtc-pc/pull/2679/
BUG=webrtc:13265,chromium:1360224
Change-Id: I63155653862e4c12720b8655c51ed5f3bdc742f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277804
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38339}
Plan B having been deleted from Chrome, there is no need to collect UMAs
relating to Plan B vs Unified Plan setups.
Bug: chromium:1357994
Change-Id: Icb5d16823ea9d849798583cd1c82683014b8a15c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275309
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38069}
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed
Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
which may allow caching some relatively persistent statistics
such as codec statistics that only change during renegotiation.
BUG=webrtc:8693
Change-Id: Ifd68c9d666d9f328d0efecb64e4201d003788ca8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273324
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37981}
since it has grown too large
BUG=None
Change-Id: I9dfffd6264db3206c0674a3446c857c139ba6fb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267826
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37492}
We should have done this a long time ago.
Let's do the same for stats_types.h in a separate CL because that file
is part of the api/ folder and needs some special care (typedefs and
temporarily include helper to avoid breaking downstream projects).
Bug: webrtc:14180
Change-Id: Id9c71ebd53dd97dd238bdf7527c36d7cf0e91f85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267642
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37426}
In the modern getStats implementation, we currently do two
block-invokes when we trigger stats collection, once for
signaling -> worker and once for signaling -> network inside, both take
place inside the "prepare" method:
RTCStatsCollector::PrepareTransceiverStatsInfosAndCallStats_s_w_n.
For comparison, the legacy stats collector currently require 4 block
invokes to operate.
Bug: webrtc:14247
Change-Id: Ie739cbcf29d87041484183b520aeba520aafcaba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37424}
https://w3c.github.io/webrtc-stats/#guidelines-for-getstats-results-caching-throttling
"When the state of the RTCPeerConnection visibly changes as a result of an API call, a promise resolving or an event firing, subsequent new getStats() calls must return up-to-date dictionaries for the affected objects."
BUG=webrtc:14190
Change-Id: I4560be22795f30e0369d573bda0100e490efb57b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265870
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37255}
This is part of the project to delete the class entirely.
The CL also adds an "use_rtx" parameter to the function for listing
video codecs, rather than filtering those away afterwards.
Bug: webrtc:13931
Change-Id: I96b9b18c694a1c0986ccf22face76ef4c704d372
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262666
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36963}
This reverts commit c48ad732d6.
Reason for revert: breaks downstream project
Original change's description:
> Don't create channel_manager when media_engine is not set
>
> Also remove a bunch of functions in ChannelManager that were just
> forwarding to MediaEngineInterface.
>
> Bug: webrtc:13931
> Change-Id: Ia38591fd22c665cace16d032f5c1e384e413cded
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261304
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36801}
Bug: webrtc:13931
Change-Id: I1e260a2489547bd9483b50e043c28d2805b0fa5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261660
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36811}
Also remove a bunch of functions in ChannelManager that were just
forwarding to MediaEngineInterface.
Bug: webrtc:13931
Change-Id: Ia38591fd22c665cace16d032f5c1e384e413cded
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261304
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36801}
If media_engine is not passed in init parameters, the PC can't handle
media, but can be used for datachannels. This CL adds testing that
datachannels work without media engine, and adds failure returns
to PeerConnection APIs that manipulate media when media engine is
not present.
Bug: webrtc:13931
Change-Id: Iecdf17a0a0bb89e0ad39eb74d6ed077303b875c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261246
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36778}
This ensures that only the compilation units that actually need
ChannelManager details can see it.
Bug: webrtc:13931
Change-Id: Iddd37580c0ceceba5b7095e84b981e6a525b2800
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261200
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36762}
This limits the exposure of the implementation of ChannelInterface.
Bug: webrtc:13931
Change-Id: Ifc0fa496c210413d81ad71f44fa4040b881d092c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260561
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36725}
This makes it clearer which modules set the channel.
Also remove GetChannel() from PeerConnection public API
This was only used once, internally, and can better be inlined.
Part of reducing the exposure of Channel.
Bug: webrtc:13931
Change-Id: I5f44865230a0d8314d269c85afb91d4b503e8de0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260187
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36695}
This cl/ adds the feature actually injecting a FieldTrialsView into
PeerConnectionFactory, or into a PeerConnection or both.
The field trials used for a PeerConnection is those specified in
PeerConnectionDependencies. Otherwise will those from
PeerConnectionFactoryDependencies be used (and until we're finished with
this conversion, the global string fallback is used as last resort).
Note that it is currently not possible to create 2 FieldTrials
objects concurrently...due to global string,
so this cl/ is mostly (but entirely) for show, i.e one _can_
realistically inject them into a PeerConnectionFactory.
Bug: webrtc:10335
Change-Id: Id2e60525f48a1f8293c1dd0be771e3ed03790963
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258134
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36578}
Also update API proxy Create() factory functions to accept the inner
reference counted object via scoped_refptr instead of a raw pointer.
This is to avoid accidentally creating and deleting an object when
passing an inner object to a proxy class.
Consider something like:
auto proxy = MyProxy::Create(
signaling_thread(), make_ref_counted<Foo>());
Bug: webrtc:13464, webrtc:12701
Change-Id: I55ccfff43bbc164a5e909b2c9020e306ebb09075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256010
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36261}
This allows to delete non-needed headers from .h files.
Ran this on peer_connection.cc to demonstrate.
Bug: none
Change-Id: I69ce48be25a9778297e521282898c6ac31e7ea6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36170}
This cl/
1) move WebRtcKeyValueConfig from api/transport to api/ directory.
2) add a test/ScopedKeyValueConfig (compare ScopedFieldTrials).
3) removes usage of webrtc::field_trial:: from the pc/ directory.
4) removes a few unused includes of system_wrappers/field_trial.h.
Bug: webrtc:10335
Change-Id: If29c07900dbe791050b0a5ad05332bedfad035f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36160}
Also expands integration_test_helpers to deal with multiple
datachannels.
The bug has not yet been triggered.
Bug: webrtc:13668
Change-Id: I82a0fdae0cc32815c250a691b56c614bfd6d606b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251602
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35980}
Document with a comment the suspected place that could cause a bug.
Also fix an error in previous role observation code.
Bug: webrtc:13668
Change-Id: Id7f6af6905d90f7974b5570145c201c8339aaf72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251388
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35973}
A pointer to the transport controller is now maintained on
both the network thread and the signaling thread. We use
thread specific accessors to make it explicit which copy we
are accessing at any given time.
We also move the initial offerer value to the SDP offer/answer
class; this is determined on the basis of SDP offer/answer, so
there is no need to hop to the network thread for that.
Work in progress.
Bug: webrtc:9987
Change-Id: Idbe5a7fbf44f667adcd119e486133cf6e43ab1f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251382
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35965}
This reverts commit 8efc914cf3.
Reason for revert: Breaks downstream project.
Original change's description:
> Replace use of sigslot with CallbackList in data_channel_controller
>
> This is a straightforward replacement; simplifications due to the ability
> to inline functions in the lambdas are for a later CL.
>
> Bug: webrtc:11943
> Change-Id: I7274cedde507b954f1d8aa8bc560861102eeb264
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250540
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35936}
TBR=nisse@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I8fd0f32ceec866bfd9a08cac1108b559bf03caac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251280
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35941}
This is a straightforward replacement; simplifications due to the ability
to inline functions in the lambdas are for a later CL.
Bug: webrtc:11943
Change-Id: I7274cedde507b954f1d8aa8bc560861102eeb264
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250540
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35936}
This removes a couple of methods from the PeerConnectionSdpMethods
interface.
Bug: webrtc:11995
Change-Id: I0a68178b1f0a99e779e6d7f94d03b493d811f500
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249794
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35841}
This CL changes the SdpOfferAnswerHandler class to depend on a new class
PerConnectionInternalMethods, which is implemented by PeerConnection.
This means that SdpOfferAnswerHandler no longer depends on
PeerConnectionInterface.
This opens the way for refactoring PeerConnection so that
PeerConnectionInternalMethods is a member object (encapsulation not
inheritance), which will make it possible to break some of the
dependency cycles that make the "peerconnection" target in the BUILD
file so huge.
Bug: webrtc:11995
Change-Id: Ib8413a31c0148b8d8602764b7367dfd3068da58a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249785
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35828}
The interface is implemented by the ChannelManager and contains methods
to create and destroy media channel objects as used by a transceiver.
This will subsequently allow us to delete the channel objects from
the transceiver class where ownership really lies rather than from
the outside - which is currently required by some tests that keep
channel objects on the stack. We'll furthermore be able to do the
destruction asynchronously without additional Invoke()s as we do now
which will remove an Invoke when making sdp changes.
With introducing the interface, the following simplifications were made:
* ChannelManager constructed on the signaling thread.
Before, there was an Invoke in the context class, which existed
for the purposes of calling MediaEngine::Init() (which in turn is
only needed for the VoiceEngine). This Invoke has now been moved
into the CM (more tbd).
* The CM now has a pointer to the signaling thread (since that's the
construction thread). That allows us to remove the signaling thread
parameter from the CreateFooChannel methods.
* The ssrc_generator (UniqueRandomIdGenerator) instance for SSRCs moved
from SdpOfferAnswerHandler to the CM, as it's always used in
combination with the CM. This simplifies the CreateFooChannel methods
as well as a couple of other classes that have a CM dependency.
* Removed DestroyFooChannel related code from SdpOfferAnswerHandler since
the channel type detail can be taken care of by the CM.
Bug: webrtc:11992, webrtc:13540
Change-Id: I04938a803734de8489ba31e6212d9eaecc244126
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247904
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35766}
In preparation for switching the default from kPlanB to kUnifiedPlan,
which could cause subtle bugs for those not prepared for it, we change
the default to kNotSpecified. The only purpose of kNotSpecified is to
crash, forcing any dependencies to explicitly set their sdp_semantics
value.
Tests are updated to explicitly set sdp_semantics when necessary, and
where the test does not care we update to kUnifiedPlan.
If this change lands without getting reverted we can let it sit for a
few weeks, after which we should change the default to kUnifiedPlan and
delete kNotSpecified.
Bug: webrtc:11121
Change-Id: I19b669b0735d78e269e19eaae86c2d7d95a91141
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242968
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35651}
This also removes all internal usage of RemoveTrack, and changes
the replacement function to RemoveTrackOrError rather than RemoveTrackNew.
Bug: webrtc:9534
Change-Id: Idf7bb17495686de77c70428dcbfb12278328ce59
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244094
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35624}
Because of this (seemingly simple) change, I had to change the return
type of transport_name from `const std::string&` to `absl::string_view`
to handle the case when there's no transport assigned.
That in turn caused an avalanche of required updates.
Bug: webrtc:12230, webrtc:11993
Change-Id: I16ec6c6a5fc2f5f7c7de572355a3c6ca924bb9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244084
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35617}
So applications don't need to create and inject their own instance of
BasicPortAllocator, just to change these settings.
Bug: webrtc:13145
Change-Id: I08ac8658b4c0ef87019fa579be9195a8a6b50feb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239643
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35476}
This is a partial revert of commit f9e502d935.
Reason for revert: Functionality turns out to be needed by some partners for some months more.
Original change's description:
> Remove enable_dtls_srtp option
>
> This is part of the removal of support for SDES.
>
> Bug: webrtc:11066
> Change-Id: I448d0e0032672c04c87b00550ab4b9d792071a0b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234864
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35262}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:11066, chromium:1271469
Change-Id: I79a90f025e53816789b391bc52a0e896b9be87e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238170
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35378}
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.
Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
Removes the ability to accept nonencrypted answers to encrypted offers.
Fixes some logic around bundled sessions and requirement for
transport parameters.
Bug: webrtc:11066
Change-Id: I56d8628d223614918a1e5260fdb8a117c8c02dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236344
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35298}
This is part of the removal of support for SDES.
Bug: webrtc:11066
Change-Id: I448d0e0032672c04c87b00550ab4b9d792071a0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234864
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35262}
As suggested in another review.
Also add one more guard, and some commentary.
Bug: None
Change-Id: I9b84453ff2533fe01d157fe84f07405d352e1dc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235820
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35245}
for created and connected connections. This will allow making
an informed choice for
https://webrtc-review.googlesource.com/c/src/+/234867
BUG=webrtc:13265
Change-Id: Ica3bb7695f53403e481ab1ea2a78fa2719fe44a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234867
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35203}
This patch adds support for manually setting subnets that
should be handled as VPN, i.e be subject to VpnPreference,
in case webrtc fails to auto-detect VPNs.
Bug: webrtc:13097
Change-Id: I42514f0677a35cfe30ad053570fa9c2a5b4a856b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230122
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34852}
This patch adds a vp preference field to RTCConfig.
DEFAULT, // No VPN preference.
ONLY_USE_VPN, // only use VPN connections.
NEVER_USE_VPN, // never use VPN connections
PREFER_VPN, // use a VPN connection if possible, i.e VPN connections sorts higher than all other connections.
AVOID_VPN, // only use VPN if there is no other connections, i.e VPN connections sorts last.
Bug: webrtc:13097
Change-Id: I3f95bdfa9134e082c7d389f803bd08facfb70262
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229591
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34842}
This reverts commit 37ee0f5e59.
Reason for revert: Revert in order to be able to revert https://webrtc-review.googlesource.com/c/src/+/225642
Original change's description:
> Use backticks not vertical bars to denote variables in comments for /pc
>
> Bug: webrtc:12338
> Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34575}
TBR=hta@webrtc.org,titovartem@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I5eddd3a14e1f664bf831e5c294fbc4de5f6a88af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227082
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34577}
Uppercase constants are more likely to conflict with macros (for
example rtc::SRTP_AES128_CM_SHA1_80 and OpenSSL SRTP_AES128_CM_SHA1_80).
This CL renames some constants and follows the C++ style guide.
Bug: webrtc:12997
Change-Id: I2398232568b352f88afed571a9b698040bb81c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226564
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34553}