Commit graph

85 commits

Author SHA1 Message Date
Niels Möller
16e27a1dc5 Reland "Delete leftover includes and declarations for MediaConstraintsInterface"
Original cl: https://webrtc-review.googlesource.com/95721

Bug: webrtc:9239
Change-Id: I7eac85839182bbcecd0d9bd71ae26f6a1c516df4
Reviewed-on: https://webrtc-review.googlesource.com/96401
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24529}
2018-09-03 09:00:01 +00:00
Niels Moller
ec4a060a55 Revert "Delete leftover includes and declarations for MediaConstraintsInterface"
This reverts commit a1e4ae2371.

Reason for revert: Breakage in downstream code still using constraints.

Original change's description:
> Delete leftover includes and declarations for MediaConstraintsInterface
> 
> Bug: webrtc:9239
> Change-Id: I1f49d6847572faecd6022a44222d6271302fe443
> Reviewed-on: https://webrtc-review.googlesource.com/95721
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24442}

TBR=kwiberg@webrtc.org,nisse@webrtc.org,hta@webrtc.org

Change-Id: Idbef4c57a0d3b82e94a431c5407a86c9fcd4be41
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9239
Reviewed-on: https://webrtc-review.googlesource.com/96160
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24444}
2018-08-27 11:26:42 +00:00
Niels Möller
a1e4ae2371 Delete leftover includes and declarations for MediaConstraintsInterface
Bug: webrtc:9239
Change-Id: I1f49d6847572faecd6022a44222d6271302fe443
Reviewed-on: https://webrtc-review.googlesource.com/95721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24442}
2018-08-27 10:41:57 +00:00
Zach Stein
6fcdc2f708 Support domain name ICE candidates
Bug: webrtc:4165
Change-Id: Icc06bb13120080635cb722b8a8720e7d25426e2d
Reviewed-on: https://webrtc-review.googlesource.com/85540
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24415}
2018-08-24 04:54:43 +00:00
Niels Möller
f06f923ef0 Delete almost all use of MediaConstraintsInterface in the PeerConnection API
Bug: webrtc:9239
Change-Id: I04f4370f624346bf72c7e4e090b57987b558213b
Reviewed-on: https://webrtc-review.googlesource.com/74420
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24396}
2018-08-23 07:14:37 +00:00
Qingsi Wang
7fc821d42d Reland "Reland "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.""
This is a reland of 1a2cc0acba

Original change's description:
> Reland "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*."
>
> This is a reland of 870bca1f41
>
> Original change's description:
> > Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.
> >
> > We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
> > to report the metrics in pc/ and p2p/ that are currently been reported
> > using MetricsObserverInterface.
> >
> > TBR=tommi@webrtc.org
> >
> > Bug: webrtc:9409
> > Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
> > Reviewed-on: https://webrtc-review.googlesource.com/83782
> > Commit-Queue: Qingsi Wang <qingsi@google.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23914}
>
> TBR=steveanton@webrtc.org,hta@webrtc.org,tommi@webrtc.org
>
> Bug: webrtc:9409
> Change-Id: I37fc95ced60dea25aa9b4f5ad44bdf7174c8bd5c
> Reviewed-on: https://webrtc-review.googlesource.com/88060
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Cr-Commit-Position: refs/heads/master@{#23919}

TBR=steveanton@webrtc.org,tommi@webrtc.org

Bug: webrtc:9409
Change-Id: Ib55f0b6c9bcb9d9585924a4dfac5cf643ff4d76b
Reviewed-on: https://webrtc-review.googlesource.com/88343
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23957}
2018-07-12 21:35:47 +00:00
Steve Anton
d78323faba Remove AddTrack override with MediaStreams
Bug: None
Change-Id: I992d356a7271fd89a174b0f458f9030092953b3e
Reviewed-on: https://webrtc-review.googlesource.com/88302
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23943}
2018-07-11 20:17:09 +00:00
Qingsi Wang
78fef76e6a Revert "Reland "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.""
This reverts commit 1a2cc0acba.

Reason for revert: It breaks internal Android debug build. Need further investigation.

