Commit graph

20 commits

Author SHA1 Message Date
Mirko Bonadei
5eb43b4777 Prefix HAVE_SCTP macro with WEBRTC_.
Generated automatically with:

  git grep -l "\bHAVE_SCTP\b" | xargs \
    sed -i '' 's/HAVE_SCTP/WEBRTC_HAVE_SCTP/g'

Bug: webrtc:11142
Change-Id: I30e16a40ca7a7e388940191df22b705265b42cb4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202251
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33042}
2021-01-20 10:51:07 +00:00
Harald Alvestrand
a3dd772e7a Add create function for PeerConnection that can return an error.
Needed in order to return different codes for different failures
in initialization.

Sideswipe: Check TURN URL hostnames for illegal characters.

Bug: webrtc:12238
Change-Id: I1af3a37b9654b83b268304f7356049f9f3786b7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195541
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32710}
2020-11-27 11:08:10 +00:00
Harald Alvestrand
6216693363 Change PeerConnection creation to use a static "Create" method
This allows making more members (including IsUnifiedPlan) const in a future CL.

Also revises the test for ReportUsageHistogram to use a configuration member
variable rather than a hook function in PeerConnectionFactory.

Bug: webrtc:12079
Change-Id: I6f1af7d6164c8a0d8466f76378a925d72d57d685
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190280
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32485}
2020-10-26 10:04:06 +00:00
Harald Alvestrand
ffd5dc70eb Delete the "initialize" method of PeerConnectionFactory
Also remove the "initialized" concept from ConnectionContext.

This CL also always creates the objects on the signaling thread.
Makes the initialization code slightly more readable.

Bug: webrtc:11967
Change-Id: I5e451a3c5225c29c30d32bb4843df8c107ec30c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188626
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32453}
2020-10-20 16:52:39 +00:00
Harald Alvestrand
44d0dff7a9 Move the PeerConnection's usage pattern concept to its own file.
This makes it easier to use it from multiple other modules.

Bug: webrtc:11995
Change-Id: Id23843ae4600ebe46aed7465e873d107089fd50b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187347
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32361}
2020-10-09 08:29:45 +00:00
Ying Wang
ef3998ffd1 Add directive to make webrtc metrics optional.
Bug: webrtc:11144
Change-Id: I4e75e6aec033784685de3670e880bb9f2b6ee8d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30040}
2019-12-09 13:55:50 +00:00
Qingsi Wang
32913c128a Removes the flakiness in PeerConnectionUsageHistogramTest.
Bug: webrtc:9494, webrtc:11048
Change-Id: I5e6498f10259ee76af682d7019b89bf1f5bb9699
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29659}
2019-10-31 00:18:16 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Qingsi Wang
cc46b10cd0 Add a usage pattern bit for host-host connections.
Bug: None
Change-Id: I66dee594295212fcc40a7706f688c9ab15967775
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149341
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29172}
2019-09-12 18:55:48 +00:00
Niels Möller
2579f0c584 RTCError as return type for PeerConnectionInterface::SetConfiguration
Bug: None
Change-Id: I6dd7378ceac617e29945d72906cb8e2e0bd49538
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149166
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28910}
2019-08-20 06:52:05 +00:00
Qingsi Wang
1ba5dec769 Reland "Set the usage pattern bits for adding remote ICE candidates from SDP."
This is a reland of 7c6f74ab03

Compared to the previous commit, new bits are added to log calls of
AddIceCandidate, and the gathering and reception of IPv6 candidates.

Original change's description:
> Set the usage pattern bits for adding remote ICE candidates from SDP.
>
> Currently these bits are only set when a remote ICE candidate is
> successfully added via addIceCandidate. For non-trickled sessions in
> which the remote candidates are added via the remote description, these
> bits are lost. This also happens for trickled sessions, though a rare
> case, when addIceCandidate does not succeed because the peer connection
> is not ready to add any remote candidate.
>
> Bug: webrtc:10868
> Change-Id: Ib2f199f9ffc936060473934d25ba397ef31131a3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148880
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28844}

Bug: webrtc:10868
Change-Id: Ifac0593dcfb64d88619fd24b4ab61c14a0810beb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149024
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28904}
2019-08-19 19:32:26 +00:00
Qingsi Wang
d419808e45 Revert "Set the usage pattern bits for adding remote ICE candidates from SDP."
This reverts commit 7c6f74ab03.

Reason for revert: Need to merge with stacked changes on bits in a single patch to avoid disruption.

Original change's description:
> Set the usage pattern bits for adding remote ICE candidates from SDP.
> 
> Currently these bits are only set when a remote ICE candidate is
> successfully added via addIceCandidate. For non-trickled sessions in
> which the remote candidates are added via the remote description, these
> bits are lost. This also happens for trickled sessions, though a rare
> case, when addIceCandidate does not succeed because the peer connection
> is not ready to add any remote candidate.
> 
> Bug: webrtc:10868
> Change-Id: Ib2f199f9ffc936060473934d25ba397ef31131a3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148880
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28844}

TBR=hta@webrtc.org,qingsi@webrtc.org

Change-Id: Ia0d24b345f04e6c83199d7692bb55a440e6ff464
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10868
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149023
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28845}
2019-08-13 18:29:48 +00:00
Qingsi Wang
7c6f74ab03 Set the usage pattern bits for adding remote ICE candidates from SDP.
Currently these bits are only set when a remote ICE candidate is
successfully added via addIceCandidate. For non-trickled sessions in
which the remote candidates are added via the remote description, these
bits are lost. This also happens for trickled sessions, though a rare
case, when addIceCandidate does not succeed because the peer connection
is not ready to add any remote candidate.

Bug: webrtc:10868
Change-Id: Ib2f199f9ffc936060473934d25ba397ef31131a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28844}
2019-08-13 17:23:35 +00:00
Danil Chapovalov
53d45baa50 Make TaskQueueFactory required construction parameter for Call
Bug: webrtc:10284
Change-Id: I573ee0087c035e26918260c21b8b0213ddfe7ebc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143791
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28467}
2019-07-03 14:02:45 +00:00
Qingsi Wang
ecd3054b56 Replace a broken assumption in candidate gathering for mDNS candidates.
The gathering of host candidates with mDNS names is asynchronous and its
completion can happen after a srflx candidate is gathered by the same
underlying socket. We have a broken check in UDPPort::CreateConnection()
that assumes the gathering of host and srflx candidates is sequential.

This CL also does minor refactoring and clean-up.

Bug: chromium:944577
Change-Id: Ic28136a9515081f40b232a22fcbf4209814ed33a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138043
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28030}
2019-05-22 22:58:58 +00:00
Jeroen de Borst
af242c8645 Extending UsagePattern and private IP addresses.
Adding additional usage bits to the UsagePattern to:
- Track whether a mDNS candidate was collected
- Track whether a mDNS candidate was received from the remote peer
- Track whether a private IP address was received from the remote peer

The definition of a private IP address is extended to include 100.64/10 addresses.


Bug: None
Change-Id: I77182685120413d5c13c5f67e480d33fdcaefc6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134000
Commit-Queue: Jeroen de Borst <jeroendb@webrtc.org>
Reviewed-by: Justin Uberti <juberti@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27747}
2019-04-24 20:57:20 +00:00
Danil Chapovalov
f5258be6f4 Make PeerConnectionFactory constructor taking dependency the only constructor
Bug: None
Change-Id: I19e9fab1ecec3799cc7b8573ab3fd6b258114cce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128601
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27194}
2019-03-19 19:37:15 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from pc/peerconnection_histogram_unittest.cc (Browse further)