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}
This breaks the link from sdp_offer_answer.cc to channel.h.
Bug: webrtc:13931
Change-Id: I75608f75713bf4e69013ac5f5b17c19e53d07519
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36757}
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 apply IWYU to all .cc files in pc/, and correct BUILD file to match.
Note: Some files came out wrong when iwyu was applied. These are not included.
Bug: none
Change-Id: Ib5ea46b8fcc505414d0447cca7218ad3afc2e321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36064}
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 a reland of commit 704a834f68,
after it was reverted in order to merge a CL to M93.
Original change's description:
> Fix bug where we assume new m= sections will always be bundled.
>
> A recent change [1] assumes that all new m= sections will share the
> first BUNDLE group (if one already exists), which avoids generating
> ICE candidates that are ultimately unnecessary. This is fine for JSEP
> endpoints, but it breaks the following scenarios for non-JSEP endpoints:
>
> * Remote offer adding a new m= section that's not part of any BUNDLE
> group.
> * Remote offer adding an m= section to the second BUNDLE group.
>
> The latter is specifically problematic for any application that wants
> to bundle all audio streams in one group and all video streams in
> another group when using Unified Plan SDP, to replicate the behavior of
> using Plan B without bundling. It may try to add a video stream only
> for WebRTC to bundle it with audio.
>
> This is fixed by doing some minor re-factoring, having BundleManager
> update the bundle groups at offer time.
>
> Also:
> * Added some additional validation for multiple bundle groups in a
> subsequent offer, since that now becomes relevant.
> * Improved rollback support, because now rolling back an offer may need
> to not only remove mid->transport mappings but alter them.
>
> [1]: https://webrtc-review.googlesource.com/c/src/+/221601
>
> Bug: webrtc:12906, webrtc:12999
> Change-Id: I4c6e7020c0be33a782d3608dee88e4e2fceb1be1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225642
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34544}
Bug: webrtc:12906, webrtc:12999
Change-Id: Id6acab2e2d7430c65f4b6a1d7372388a70cc18ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228465
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34728}
This relands commit I41cae74605fecf454900a958776b95607ccf3745, after
reverting it in order to merge the revert to M93 (the deadline for
which is now exceeded).
Original change description:
> If a bundle is established, then per JSEP, the offerer is required to
> include the new track in the bundle, and per BUNDLE, the answerer has
> to either accept the track as part of the bundle or reject the track;
> it cannot move it out of the group. So we will never need the transport.
>
> Bug: webrtc:12837
> Change-Id: I41cae74605fecf454900a958776b95607ccf3745
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221601
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34290}
Bug: webrtc:12837
Change-Id: I30a8f03165ab797ed766b51c4eb15c2a9cecb5ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228500
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34727}
This reverts commit I41cae74605fecf454900a958776b95607ccf3745
Reason for revert: Needed in order to cherry pick this revert into M93,
in order to fix crbug.com/1236202.
Original change description:
> If a bundle is established, then per JSEP, the offerer is required to
> include the new track in the bundle, and per BUNDLE, the answerer has
> to either accept the track as part of the bundle or reject the track;
> it cannot move it out of the group. So we will never need the transport.
>
> Bug: webrtc:12837
> Change-Id: I41cae74605fecf454900a958776b95607ccf3745
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221601
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34290}
TBR=hta@webrtc.org
Bug: webrtc:12837, chromium:1236202
Change-Id: Ie59e2ad5168e6829eefa67b1031b8f400ed66507
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227822
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34669}
This reverts commit 704a834f68.
Reason for revert: Reverting this in order to revert
https://webrtc-review.googlesource.com/c/src/+/221601, so we can
merge that revert to M93.
Original change's description:
> Reland "Fix bug where we assume new m= sections will always be bundled."
>
> This is a reland of d2b885fd91, after
> making sure transports that are just being kept alive in case of
> rollback don't contribute to connection state, which broke a WPT.
>
> Original change's description:
> > Fix bug where we assume new m= sections will always be bundled.
> >
> > A recent change [1] assumes that all new m= sections will share the
> > first BUNDLE group (if one already exists), which avoids generating
> > ICE candidates that are ultimately unnecessary. This is fine for JSEP
> > endpoints, but it breaks the following scenarios for non-JSEP endpoints:
> >
> > * Remote offer adding a new m= section that's not part of any BUNDLE
> > group.
> > * Remote offer adding an m= section to the second BUNDLE group.
> >
> > The latter is specifically problematic for any application that wants
> > to bundle all audio streams in one group and all video streams in
> > another group when using Unified Plan SDP, to replicate the behavior of
> > using Plan B without bundling. It may try to add a video stream only
> > for WebRTC to bundle it with audio.
> >
> > This is fixed by doing some minor re-factoring, having BundleManager
> > update the bundle groups at offer time.
> >
> > Also:
> > * Added some additional validation for multiple bundle groups in a
> > subsequent offer, since that now becomes relevant.
> > * Improved rollback support, because now rolling back an offer may need
> > to not only remove mid->transport mappings but alter them.
> >
> > [1]: https://webrtc-review.googlesource.com/c/src/+/221601
> >
> > Bug: webrtc:12906, webrtc:12999
> > Change-Id: I4c6e7020c0be33a782d3608dee88e4e2fceb1be1
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225642
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34544}
>
> Bug: webrtc:12906, webrtc:12999
> Change-Id: I68bf988b1918dd2d51de76e53e4fd696fea5a09b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227120
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34596}
TBR=hta@webrtc.org
Bug: webrtc:12906, webrtc:12999
Change-Id: I129d9eb3b9831317fa24b0263db191027246cb99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227821
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34666}
This is a reland of d2b885fd91, after
making sure transports that are just being kept alive in case of
rollback don't contribute to connection state, which broke a WPT.
Original change's description:
> Fix bug where we assume new m= sections will always be bundled.
>
> A recent change [1] assumes that all new m= sections will share the
> first BUNDLE group (if one already exists), which avoids generating
> ICE candidates that are ultimately unnecessary. This is fine for JSEP
> endpoints, but it breaks the following scenarios for non-JSEP endpoints:
>
> * Remote offer adding a new m= section that's not part of any BUNDLE
> group.
> * Remote offer adding an m= section to the second BUNDLE group.
>
> The latter is specifically problematic for any application that wants
> to bundle all audio streams in one group and all video streams in
> another group when using Unified Plan SDP, to replicate the behavior of
> using Plan B without bundling. It may try to add a video stream only
> for WebRTC to bundle it with audio.
>
> This is fixed by doing some minor re-factoring, having BundleManager
> update the bundle groups at offer time.
>
> Also:
> * Added some additional validation for multiple bundle groups in a
> subsequent offer, since that now becomes relevant.
> * Improved rollback support, because now rolling back an offer may need
> to not only remove mid->transport mappings but alter them.
>
> [1]: https://webrtc-review.googlesource.com/c/src/+/221601
>
> Bug: webrtc:12906, webrtc:12999
> Change-Id: I4c6e7020c0be33a782d3608dee88e4e2fceb1be1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225642
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34544}
Bug: webrtc:12906, webrtc:12999
Change-Id: I68bf988b1918dd2d51de76e53e4fd696fea5a09b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227120
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34596}
This reverts commit d2b885fd91.
Reason for revert: Speculative revert for Chromium importer
Original change's description:
> Fix bug where we assume new m= sections will always be bundled.
>
> A recent change [1] assumes that all new m= sections will share the
> first BUNDLE group (if one already exists), which avoids generating
> ICE candidates that are ultimately unnecessary. This is fine for JSEP
> endpoints, but it breaks the following scenarios for non-JSEP endpoints:
>
> * Remote offer adding a new m= section that's not part of any BUNDLE
> group.
> * Remote offer adding an m= section to the second BUNDLE group.
>
> The latter is specifically problematic for any application that wants
> to bundle all audio streams in one group and all video streams in
> another group when using Unified Plan SDP, to replicate the behavior of
> using Plan B without bundling. It may try to add a video stream only
> for WebRTC to bundle it with audio.
>
> This is fixed by doing some minor re-factoring, having BundleManager
> update the bundle groups at offer time.
>
> Also:
> * Added some additional validation for multiple bundle groups in a
> subsequent offer, since that now becomes relevant.
> * Improved rollback support, because now rolling back an offer may need
> to not only remove mid->transport mappings but alter them.
>
> [1]: https://webrtc-review.googlesource.com/c/src/+/221601
>
> Bug: webrtc:12906, webrtc:12999
> Change-Id: I4c6e7020c0be33a782d3608dee88e4e2fceb1be1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225642
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34544}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:12906, webrtc:12999
Change-Id: I00179d7573f322ad539ff16cad1f85320cfb2270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227081
Reviewed-by: Björn Terelius <terelius@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34578}
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}
A recent change [1] assumes that all new m= sections will share the
first BUNDLE group (if one already exists), which avoids generating
ICE candidates that are ultimately unnecessary. This is fine for JSEP
endpoints, but it breaks the following scenarios for non-JSEP endpoints:
* Remote offer adding a new m= section that's not part of any BUNDLE
group.
* Remote offer adding an m= section to the second BUNDLE group.
The latter is specifically problematic for any application that wants
to bundle all audio streams in one group and all video streams in
another group when using Unified Plan SDP, to replicate the behavior of
using Plan B without bundling. It may try to add a video stream only
for WebRTC to bundle it with audio.
This is fixed by doing some minor re-factoring, having BundleManager
update the bundle groups at offer time.
Also:
* Added some additional validation for multiple bundle groups in a
subsequent offer, since that now becomes relevant.
* Improved rollback support, because now rolling back an offer may need
to not only remove mid->transport mappings but alter them.
[1]: https://webrtc-review.googlesource.com/c/src/+/221601
Bug: webrtc:12906, webrtc:12999
Change-Id: I4c6e7020c0be33a782d3608dee88e4e2fceb1be1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225642
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34544}
If a bundle is established, then per JSEP, the offerer is required to
include the new track in the bundle, and per BUNDLE, the answerer has
to either accept the track as part of the bundle or reject the track;
it cannot move it out of the group. So we will never need the transport.
Bug: webrtc:12837
Change-Id: I41cae74605fecf454900a958776b95607ccf3745
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221601
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34290}
This entails instantly deleting the transport when it is no longer
referenced by any MID.
Also adds consistency checks to JsepTransportCollection.
Bug: webrtc:12837
Change-Id: I85775aeb676aac3a9aee74280cc72ac87a0f49b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221982
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34273}
This is part of the work to make Bundle handling understandable,
so that we can get it to work right.
Bug: webrtc:12837
Change-Id: I77f046b4bac2d9709460b3b956a2edc3df0cdaac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221745
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34261}
This is step 1: Encapsulating the data.
Bug: webrtc:12837
Change-Id: I15df30dc294c90136a90b072608ed4c2e8925dcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221602
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34245}
Reland of commit a743303211
Previously, RTP header extensions with encryption had been filtered
if the encryption had been activated (not the other way around) which
was likely an unintended logic inversion.
In addition, it ensures that encrypted RTP header extensions are only
negotiated if RTP header extension encryption is turned on. Formerly,
which extensions had been negotiated depended on the order in which
they were inserted, regardless of whether or not header encryption was
actually enabled, leading to no extensions being sent on the wire.
Further changes:
- If RTP header encryption enabled, prefer encrypted extensions over
non-encrypted extensions
- Add most extensions to list of extensions supported for encryption
- Discard encrypted extensions in a session description in case encryption
is not supported for that extension
- Mark FindHeaderExtensionByUri without filter argument as deprecated
Bug: webrtc:11713
Change-Id: I52a5ade1b94bc01d1c2a35cb56023684fcaf9982
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34129}
In this CL, JsepTransportController and MediaSessionDescriptionFactory
are updated not to assume that there only exists at most a single BUNDLE
group but a list of N groups. This makes it possible to create multiple
BUNDLE groups by having multiple "a=group:BUNDLE" lines in the SDP.
This makes it possible to have some m= sections in one group and some
other m= sections in another group. For example, you could group all
audio m= sections in one group and all video m= sections in another
group. This enables "send all audio tracks on one transport and all
video tracks on another transport" in Unified Plan. This is something
that was possible in Plan B because all ssrcs in the same m= section
were implicitly bundled together forming a group of audio m= section and
video m= section (even without use of the BUNDLE tag).
PeerConnection will never create multiple BUNDLE groups by default, but
upon setting SDP with multiple BUNDLE groups the PeerConnection will
accept them if configured to accept BUNDLE. This makes it possible to
accept an SFU's BUNDLE offer without having to SDP munge the answer.
C++ unit tests are added. This fix has also been verified manually on:
https://jsfiddle.net/henbos/to89L6ce/43/
Without fix: 0+2 get bundled, 1+3 don't get bundled.
With fix: 0+2 get bundled in first group, 1+3 get bundled in second
group.
Bug: webrtc:10208
Change-Id: Iaf451fa5459c484730c8018274166ef154b19af8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214487
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33838}
This reverts commit a743303211.
Reason for revert: Breaks downstream tests that attempt to call FindHeaderExtensionByUri with 2 arguments. Could you keep the old 2-argument method declaration and just forward the call to the new 3-argument method with a suitable no-op filter?
Original change's description:
> Fix RTP header extension encryption
>
> Previously, RTP header extensions with encryption had been filtered
> if the encryption had been activated (not the other way around) which
> was likely an unintended logic inversion.
>
> In addition, it ensures that encrypted RTP header extensions are only
> negotiated if RTP header extension encryption is turned on. Formerly,
> which extensions had been negotiated depended on the order in which
> they were inserted, regardless of whether or not header encryption was
> actually enabled, leading to no extensions being sent on the wire.
>
> Further changes:
>
> - If RTP header encryption enabled, prefer encrypted extensions over
> non-encrypted extensions
> - Add most extensions to list of extensions supported for encryption
> - Discard encrypted extensions in a session description in case encryption
> is not supported for that extension
>
> Note that this depends on https://github.com/cisco/libsrtp/pull/491 to get
> into libwebrtc (cherry-pick or bump libsrtp version). Otherwise, two-byte
> header extensions will prevent any RTP packets being sent/received.
>
> Bug: webrtc:11713
> Change-Id: Ia0779453d342fa11e06996d9bc2d3c826f3466d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177980
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33723}
TBR=deadbeef@webrtc.org,terelius@webrtc.org,hta@webrtc.org,lennart.grahl@gmail.com
Change-Id: I7df6b0fa611c6496dccdfb09a65ff33ae4a52b26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11713
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215222
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33727}
Previously, RTP header extensions with encryption had been filtered
if the encryption had been activated (not the other way around) which
was likely an unintended logic inversion.
In addition, it ensures that encrypted RTP header extensions are only
negotiated if RTP header extension encryption is turned on. Formerly,
which extensions had been negotiated depended on the order in which
they were inserted, regardless of whether or not header encryption was
actually enabled, leading to no extensions being sent on the wire.
Further changes:
- If RTP header encryption enabled, prefer encrypted extensions over
non-encrypted extensions
- Add most extensions to list of extensions supported for encryption
- Discard encrypted extensions in a session description in case encryption
is not supported for that extension
Note that this depends on https://github.com/cisco/libsrtp/pull/491 to get
into libwebrtc (cherry-pick or bump libsrtp version). Otherwise, two-byte
header extensions will prevent any RTP packets being sent/received.
Bug: webrtc:11713
Change-Id: Ia0779453d342fa11e06996d9bc2d3c826f3466d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33723}
StatsCollector::ExtractSessionInfo was run fully on the signaling thread
and several calls were being made to methods that need to run on the
network thread.
Additionally, BaseChannel::transport_name() was being read directly
on the signaling thread (needs to be read on the network thread).
So with shifting the work that needs to happen on the network thread
over to that thread, we now also grab the transport name there and
use the name with the work that still needs to happen on the signaling
thread.
These changes allow us to remove Invoke<>() calls to the network thread from
callback functions implemented in PeerConnection:
* GetPooledCandidateStats
* GetTransportNamesByMid
* GetTransportStatsByNames
* Also adding a correctness thread check to:
* GetLocalCertificate
* GetRemoteSSLCertChain
Because PeerConnection now has a way of knowing when things are
or have been uninitialized on the network thread, all of these
functions can exit early without doing throw away work.
Additionally removing thread hops that aren't needed anymore from
JsepTransportController.
Using the RTC_LOG_THREAD_BLOCK_COUNT() macro in GetStats, the number
of Invokes (when >1), goes down by 3. Typically from 8->5, 7->4, 6->3.
Bug: webrtc:11687
Change-Id: I06ab25eab301e192e99076d7891444bcb61b491f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214135
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33656}
This reverts commit 5a40b37105.
Reason for revert: Fixed the bug and ran layout tests.
Original change's description:
> Revert "Use the new DNS resolver API in PeerConnection"
>
> This reverts commit acf8ccb3c9.
>
> Reason for revert: Speculative revert for https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/b8851745102358680592/overview.
>
> Original change's description:
> > Use the new DNS resolver API in PeerConnection
> >
> > Bug: webrtc:12598
> > Change-Id: I5a14058e7f28c993ed927749df7357c715ba83fb
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212961
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33561}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta@webrtc.org
>
> Bug: webrtc:12598
> Change-Id: Idc9853cb569849c49052f9cbd865614710fff979
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213188
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33591}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:12598
Change-Id: Ief7867f2f23de66504877cdab1b23a11df2d5de4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214120
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33647}
Make a few more members const, remove members that aren't used,
set max ssl version number on construction and remove setter.
Bug: none
Change-Id: I6c1a7cabf1e795e027f1bc53b994517e9aef0e93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33622}
SdpOfferAnswerHandler now hands over most of the work of adding a
remote candidate over to PeerConnection where the work will be
carried out asynchronously on the network thread (was
synchronous/blocking).
Once added, reporting (ReportRemoteIceCandidateAdded) continues on the
signaling thread as before. The difference is though that we don't
block the UseCandidate() operation which is a part of applying the
local and remote descriptions.
Besides now being asynchronous, there's one behavioural change:
Before starting the 'add' operation, the validity of the candidate
instance to be added, is checked. Previously if such an error occurred,
the error was silently ignored.
Bug: webrtc:9987
Change-Id: Ic1bfb8e27670fc81038b6ccec95ff36c65d12262
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206063
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33230}
This reverts commit 6e4fcac313.
Reason for revert: Parent CL issue has been resolved.
Original change's description:
> Revert "Remove thread hops from events provided by JsepTransportController."
>
> This reverts commit f554b3c577.
>
> Reason for revert: Parent CL breaks FYI bots.
> See https://webrtc-review.googlesource.com/c/src/+/206466
>
> Original change's description:
> > Remove thread hops from events provided by JsepTransportController.
> >
> > Events associated with Subscribe* methods in JTC had trampolines that
> > would use an async invoker to fire the events on the signaling thread.
> > This was being done for the purposes of PeerConnection but the concept
> > of a signaling thread is otherwise not applicable to JTC and use of
> > JTC from PC is inconsistent across threads (as has been flagged in
> > webrtc:9987).
> >
> > This change makes all CallbackList members only accessible from the
> > network thread and moves the signaling thread related work over to
> > PeerConnection, which makes hops there more visible as well as making
> > that class easier to refactor for thread efficiency.
> >
> > This CL removes the AsyncInvoker from JTC (webrtc:12339)
> >
> > The signaling_thread_ variable is also removed from JTC and more thread
> > checks added to catch errors.
> >
> > Bug: webrtc:12427, webrtc:11988, webrtc:12339
> > Change-Id: Id232aedd00dfd5403b2ba0ca147d3eca7c12c7c5
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206062
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33195}
>
> TBR=nisse@webrtc.org,tommi@webrtc.org
>
> Change-Id: I6134b71b74a9408854b79d44506d513519e9cf4d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:12427
> Bug: webrtc:11988
> Bug: webrtc:12339
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206467
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33203}
TBR=nisse@webrtc.org,tommi@webrtc.org,guidou@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:12427
Bug: webrtc:11988
Bug: webrtc:12339
Change-Id: I4e2e1490e1f9a87ed6ac4d722fd3c442e3059ae0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206809
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33225}
This reverts commit 6b143c1c06.
Reason for revert:
Relanding with updated expectations for SctpTransport::Information
based on TransceiverStateSurfacer in Chromium.
Original change's description:
> Revert "Fix unsynchronized access to mid_to_transport_ in JsepTransportController"
>
> This reverts commit 6cd4058504.
>
> Reason for revert: Breaks WebRTC Chromium FYI Bots
>
> First failure:
> https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20%28dbg%29%20%28L%20Nexus5%29/1925
>
> Failed tests:
> WebRtcDataBrowserTest.CallWithSctpDataAndMedia
> WebRtcDataBrowserTest.CallWithSctpDataOnly
>
> Original change's description:
> > Fix unsynchronized access to mid_to_transport_ in JsepTransportController
> >
> > * Added several thread checks to JTC to help with programmer errors.
> > * Avoid a few Invokes() to the network thread here and there such
> > as for fetching sctp transport name for getStats(). The transport
> > name is now cached when it changes on the network thread.
> > * JsepTransportController instances now get deleted on the network
> > thread rather than on the signaling thread + issuing an Invoke()
> > in the dtor.
> > * Moved some thread hops from JTC over to PC which is where the problem
> > exists and also (imho) makes it easier to see where hops happen in
> > the PC code.
> > * The sctp transport is now started asynchronously when we push down the
> > media description.
> > * PeerConnection proxy calls GetSctpTransport directly on the network
> > thread instead of to the signaling thread + blocking on the network
> > thread.
> > * The above changes simplified things for webrtc::SctpTransport which
> > allowed for removing locking from that class and delete some code.
> >
> > Bug: webrtc:9987, webrtc:12445
> > Change-Id: Ic89a9426e314e1b93c81751d4f732f05fa448fbc
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205620
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33191}
>
> TBR=tommi@webrtc.org,hta@webrtc.org
>
> Change-Id: I7b2913d5133807589461105cf07eff3e9bb7157e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9987
> Bug: webrtc:12445
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206466
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33204}
TBR=tommi@webrtc.org,hta@webrtc.org,guidou@webrtc.org
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9987
Bug: webrtc:12445
Change-Id: Icb205cbac493ed3b881d71ea3af4fb9018701bf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206560
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33219}
This reverts commit 6cd4058504.
Reason for revert: Breaks WebRTC Chromium FYI Bots
First failure:
https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20%28dbg%29%20%28L%20Nexus5%29/1925
Failed tests:
WebRtcDataBrowserTest.CallWithSctpDataAndMedia
WebRtcDataBrowserTest.CallWithSctpDataOnly
Original change's description:
> Fix unsynchronized access to mid_to_transport_ in JsepTransportController
>
> * Added several thread checks to JTC to help with programmer errors.
> * Avoid a few Invokes() to the network thread here and there such
> as for fetching sctp transport name for getStats(). The transport
> name is now cached when it changes on the network thread.
> * JsepTransportController instances now get deleted on the network
> thread rather than on the signaling thread + issuing an Invoke()
> in the dtor.
> * Moved some thread hops from JTC over to PC which is where the problem
> exists and also (imho) makes it easier to see where hops happen in
> the PC code.
> * The sctp transport is now started asynchronously when we push down the
> media description.
> * PeerConnection proxy calls GetSctpTransport directly on the network
> thread instead of to the signaling thread + blocking on the network
> thread.
> * The above changes simplified things for webrtc::SctpTransport which
> allowed for removing locking from that class and delete some code.
>
> Bug: webrtc:9987, webrtc:12445
> Change-Id: Ic89a9426e314e1b93c81751d4f732f05fa448fbc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205620
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33191}
TBR=tommi@webrtc.org,hta@webrtc.org
Change-Id: I7b2913d5133807589461105cf07eff3e9bb7157e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9987
Bug: webrtc:12445
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206466
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33204}
This reverts commit f554b3c577.
Reason for revert: Parent CL breaks FYI bots.
See https://webrtc-review.googlesource.com/c/src/+/206466
Original change's description:
> Remove thread hops from events provided by JsepTransportController.
>
> Events associated with Subscribe* methods in JTC had trampolines that
> would use an async invoker to fire the events on the signaling thread.
> This was being done for the purposes of PeerConnection but the concept
> of a signaling thread is otherwise not applicable to JTC and use of
> JTC from PC is inconsistent across threads (as has been flagged in
> webrtc:9987).
>
> This change makes all CallbackList members only accessible from the
> network thread and moves the signaling thread related work over to
> PeerConnection, which makes hops there more visible as well as making
> that class easier to refactor for thread efficiency.
>
> This CL removes the AsyncInvoker from JTC (webrtc:12339)
>
> The signaling_thread_ variable is also removed from JTC and more thread
> checks added to catch errors.
>
> Bug: webrtc:12427, webrtc:11988, webrtc:12339
> Change-Id: Id232aedd00dfd5403b2ba0ca147d3eca7c12c7c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206062
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33195}
TBR=nisse@webrtc.org,tommi@webrtc.org
Change-Id: I6134b71b74a9408854b79d44506d513519e9cf4d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12427
Bug: webrtc:11988
Bug: webrtc:12339
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206467
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33203}
Events associated with Subscribe* methods in JTC had trampolines that
would use an async invoker to fire the events on the signaling thread.
This was being done for the purposes of PeerConnection but the concept
of a signaling thread is otherwise not applicable to JTC and use of
JTC from PC is inconsistent across threads (as has been flagged in
webrtc:9987).
This change makes all CallbackList members only accessible from the
network thread and moves the signaling thread related work over to
PeerConnection, which makes hops there more visible as well as making
that class easier to refactor for thread efficiency.
This CL removes the AsyncInvoker from JTC (webrtc:12339)
The signaling_thread_ variable is also removed from JTC and more thread
checks added to catch errors.
Bug: webrtc:12427, webrtc:11988, webrtc:12339
Change-Id: Id232aedd00dfd5403b2ba0ca147d3eca7c12c7c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206062
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33195}
* Added several thread checks to JTC to help with programmer errors.
* Avoid a few Invokes() to the network thread here and there such
as for fetching sctp transport name for getStats(). The transport
name is now cached when it changes on the network thread.
* JsepTransportController instances now get deleted on the network
thread rather than on the signaling thread + issuing an Invoke()
in the dtor.
* Moved some thread hops from JTC over to PC which is where the problem
exists and also (imho) makes it easier to see where hops happen in
the PC code.
* The sctp transport is now started asynchronously when we push down the
media description.
* PeerConnection proxy calls GetSctpTransport directly on the network
thread instead of to the signaling thread + blocking on the network
thread.
* The above changes simplified things for webrtc::SctpTransport which
allowed for removing locking from that class and delete some code.
Bug: webrtc:9987, webrtc:12445
Change-Id: Ic89a9426e314e1b93c81751d4f732f05fa448fbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205620
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33191}
Also removing need for lock for ice restart flag, fix call paths and
add information about how JsepTransportController's events could live
fully on the network thread and complexity around signaling thread
should be handled by PeerConnection (more details in webrtc:12427).
Bug: webrtc:12426, webrtc:12427
Change-Id: I9b1fae8acf16d90d9716054fc3c390700877a82a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33159}
- Signal is transferred from jsep_transport_controller to dtls_transport,
jsep_transport_controller is already using Callbacklist and this
modified the dtls_transport to use callback_list.
Bug: webrtc:11943
Change-Id: I4a7ed08e6dab21b8eb515d4d8971f9b084fb8c86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203722
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33137}