Original change's description:
> Reland "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*."
> 
> This is a reland of 870bca1f41
> 
> Original change's description:
> > Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.
> >
> > We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
> > to report the metrics in pc/ and p2p/ that are currently been reported
> > using MetricsObserverInterface.
> >
> > TBR=tommi@webrtc.org
> >
> > Bug: webrtc:9409
> > Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
> > Reviewed-on: https://webrtc-review.googlesource.com/83782
> > Commit-Queue: Qingsi Wang <qingsi@google.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23914}
> 
> TBR=steveanton@webrtc.org,hta@webrtc.org,tommi@webrtc.org
> 
> Bug: webrtc:9409
> Change-Id: I37fc95ced60dea25aa9b4f5ad44bdf7174c8bd5c
> Reviewed-on: https://webrtc-review.googlesource.com/88060
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Cr-Commit-Position: refs/heads/master@{#23919}

TBR=steveanton@webrtc.org,deadbeef@webrtc.org,tommi@webrtc.org,hta@webrtc.org,qingsi@google.com,qingsi@webrtc.org

Change-Id: I4a75fc7f52bfd0780526537a5a9a016fb9c20d6a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9409
Reviewed-on: https://webrtc-review.googlesource.com/88320
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23938}
2018-07-11 18:37:36 +00:00
Qingsi Wang
1a2cc0acba Reland "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*."
This is a reland of 870bca1f41

Original change's description:
> Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.
>
> We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
> to report the metrics in pc/ and p2p/ that are currently been reported
> using MetricsObserverInterface.
>
> TBR=tommi@webrtc.org
>
> Bug: webrtc:9409
> Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
> Reviewed-on: https://webrtc-review.googlesource.com/83782
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23914}

TBR=steveanton@webrtc.org,hta@webrtc.org,tommi@webrtc.org

Bug: webrtc:9409
Change-Id: I37fc95ced60dea25aa9b4f5ad44bdf7174c8bd5c
Reviewed-on: https://webrtc-review.googlesource.com/88060
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23919}
2018-07-11 04:40:26 +00:00
Qingsi Wang
13f4c896d5 Revert "Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*."
This reverts commit 870bca1f41.

Reason for revert: it breaks internal tests and builds

Original change's description:
> Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.
>
> We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
> to report the metrics in pc/ and p2p/ that are currently been reported
> using MetricsObserverInterface.
>
> TBR=tommi@webrtc.org
>
> Bug: webrtc:9409
> Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
> Reviewed-on: https://webrtc-review.googlesource.com/83782
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23914}

TBR=steveanton@webrtc.org,deadbeef@webrtc.org,hta@webrtc.org,tommi@webrtc.org

Change-Id: I1afd92d44f3b8cf3ae9aa6e6daa9a3a272e8097f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9409
Reviewed-on: https://webrtc-review.googlesource.com/88040
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23916}
2018-07-10 21:26:28 +00:00
Qingsi Wang
870bca1f41 Replace the usage of MetricsObserverInterface by RTC_HISTOGRAM_*.
We now use RTC_HISTOGRAM_* macros in system_wrappers/include/metrics.h
to report the metrics in pc/ and p2p/ that are currently been reported
using MetricsObserverInterface.

TBR=tommi@webrtc.org

Bug: webrtc:9409
Change-Id: I47c9975402293c72250203fa1ec19eb1668766f6
Reviewed-on: https://webrtc-review.googlesource.com/83782
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23914}
2018-07-10 20:02:16 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Mirko Bonadei
e12c1fe8d9 Removing warning suppression flags from pc/.
Bug: webrtc:9251
Change-Id: Ic12126fc03309448fe71a17e6b65343949496f4f
Reviewed-on: https://webrtc-review.googlesource.com/86820
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23838}
2018-07-04 10:35:27 +00:00
Harald Alvestrand
183e09d23c Correct data histogram entry for incoming DC
Both incoming and outgoing datachannels should cause
the DATA_ADDED flag to be set.

This CL also moves all tests into their own file, and
improves scaffolding.

Bug: chromium:718508
Change-Id: I5c4c257ccb6f26799f7593bce8b27ebf59015b1e
Reviewed-on: https://webrtc-review.googlesource.com/85348
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23766}
2018-06-28 10:33:23 +00:00
Seth Hampson
1d4a76da0a Fixing flakiness in PeerConnectionIntegrationTest.
EndToEndConnectionTimeWithTurnTurnPair was failing intermittently due to
a DCHECK being hit in ports.cc. This was caused by the ScopedFakeClock
being destroyed before the ports. The ports miscalculated a large
negative number for the rtt of a STUN request/response due to the global
clock changing. This fixes the problem by closing the PeerConnections
before the ScopedFakeClock goes out of scope.

