aboutsummaryrefslogtreecommitdiff
path: root/pc
AgeCommit message (Collapse)Author
2018-05-29Prepare to remove old OnFailure implementationsHarald Alvestrand
This removes usage of the old OnFailure methods on CreateSessionDescriptionObserver and SetSessionDescriptionObserver, so that WebRTC will continue to compile once all the default implementations are removed. Bug: chromium:589455 Change-Id: Id67295b3ad0c30d24d79589c2041acdd507a19f3 Reviewed-on: https://webrtc-review.googlesource.com/78480 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23427}
2018-05-28Wire up VAAPI VP8 experimental support in WebRTC.Ilya Nikolaevskiy
Experiment flag added to PeerConnectionInterface::RtcConfiguration and propagated down to VideoStreamEncoder. Artificial Sdp parameter is added to the sdp format if the flag is set. Additionally, sdp format is propagated in vp8 simulcast adapters. Bug: chromium:794608 Change-Id: I2dec54d19ae7bfbd5f2777ec682da5a84194da94 Reviewed-on: https://webrtc-review.googlesource.com/78500 Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23412}
2018-05-25Add serialization of a=ice-lite.Taylor Brandstetter
It was being parsed, but not serialized. Meaning that if you set a remote description with a=ice-lite, and then read the remoteDescription attribute, it doesn't contain a=ice-lite. NOTRY=True Bug: webrtc:6668 Change-Id: Ia3c56d876c317b5af71a1f383f238d1e86f06a01 Reviewed-on: https://webrtc-review.googlesource.com/78821 Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Zhi Huang <zhihuang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23391}
2018-05-23Refactor VideoTrackSource, without raw pointer injection.Niels Möller
Bug: None Change-Id: If4aa8ba72eb3dbdd7dca8970cd6349f1679bc222 Reviewed-on: https://webrtc-review.googlesource.com/78403 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23370}
2018-05-23Delete unused member variable VideoTrackSource::options_.Niels Möller
Bug: None Change-Id: I1aa4a29aa83faaec22bfe811044439bbdc9b8b15 Reviewed-on: https://webrtc-review.googlesource.com/78400 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23365}
2018-05-23Added an integration test to validate TURN servers can send media in relay mode.Benjamin Wright
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-22Delete unused class CurrentSpeakerMonitor.Niels Möller
Bug: webrtc:8760 Change-Id: Ib2f84c7d74f1f3187f02dcf697e9c16a4d5f10e3 Reviewed-on: https://webrtc-review.googlesource.com/34652 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Noah Richards <noahric@chromium.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23336}
2018-05-21Move VideoStreamEncoderInterface to api/.Niels Möller
Bug: webrtc:8830 Change-Id: I17908b4ef6a043acf22e2110b9672012d5fa7fc0 Reviewed-on: https://webrtc-review.googlesource.com/74481 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23334}
2018-05-21Delete unneeded includes of basictypes.h.Niels Möller
This is a kitchen-sink header, some pieces should be moved to byteorder.h, the rest likely deleted. Delete most includes of basictypes.h. In leaf headers, include stddef.h and stdint.h explicitly where needed. Bug: webrtc:6853 Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073 Reviewed-on: https://webrtc-review.googlesource.com/77721 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23333}
2018-05-21New class FakePeriodicVideoTrackSource, simplifying shutdown logic.Niels Möller
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-18Returns RTCError for setting unimplemented RtpParameters.Seth Hampson
We have a number of RtpParameters that aren't implemented. If a client is setting these values it creates unexpected results when the value doesn't do anything for them. This change incorporates returning the correct error if the parameter is unimplemented. It also changes the scale_resolution_down_by and scale_framerate_down_by RtpEncodingParameters to rtc::Optionals because they aren't implemented. This change is part of the effort to ship get/setParameters in Chrome. Bug: webrtc:8772 Change-Id: I9797695e5116e6aeb3c02afddbf460b2a0d7d5ab Reviewed-on: https://webrtc-review.googlesource.com/75421 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@{#23314}
2018-05-18Allows injection of network controller factory into peer connection factory.Sebastian Jansson
Bug: webrtc:9155 Change-Id: I0a17024042f154297aba20f5d2dc766feb27f3f7 Reviewed-on: https://webrtc-review.googlesource.com/73123 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23313}
2018-05-17Delete unused include of fakevideocapturer.h.Niels Möller
Bug: webrtc:6353 Change-Id: I007320e821e44bbd93776ff76d76e550a7f94602 Reviewed-on: https://webrtc-review.googlesource.com/76922 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23268}
2018-05-15Reland "Implement RtpParameters.transaction_id for PC RtpSenderInterface"Florent Castelli
This is a reland of 5faf36ef3c582350fba5ef97a3549e440d81a283 The issue in Chrome has been fixed and this should be safe to reland. TBR=deadbeef Original change's description: > Implement RtpParameters.transaction_id for PC RtpSenderInterface > > The transaction_id field should be refreshed for every getParameters() > call and checked at each setParameters() call. > This also checks that getParameters() was ever called to return a proper > error code. > > Bug: webrtc:7580 > Change-Id: I6c6fe289542e486fc422cdc61577982b0529d4c1 > Reviewed-on: https://webrtc-review.googlesource.com/70820 > Commit-Queue: Florent Castelli <orphis@webrtc.org> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org> > Reviewed-by: Steve Anton <steveanton@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#23120} Bug: webrtc:7580 Change-Id: Iabd41fb21afdf452c039d5513824ae334f8d1d3f Reviewed-on: https://webrtc-review.googlesource.com/76980 Commit-Queue: Florent Castelli <orphis@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23247}
2018-05-14Fix build errors when rtc_use_builtin_sw_codecs is set to false.Anders Carlsson
The previous effort of building WebRTC without SW codecs stopped when libjingle_peerconnection was possible to build. In order to make the group("default") target build, this basically updates a bunch of tests to explicitly depend on the built-in software video codecs. Bug: webrtc:7925 Change-Id: I2715414770c197fca01cb8dbde173a21f4434500 Reviewed-on: https://webrtc-review.googlesource.com/70503 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Anders Carlsson <andersc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23216}
2018-05-14Remove dependency in FakeWebRtcVideoCodecFactories.Anders Carlsson
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-14New file api/video/BUILD.gnNiels Möller
Build targets involving files under api/video/ are moved into this file, from api/BUILD.gn. In addition, drop "_api" part of target names, and move the header file api/videosinkinterface.h to api/video/video_sink_interface.h. Bug: webrtc:9253 Change-Id: I2896d3f063db8dff902bc29738578395b2fcc155 Reviewed-on: https://webrtc-review.googlesource.com/75500 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23207}
2018-05-11Refactor PeerConnectionIntegrationTest to not use cricket::VideoCapturerNiels Möller
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-11Add method FakePeriodicVideoSource::Stop()Niels Möller
Fixes potential race at test shutdown, introduced in cl https://webrtc-review.googlesource.com/49220. Bug: webrtc:6353 Change-Id: Ifaf9e736681b87073a489d75bf1375aa95ee92bb Reviewed-on: https://webrtc-review.googlesource.com/75124 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23200}
2018-05-09This changeset adds dependency injection support for SSL Root Certs.Benjamin Wright
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-08Replacing rtc::TimeDelta with webrtc::TimeDelta.Sebastian Jansson
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-08Remove last mention of speex codecHenrik Lundin
The last mention was in a unit test, where speex was used to name an arbitrary codec. The name "foo" is now used instead. Bug: webrtc:4844 Change-Id: Ia1ede8512b894e6c16c0c168a50dc4d62d6911ad Reviewed-on: https://webrtc-review.googlesource.com/74781 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23160}
2018-05-07Implement OnRemoveTrack and OnRemoveStream for Unified PlanSteve Anton
Also parameterizes the PeerConnection RTP unit tests to test Unified Plan also. Bug: webrtc:8587 Change-Id: I7661d9f2ec4b3bce0d2e2979035fa02225e3f118 Reviewed-on: https://webrtc-review.googlesource.com/73284 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@{#23157}
2018-05-07New api struct BitrateSettings.Niels Möller
Replaces both BitrateConstraintsMask and PeerConnectionInterface::BitrateParameters. The latter is kept temporarily for backwards compatibility. Bug: None Change-Id: Ibe1d043f2a76e56ff67809774e9c0f5e0ec9e00f Reviewed-on: https://webrtc-review.googlesource.com/74020 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23148}
2018-05-07Revert "Implement RtpParameters.transaction_id for PC RtpSenderInterface"Max Morin
This reverts commit 5faf36ef3c582350fba5ef97a3549e440d81a283. Reason for revert: fast/peerconnection/RTCRtpSender-setParameters.html failing in webrtc roll, probably this CL? https://chromium-review.googlesource.com/c/chromium/src/+/1045889. Original change's description: > Implement RtpParameters.transaction_id for PC RtpSenderInterface > > The transaction_id field should be refreshed for every getParameters() > call and checked at each setParameters() call. > This also checks that getParameters() was ever called to return a proper > error code. > > Bug: webrtc:7580 > Change-Id: I6c6fe289542e486fc422cdc61577982b0529d4c1 > Reviewed-on: https://webrtc-review.googlesource.com/70820 > Commit-Queue: Florent Castelli <orphis@webrtc.org> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org> > Reviewed-by: Steve Anton <steveanton@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#23120} TBR=steveanton@webrtc.org,deadbeef@webrtc.org,sakal@webrtc.org,kthelgason@webrtc.org,orphis@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:7580 Change-Id: I86da108227f8fc8d235bb2e9559377c800595b8c Reviewed-on: https://webrtc-review.googlesource.com/74740 Reviewed-by: Max Morin <maxmorin@webrtc.org> Commit-Queue: Max Morin <maxmorin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23134}
2018-05-04Integrated PeerConnectionDependencies into PeerConnection::InitializeBenjamin Wright
Integrates the new PeerConnectionDependencies structure into PeerConnection::Initialize to simplify future injections. Bug: webrtc:7913 Change-Id: Ida1feae8b81819dfbfe5b79ed7807a63b091e73f Reviewed-on: https://webrtc-review.googlesource.com/73960 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Benjamin Wright <benwright@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23130}
2018-05-04Implement RtpParameters.transaction_id for PC RtpSenderInterfaceFlorent Castelli
The transaction_id field should be refreshed for every getParameters() call and checked at each setParameters() call. This also checks that getParameters() was ever called to return a proper error code. Bug: webrtc:7580 Change-Id: I6c6fe289542e486fc422cdc61577982b0529d4c1 Reviewed-on: https://webrtc-review.googlesource.com/70820 Commit-Queue: Florent Castelli <orphis@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23120}
2018-05-04Break out the part of the iSAC codec that's used for Voice Activity DetectionKarl Wiberg
The audio processing code is using parts of the iSAC codec to do voice activity detection (VAD), but it's undesirable for it to pull in the entire iSAC codec as a dependency. So this CL factors out the parts of iSAC that's needed for VAD to a separate build target. Bug: webrtc:8396 Change-Id: I884e25d8fd0bc815fca664352b0573b4b173880e Reviewed-on: https://webrtc-review.googlesource.com/69640 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23110}
2018-05-04Add missing casts-to-int to int/uint16 comparisons.Wez
These are required to avoid compilation errors due to signed/unsigned comparison, on some toolchains (specifically Clang/Fuchsia). Bug: chromium:839351 Change-Id: I52e726acd4e8d6744e98d7583bc82fcec81060d9 Reviewed-on: https://webrtc-review.googlesource.com/74100 Commit-Queue: Wez <wez@google.com> Reviewed-by: Tommi <tommi@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23109}
2018-05-03Built in video codec factories.Anders Carlsson
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-03Reland "Reland "Remove our stream << overloads from non-test build targets.""Jonas Olsson
This is a reland of d7ee72041f882c023c73e27a7436c626c4e43604 Original change's description: > Reland "Remove our stream << overloads from non-test build targets." > > This is a reland of c841d18d257ba8e4ed7d77d105e3c46006bb1e7e > > Original change's description: > > Remove our stream << overloads from non-test build targets. > > > > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and > > SocketAddress are kept behind gtest's #ifdef UNIT_TEST. > > > > Bug: webrtc:8982 > > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 > > Reviewed-on: https://webrtc-review.googlesource.com/64143 > > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > > Reviewed-by: Benjamin Wright <benwright@webrtc.org> > > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22916} > > > Bug: webrtc:8982 > Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123 > Reviewed-on: https://webrtc-review.googlesource.com/71161 > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22949} TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org Bug: webrtc:8982 Change-Id: I29247d1c28e99af36ef228d8c75b4adecbd7b199 Reviewed-on: https://webrtc-review.googlesource.com/72681 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23092}
2018-05-02Created PeerConnectionDependencies to avoid creating new ↵Benjamin Wright
CreatePeerConnection overloads. Currently CreatePeerConnection takes 3 parameters. This is going to expand to four with a new change. Every time a new parameter is added, we need to deprecate the old method, switch clients to the new one, update fake/mock classes and tests, and so on, which is a cumbersome process. To address this, this CL introduces a PeerConnectionDependencies structure to encapsulate all mandatory and optional dependencies (where a dependency is defined as non trivial executable code that an API user may want to provide to the native API). This allows adding a new injectable dependency by simply adding a new field to the struct, avoiding the hassle described above. You may think we could use RTCConfiguration for this. But since RTCConfiguration is both passed in and out of the PeerConnection (using GetConfiguration/SetConfiguration), it can't carry unique_ptrs. And we don't want to inject dependencies via raw pointers, since this could lead to lifetime management bugs, where the dependency is deleted before the PeerConnection is done using it. Bug: webrtc:7913 Change-Id: I38c3f4ce4f26b37e6fe219d1eeca271294b40db8 Reviewed-on: https://webrtc-review.googlesource.com/73663 Commit-Queue: Benjamin Wright <benwright@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23084}
2018-05-02Remove deprecated std::bind2nd and std::ptr_funtzik
std::bind2nd and std::ptr_fun are deprecated in C++11 and removed in C++17. This CL removes their usage, so that the code base is ready for C++17. Bug: chromium:752720 Change-Id: I6ec0b596202ebf84cf7b8744f516a76ac8328ccd Reviewed-on: https://webrtc-review.googlesource.com/72360 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Cr-Commit-Position: refs/heads/master@{#23083}
2018-05-02Don't transition ICE to Checking if there are no transportsSteve Anton
This attempts to make it more clear that an offer or answer with no transports will no start ICE. Bug: None Change-Id: Ifb8d9e445b8fbef1fb1590477dd6bdb4fc651a90 Reviewed-on: https://webrtc-review.googlesource.com/73640 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23070}
2018-04-27Add e2e test for multiple video tracks without signaling SSRCsSteve Anton
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-26Fix possible race between the stats collector and transport controllerSteve Anton
Previously, it would be possible for the RTCStatsCollector to start an async network task to gather stats that would be run after the PeerConnection was closed when the transport controller was set to null. Bug: chromium:829238 Change-Id: I22fb4ce603caf2614814780b95b62127cee28284 Reviewed-on: https://webrtc-review.googlesource.com/72525 Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23046}
2018-04-26Revert "TCP TURN Integration Test"Benjamin Wright
This reverts commit edbd389ecc7388973b55e6e3787ed6a95254dc99. 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-26TCP TURN Integration TestBenjamin Wright
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-25Mark built-in software video codecs as poisonous.Anders Carlsson
The goal is to make these injectable, and only VP8 and VP9 specific targets should depend on them. Bug: webrtc:7925 Change-Id: Ie9239a54d197fe70c93de0582797211fef6997a2 Reviewed-on: https://webrtc-review.googlesource.com/72082 Commit-Queue: Anders Carlsson <andersc@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23021}
2018-04-24Add IsClosed checks to various PeerConnection methodsSteve Anton
This brings the implementations in line with the WebRTC specification. Bug: chromium:829238 Change-Id: I7ef64e7b6ccf0e9f60f017443565494239ff19cc Reviewed-on: https://webrtc-review.googlesource.com/71961 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23013}
2018-04-24Remove PeerConnectionInterface::UpdateIceSteve Anton
It is unused. Bug: None Change-Id: I368923299b28d7ec2f54ddd2b4ee5f69cb285b21 Reviewed-on: https://webrtc-review.googlesource.com/71963 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23006}
2018-04-23GN hack to tag targets as poisonous (and use it with audio codecs)Karl Wiberg
Only specially taggged targets may transitively depend on poisonous targets. We first apply it to audio codecs. This makes it much clearer exactly what parts of the code still have dependencies on the audio codecs (and we want to eventually get rid of pretty much all of them). Bug: webrtc:8396, webrtc:9121 Change-Id: Iba5c2e806c702b5cfe881022674705f647896d43 Reviewed-on: https://webrtc-review.googlesource.com/69520 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22979}
2018-04-20Fix bug that reset SRTP context on every applied answer.Taylor Brandstetter
This causes the SRTCP index and SRTP ROC to be reset, which will cause replay detection errors in decrypting SRTCP packets, and errors in decrypting SRTP packets if the ROC was nonzero. Bug: webrtc:8996 Change-Id: I3bf6c136d928f39b19de05616d5cd2833f42223c Reviewed-on: https://webrtc-review.googlesource.com/71300 Reviewed-by: Zhi Huang <zhihuang@webrtc.org> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22965}
2018-04-20Revert "Reland "Remove our stream << overloads from non-test build targets.""Taylor Brandstetter
This reverts commit d7ee72041f882c023c73e27a7436c626c4e43604. Reason for revert: Broke downstream build which was using SdpAudioFormat operator<< Original change's description: > Reland "Remove our stream << overloads from non-test build targets." > > This is a reland of c841d18d257ba8e4ed7d77d105e3c46006bb1e7e > > Original change's description: > > Remove our stream << overloads from non-test build targets. > > > > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and > > SocketAddress are kept behind gtest's #ifdef UNIT_TEST. > > > > Bug: webrtc:8982 > > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 > > Reviewed-on: https://webrtc-review.googlesource.com/64143 > > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > > Reviewed-by: Benjamin Wright <benwright@webrtc.org> > > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22916} > > TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org > > Bug: webrtc:8982 > Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123 > Reviewed-on: https://webrtc-review.googlesource.com/71161 > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22949} TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org Change-Id: I3c2b18ec2877d68a522ecbae7a2955c4eecf36df No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8982 Reviewed-on: https://webrtc-review.googlesource.com/71446 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22963}
2018-04-20Reland "Remove our stream << overloads from non-test build targets."Jonas Olsson
This is a reland of c841d18d257ba8e4ed7d77d105e3c46006bb1e7e Original change's description: > Remove our stream << overloads from non-test build targets. > > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and > SocketAddress are kept behind gtest's #ifdef UNIT_TEST. > > Bug: webrtc:8982 > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 > Reviewed-on: https://webrtc-review.googlesource.com/64143 > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > Reviewed-by: Benjamin Wright <benwright@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22916} TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org Bug: webrtc:8982 Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123 Reviewed-on: https://webrtc-review.googlesource.com/71161 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22949}
2018-04-18Change PeerConnection error codesHarald Alvestrand
Change error code for "state mismatch" to "State error", and also change some parameter errors to "Illegal parameter". Bug: chromium:819629 Change-Id: I9347d4161344b4ff2bcb58ad82fa6d533cd476fb Reviewed-on: https://webrtc-review.googlesource.com/69815 Reviewed-by: Benjamin Wright <benwright@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22924}
2018-04-18Revert "Remove our stream << overloads from non-test build targets."Jonas Olsson
This reverts commit c841d18d257ba8e4ed7d77d105e3c46006bb1e7e. Reason for revert: Breaks internal tests Original change's description: > Remove our stream << overloads from non-test build targets. > > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and > SocketAddress are kept behind gtest's #ifdef UNIT_TEST. > > Bug: webrtc:8982 > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 > Reviewed-on: https://webrtc-review.googlesource.com/64143 > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > Reviewed-by: Benjamin Wright <benwright@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22916} TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org Change-Id: Ia3a36cdbdb2a9648a2bce23c314e539124dc9e0d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8982 Reviewed-on: https://webrtc-review.googlesource.com/70640 Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22920}
2018-04-18Remove our stream << overloads from non-test build targets.Jonas Olsson
Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and SocketAddress are kept behind gtest's #ifdef UNIT_TEST. Bug: webrtc:8982 Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 Reviewed-on: https://webrtc-review.googlesource.com/64143 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Benjamin Wright <benwright@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22916}
2018-04-17Attempting to fix lingering issues with BUNDLE negotiation.Taylor Brandstetter
I found one additional way a crash could occur: "OnRtpTransportChanged" being called instead of "OnDtlsTransportChanged", due to a mixup of m= section types. I could reproduce this by: 1. Applying description with RTP data channel m= section. 2. Applying description with both a rejected RTP data channel m= section and rejected SCTP m= section. This is a very strange scenario, but maybe there are other ways to reproduce that I haven't thought of. The solution is to combine "OnRtpTransportChanged" and "OnDtlsTransportChanged", and not do anything with the content type. This simplifies the code a bit as well. Bug: chromium:827917 Change-Id: If6818ea0c41573255831534060b30c76a6544e04 Reviewed-on: https://webrtc-review.googlesource.com/70360 Reviewed-by: Zhi Huang <zhihuang@webrtc.org> Commit-Queue: Zhi Huang <zhihuang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22893}
2018-04-16Reland "Add thread checker to PortAllocator and its subclasses and fix a bug ↵Qingsi Wang
causing memory contention by threads." This is a reland of fc43d11717e16dd427ac84fee614e5511e43cefd 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}