Bug: webrtc:9422
Change-Id: Ia4aa3f638dff5da4317a35cf1514ec61472d0d74
Reviewed-on: https://webrtc-review.googlesource.com/84241
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23670}
2018-06-19 22:34:53 +00:00
Taylor Brandstetter
a465344e39 Return SSRC stats with the old stats API when SSRCs are unsignaled.
This is the simplest possible fix, returning SSRC stats with a missing
track ID instead of returning no SSRC stats at all.

This means calling GetStats with the track selector argument will still not
work in this case.

Bug: webrtc:3342
Change-Id: I6b58fd5ac15b49274d3f1655e78ae36c4575e5fd
Reviewed-on: https://webrtc-review.googlesource.com/82260
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23667}
2018-06-19 17:28:25 +00:00
Seth Hampson
aed7164bde Updated PeerConnection integration test to fix race condition.
The PeerConnection integration test was creating TurnServers on the
stack on the signaling thread. This could cause a race condition problem
when the test was being taken down. Since the turn server was destructed
on the signaling thread, a socket might still try and send to it after
it was destroyed causing a seg fault. This change creates/destroys the
TestTurnServers on the network thread to fix this issue.

Bug: None
Change-Id: I080098502b737f0972ce2fa5357920de057a3312
Reviewed-on: https://webrtc-review.googlesource.com/81301
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23590}
2018-06-13 00:20:10 +00:00
Qingsi Wang
7685e86fa6 Pass the RtcEventLog instance to ICE via JsepTransportController.
This CL fixes a bug that the RtcEventLog owned by PeerConnection was not
passed to P2PTransportChannel after JsepTransportController was
introduced to deprecate the legacy TransportController.

Bug: webrtc:9337
Change-Id: I406cd9c0761dfe67f969aa99c6141e1ab38249d5
Reviewed-on: https://webrtc-review.googlesource.com/79964
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23572}
2018-06-12 05:04:35 +00:00
Niels Möller
2d02e085de Delete deprecated CreateAudioSource method, with constraints.
Bug: webrtc:9239
Change-Id: I5025b7fd103247e0426ceabedc1216a4f0f0ab34
Reviewed-on: https://webrtc-review.googlesource.com/76560
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23501}
2018-06-04 08:19:30 +00:00
Harald Alvestrand
8ebba7420c Add collection of usage signatures on PeerConnections
This generates a number that represent a set of bits that
indicates how a PeerConnection has been used over time.

Bug: chromium:718508
Change-Id: I6df177684c50bc825bc41ea97996574292084d41
Reviewed-on: https://webrtc-review.googlesource.com/79823
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23471}
2018-05-31 13:07:09 +00:00
Benjamin Wright
2d5f3cb933 Added an integration test to validate TURN servers can send media in relay mode.
End to end test for media sent over a TCP TURN server with both clients in relay
This test validates that media can be sent between two clients who are set up
to relay information with the server configured to use TCP instead of UDP.

Bug: webrtc:7668
Change-Id: I3efd04048589c144494f90f2cdf3df5f9f80300e
Reviewed-on: https://webrtc-review.googlesource.com/76507
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23354}
2018-05-23 00:28:39 +00:00
Niels Möller
0f405825c7 New class FakePeriodicVideoTrackSource, simplifying shutdown logic.
Previous code had a FakePeriodicVideoSource and a
VideoTrackSource, where the latter is reference counted and
outlives the former. That results in potential races when
RemoveSink is called on the VideoTrackSource after the
FakePeriodicVideoSource is destroyed, with a complicated sequence
to do correct shutdown.

The new class, FakePeriodicVideoTrackSource, owns a
FakePeriodicVideoSource, and they get the same lifetime.

Bug: webrtc:6353
Change-Id: Ic33b393e00a31fa28893dce2018948d3f90e0a9e
Reviewed-on: https://webrtc-review.googlesource.com/76961
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23320}
2018-05-21 10:27:55 +00:00
Anders Carlsson
5f2bb62f71 Remove dependency in FakeWebRtcVideoCodecFactories.
Previously, constructing a PeerConnection or WebRtcVideoEngine with
fake encoder/decoder factories would result in the real, built-in factories
also being used. In https://webrtc-review.googlesource.com/c/src/+/71162, this
changed, so to temporarily allow tests to continue working exactly the same as
before, the fake factories started encapsulating the real factories. This CL
removes that behavior and updates the tests accordingly.

Bug: webrtc:9228
Change-Id: Ida14a1e3f5f5a0e2f03100b7895b3b1bdf0a0a42
Reviewed-on: https://webrtc-review.googlesource.com/75260
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23209}
2018-05-14 09:29:19 +00:00
Niels Möller
5c7efe7fe8 Refactor PeerConnectionIntegrationTest to not use cricket::VideoCapturer
Bug: webrtc:6353
Change-Id: Ie3f6411d8e21eaad6927c94af126213e650994ca
Reviewed-on: https://webrtc-review.googlesource.com/74587
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23203}
2018-05-11 09:22:20 +00:00
Benjamin Wright
d6f86e8fca This changeset adds dependency injection support for SSL Root Certs.
This extends the API surface so that
custom certificates can be provided by an API user in both the standalone and
factory creation paths for the OpenSSLAdapter. Prior to this change the SSL
roots were hardcoded in a header file and directly included into
openssladapter.cc. This forces the 100 kilobytes of certificates to always be
compiled into the library. This is undesirable in certain linking cases where
these certificates can be shared from another binary that already has an
equivalent set of trusted roots hard coded into the binary.

Support for removing the hard coded SSL roots has also been added through a new
build flag. By default the hard coded SSL roots will be included and will be
used if no other trusted root certificates are provided.

The main goal of this CL is to reduce total binary size requirements of WebRTC
by about 100kb in certain applications where adding these certificates is
redundant.

Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f

Bug: chromium:526260
Change-Id: Ifd36d92b5cb32d1b3098a61ddfc244d76df8f30f
Reviewed-on: https://webrtc-review.googlesource.com/64841
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23180}
2018-05-09 00:24:05 +00:00
Sebastian Jansson
5f83cf0c6d Replacing rtc::TimeDelta with webrtc::TimeDelta.
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.

Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
2018-05-08 13:22:53 +00:00
Anders Carlsson
6753795409 Built in video codec factories.
To prepare for making the software codecs optional and injectable, these
codec factories provide a way to pass in identical factories as were the
default old behaviour.

Bug: webrtc:7925
Change-Id: I0c70fa3c56c999e9d1af6e172eff2fbba849e921
Reviewed-on: https://webrtc-review.googlesource.com/71162
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23096}
2018-05-03 11:49:42 +00:00
Steve Anton
df527fd6a6 Add e2e test for multiple video tracks without signaling SSRCs
This is intended to exercise end-to-end sending with the MID RTP
header extension and demuxing by MID.

Bug: webrtc:4050
Change-Id: I81edb3687c65f5efce9591fa34cb03522ad675e5
Reviewed-on: https://webrtc-review.googlesource.com/71601
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23062}
2018-04-27 23:29:23 +00:00
Benjamin Wright
e782abab19 Revert "TCP TURN Integration Test"
This reverts commit edbd389ecc.

Reason for revert: Breaking integration on Linux.

Original change's description:
> TCP TURN Integration Test
> 
> This changeset adds a new integration test to do basic validation that TCP
> TURN functionality works in WebRTC. It simply sets up a TestTurnServer
> configured to relay over TCP and then allows the clients to connect to this
> server over TCP.
> 
> Bug: webrtc:7668
> Change-Id: Id9f3b4e22f40ace7c7eeddf103b5d954a0872777
> Reviewed-on: https://webrtc-review.googlesource.com/70568
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23044}

TBR=deadbeef@webrtc.org,stefan@webrtc.org,pthatcher@webrtc.org,benwright@webrtc.org

Change-Id: Icdf8747d7a1a7bd2a1a29f1536821a0eacb7764e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7668
Reviewed-on: https://webrtc-review.googlesource.com/72961
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23045}
2018-04-26 18:43:49 +00:00
Benjamin Wright
edbd389ecc TCP TURN Integration Test
This changeset adds a new integration test to do basic validation that TCP
TURN functionality works in WebRTC. It simply sets up a TestTurnServer
configured to relay over TCP and then allows the clients to connect to this
server over TCP.

Bug: webrtc:7668
Change-Id: Id9f3b4e22f40ace7c7eeddf103b5d954a0872777
Reviewed-on: https://webrtc-review.googlesource.com/70568
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23044}
2018-04-26 17:33:27 +00:00
Qingsi Wang
a2d60679c9 Reland "Add thread checker to PortAllocator and its subclasses and fix a bug causing memory contention by threads."
This is a reland of fc43d11717

Original change's description:
> Add thread checker to PortAllocator and its subclasses and fix a bug
> causing memory contention by threads.
>
> PortAllocator and its subclasses assume all of their methods except the
> constructor must be called on the same thread (the network thread in
> practice). This CL adds a thread checker to PortAllocator and its
> subclasses for thread safety, and fixes bugs of invoking some of their
> methods in PeerConnection on the signaling thread.
>
> Bug: webrtc:9112
> Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
> Reviewed-on: https://webrtc-review.googlesource.com/66945
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22814}

Bug: webrtc:9112
Change-Id: I5c7377f05c0daccbe469e2fdbdfacabc5c222f4c
Reviewed-on: https://webrtc-review.googlesource.com/69422
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22889}
2018-04-16 21:44:28 +00:00
Zhi Huang
365381fdf1 Replace BundleFilter with RtpDemuxer in RtpTransport.
BundleFilter is replaced by RtpDemuxer in RtpTransport for payload
type-based demuxing. RtpTransport will support MID-based demuxing later.

Each BaseChannel has its own RTP demuxing criteria and when connecting
to the RtpTransport, BaseChannel will register itself as a demuxer sink.

The inheritance model is changed. New inheritance chain:
DtlsSrtpTransport->SrtpTransport->RtpTranpsort

The JsepTransport2 is renamed to JsepTransport.

NOTE:
When RTCP packets are received, Call::DeliverRtcp will be called for
multiple times (webrtc:9035) which is an existing issue. With this CL,
it will become more of a problem and should be fixed.

Bug: webrtc:8587
Change-Id: Ibd880e7b744bd912336a691309950bc18e42cf62
Reviewed-on: https://webrtc-review.googlesource.com/65786
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22867}
2018-04-14 00:57:11 +00:00
Steve Anton
3acffc3b16 Remove SdpSemantics::kDefault
This adds confusion to the native API and is only needed for
Chromium UMA metrics, so the appropriate metrics have been moved
upstream and kDefault option removed.

Bug: chromium:811683
Change-Id: I666d7f7793765b8d6edcd99416c8b6c957766f00
Reviewed-on: https://webrtc-review.googlesource.com/59261
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22864}
2018-04-13 17:03:08 +00:00
Taylor Brandstetter
60c8dc8470 Adding regression test for rejecting and un-rejecting an m= section.
This was previously not working because the answerer wasn't generating
ICE credentials when it should have been.

This was fixed inadvertently by:
https://webrtc-review.googlesource.com/c/src/+/46380

But we should really also have a PeerConnection-level regression test
for this.

Bug: webrtc:6023
Change-Id: I3da900edcc8db8034ed61a7bb981d9c0e616254e
Reviewed-on: https://webrtc-review.googlesource.com/69403
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22832}
2018-04-11 23:29:36 +00:00
Steve Anton
ba42e99f18 Report an error when trying to set complex Plan B SDP on Unified Plan
This changes the PeerConnection when in Unified Plan mode to reject
SDP applied with SetLocalDescription or SetRemoteDescription if the
SDP has multiple "Plan B tracks" (a=ssrc lines) in a media section.
The error is to inform developers that the given SDP will not be
interpreted as they might expect.

Bug: None
Change-Id: I7a0e11282fbf63dac06038cd22a66683517a87d0
Reviewed-on: https://webrtc-review.googlesource.com/68764
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22829}
2018-04-11 18:16:26 +00:00
Patrik Höglund
3dc41069ef Revert "Add thread checker to PortAllocator and its subclasses and fix a bug"
This reverts commit fc43d11717.

Reason for revert: Crashes downstream tests

Original change's description:
> Add thread checker to PortAllocator and its subclasses and fix a bug
> causing memory contention by threads.
> 
> PortAllocator and its subclasses assume all of their methods except the
> constructor must be called on the same thread (the network thread in
> practice). This CL adds a thread checker to PortAllocator and its
> subclasses for thread safety, and fixes bugs of invoking some of their
> methods in PeerConnection on the signaling thread.
> 
> Bug: webrtc:9112
> Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
> Reviewed-on: https://webrtc-review.googlesource.com/66945
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22814}

TBR=deadbeef@webrtc.org,pthatcher@google.com,pthatcher@webrtc.org,qingsi@google.com,honghaiz@webrtc.org

Change-Id: I2db6561d5d6366d38caa58c3e719d0d48eda70c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9112
Reviewed-on: https://webrtc-review.googlesource.com/69200
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22818}
2018-04-11 11:15:08 +00:00
Qingsi Wang
fc43d11717 Add thread checker to PortAllocator and its subclasses and fix a bug
causing memory contention by threads.

PortAllocator and its subclasses assume all of their methods except the
constructor must be called on the same thread (the network thread in
practice). This CL adds a thread checker to PortAllocator and its
subclasses for thread safety, and fixes bugs of invoking some of their
methods in PeerConnection on the signaling thread.

Bug: webrtc:9112
Change-Id: I33ba9bae72ec09a45ec70435962f3f25cd31583c
Reviewed-on: https://webrtc-review.googlesource.com/66945
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22814}
2018-04-11 00:06:40 +00:00
Taylor Brandstetter
fd350d74ee By default, don't use SRTP_AES128_CM_SHA1_32 protection profile.
This profile will now not be used unless the application explicitly
sets the flag in CryptoOptions to true. As a result, an 80-bit
authentication tag will be used instead of a 32-bit one. See bug for
more details.

Bug: webrtc:7670
Change-Id: I7c0a118fd7b1e7aac23b9eb8717099f055de0441
Reviewed-on: https://webrtc-review.googlesource.com/66600
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22757}
2018-04-05 23:43:07 +00:00
Seth Hampson
5897a6ec6a Adds support for signaling a=msid lines without a=ssrc lines.
Currently in the SDP we require an a=ssrc line in the m= section in
order for a StreamParams object to be created with that
MediaContentDescription. This change creates a StreamParams object
without ssrcs in the case that a=msid lines are signaled, but ssrcs
are not. When the remote description is set, this allows us to store
the "unsignaled" StreamParams object in the media channel to later
be used when the first packet is received and we create the
receive stream.

Bug: webrtc:7932, webrtc:7933
Change-Id: Ib6734abeee62b8ed688a8208722c402134c074ef
Reviewed-on: https://webrtc-review.googlesource.com/63141
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22712}
2018-04-03 21:21:11 +00:00
Steve Anton
7eca09361d Ensure that data channel transport stats are included
The RTCStatsCollector was only iterating through RtpTransceivers
in order to find the active transports for which to generate stats.
But for data channel only connections, there were no
RtpTransceivers so no transports were being identified.

This CL changes the stats collector to include the transport names
of the SCTP and RTP data channel if active.

Bug: chromium:826972
Change-Id: I762b253b3bbf0f0d7861bc281b8908decbb9b0d9
Reviewed-on: https://webrtc-review.googlesource.com/65788
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22697}
2018-04-02 18:45:27 +00:00
Zhi Huang
e830e683c4 Use new TransportController implementation in PeerConnection.
The TransportController will be replaced by the JsepTransportController
and JsepTransport will be replace be JsepTransport2.

The JsepTransportController will take the entire SessionDescription
and handle the RtcpMux, Sdes and BUNDLE internally.

The ownership model is also changed. The P2P layer transports are not
ref-counted and will be owned by the JsepTransport2.

In ORTC aspect, RtpTransportAdapter is now a wrapper over RtpTransport
or SrtpTransport and it implements the public and internal interface
by calling the transport underneath.

Bug: webrtc:8587
Change-Id: Ia7fa61288a566f211f8560072ea0eecaf19e48df
Reviewed-on: https://webrtc-review.googlesource.com/59586
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22693}
2018-03-30 18:41:19 +00:00
Taylor Brandstetter
5e55fe845e Adding flag to enable/disable use of SRTP_AES128_CM_SHA1_32 crypto suite.
This flag (added to CryptoOptions) will allow applications to opt-in to
use of this suite, before it's disabled by default later. See bug for
more details.

TBR=magjed@webrtc.org

Bug: webrtc:7670
Change-Id: I800bedd4b26d807b6b7ac66b505d419c3323e454
Reviewed-on: https://webrtc-review.googlesource.com/64390
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22586}
2018-03-23 19:26:55 +00:00
Sebastian Jansson
8a793a0b1b Named threads in PeerConnectionIntegrationBaseTest.
Makes it easier to follow threads during debugging.

Bug: None
Change-Id: I88e68521e354224052500bc47f2300253b95a892
Reviewed-on: https://webrtc-review.googlesource.com/61429
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22405}
2018-03-13 16:17:01 +00:00
Seth Hampson
845e87877e Name change from stream label to stream id for spec compliance.
Bug: webrtc:7932
Change-Id: I66f33597342394083256f050cac2a00a68042302
Reviewed-on: https://webrtc-review.googlesource.com/59280
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22276}
2018-03-02 20:44:48 +00:00
Steve Anton
fc8537143f Crash if PeerConnection methods are called with the wrong SdpSemantics.
Bug: None
Change-Id: I111098215ec83fdf97f9a5232efef6a4af329ddf
Reviewed-on: https://webrtc-review.googlesource.com/59262
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22262}
2018-03-02 03:12:49 +00:00
Steve Anton
8ee1e5e6e6 Enable GetRemoteAudioSSLCertificate tests for Unified Plan
They were disabled since GetRemoteAudioSSLCertificate was written
in terms of voice/video channel, which were not methods supported
with Unified Plan. Now GetRemoteAudioSSLCertificate has been
rewritten to work with RtpTransceivers, so the test can be enabled.

Bug: webrtc:8764
Change-Id: I08b5fbcc0d69f36113a281c902db6508fa48ebdd
Reviewed-on: https://webrtc-review.googlesource.com/55923
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22115}
2018-02-21 01:54:16 +00:00
Seth Hampson
2f0d70287e Parameterize PeerConnection integration tests for Unified Plan
Bug: webrtc:8765
Change-Id: I572966c57fd8d8f9293fc05a8be579dd982102f7
Reviewed-on: https://webrtc-review.googlesource.com/52800
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22111}
2018-02-20 23:46:06 +00:00
Tommi
8e545eee1e Revert "Use SRTP_AES128_CM_SHA1_80 by default instead of SRTP_AES128_CM_SHA1_32."
This reverts commit 6780c51b23.

Reason for revert:

More details in crbug.com/810292

Original change's description:
> Use SRTP_AES128_CM_SHA1_80 by default instead of SRTP_AES128_CM_SHA1_32.
> 
> A field has been added to "CryptoOptions" to enable SRTP_AES128_CM_SHA1_32
> from native apps if really necessary.
> 
> R=​deadbeef@webrtc.org
> 
> Bug: webrtc:7670
> Change-Id: I36b6ab3e302fbf3cda2611ff196757e43a56e704
> Reviewed-on: https://webrtc-review.googlesource.com/41420
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21952}

TBR=deadbeef@webrtc.org,magjed@webrtc.org,jbauch@webrtc.org

Change-Id: I643dbe023eca526f2cda4d97df045f2533741dd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7670
Reviewed-on: https://webrtc-review.googlesource.com/49880
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21961}
2018-02-08 16:25:31 +00:00
Joachim Bauch
6780c51b23 Use SRTP_AES128_CM_SHA1_80 by default instead of SRTP_AES128_CM_SHA1_32.
A field has been added to "CryptoOptions" to enable SRTP_AES128_CM_SHA1_32
from native apps if really necessary.

R=deadbeef@webrtc.org

Bug: webrtc:7670
Change-Id: I36b6ab3e302fbf3cda2611ff196757e43a56e704
Reviewed-on: https://webrtc-review.googlesource.com/41420
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21952}
2018-02-07 21:56:01 +00:00
Zhi Huang
70b820fefe Implemented the GetRemoteAudioSSLCertificate method.
This method returns the DTLS SSL certificate chain associated with the
audio transport on the remote side. This will become populated once the
DTLS connection with the peer has been completed.

TBR=deadbeef@webrtc.org

Bug: webrtc:8800
Change-Id: Ib90ccb3463415e798c17c187c5bdbfc4da26f11f
Reviewed-on: https://webrtc-review.googlesource.com/44140
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21785}
2018-01-27 23:48:36 +00:00