13 Commits

Author SHA1 Message Date
deadbeef
1dcb16409a Rewrite PeerConnection integration tests using better testing practices.
Also renames "peerconnection_unittests" to "peerconnection_integrationtests",
and moves the ICE URL parsing code to separate files.

The main problem previously was that the test assertions
occurred in various places in the main test class, and this shared test
code was overly complex and stateful. As a result, it was difficult to
tell what a test even does, let alone what assertions it's meant to be
making. And writing a new test that does what you want can be a
frustrating ordeal.

The new code still uses helper methods, but they have intuitive names
and a smaller role; all of the important parts of the test's logic are
in the test case itself.

We're planning on merging PeerConnection and WebRtcSession at some point
soon, so it seemed valuable to do this, so that the WebRtcSession tests
can be rewritten as PeerConnection tests using better patterns.

BUG=None

Review-Url: https://codereview.webrtc.org/2738353003
Cr-Commit-Position: refs/heads/master@{#17458}
2017-03-30 04:08:16 +00:00
deadbeef
42a4263728 Making candidate pool size behave as decided in JSEP.
To simplify things, the candidate pool is only used in the first
offer/answer.

After setting a local description, the size is frozen, and changing ICE
servers won't refresh the pool.

After setting an answer, the pooled candidates are discarded.

BUG=webrtc:5180

Review-Url: https://codereview.webrtc.org/2717893003
Cr-Commit-Position: refs/heads/master@{#17178}
2017-03-10 23:18:00 +00:00
nisse
7f067663ac Delete deprecated PeerConnection methods, and corresponding using declarations.
BUG=None

Review-Url: https://codereview.webrtc.org/2632203003
Cr-Commit-Position: refs/heads/master@{#17120}
2017-03-08 14:59:45 +00:00
deadbeef
6038e97e04 Adding RTCErrorOr class to be used by ORTC APIs.
This utility class can be used to represent either an error or a
successful return value. Follows the pattern of StatusOr in the protobuf
library.

This will be used by ORTC factory methods; for instance, CreateRtpSender
will either return an RtpSender or an error if the parameters are
invalid or some other failure occurs.

This CL also moves RTCError classes to a separate file, and adds tests
that were missing before.

BUG=webrtc:7013

Review-Url: https://codereview.webrtc.org/2692723002
Cr-Commit-Position: refs/heads/master@{#16659}
2017-02-17 07:31:33 +00:00
deadbeef
112b2e99d8 Switching some interfaces to use std::unique_ptr<>.
This helps show where ownership is transfered between objects.

Specifically, this CL wraps cricket::VideoCapturer, MediaEngineInterface
and DataEngineInterface in unique_ptr.

BUG=None
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2685093002
Cr-Commit-Position: refs/heads/master@{#16548}
2017-02-11 04:13:37 +00:00
kwiberg
087bd34d23 Move AudioDecoder and related stuff to the api/ directory
BUG=webrtc:5805, webrtc:6725

Review-Url: https://codereview.webrtc.org/2668523004
Cr-Commit-Position: refs/heads/master@{#16534}
2017-02-10 16:15:44 +00:00
zhihuang
7798501d7a Fix the Chrome crash caused by RtcEventLog
Stop the RtcEventLog when the PeerConnection is closed so that Chrome
will not crash because of creating too many threads.

BUG=chromium:687553

Review-Url: https://codereview.webrtc.org/2682433005
Cr-Commit-Position: refs/heads/master@{#16482}
2017-02-07 23:45:16 +00:00
skvlad
d1f5fdac5c Allow changing the minimal ICE ping timeout with PeerConnection.SetConfiguration.
The original CL (https://codereview.webrtc.org/2670053002) only allows it to be set at PeerConnection creation time.

BUG=webrtc:7082

Review-Url: https://codereview.webrtc.org/2677503004
Cr-Commit-Position: refs/heads/master@{#16436}
2017-02-04 00:54:05 +00:00
nisse
63b14b7d15 Add override declarations to PeerConnectionObserver subclasses, and delete obsolete methods.
BUG=None

Review-Url: https://codereview.webrtc.org/2660223002
Cr-Commit-Position: refs/heads/master@{#16374}
2017-01-31 11:34:01 +00:00
kwiberg
1e4e8cb43d Add CreatePeerConnectionFactory overloads that take audio codec factory args
BUG=5805

Review-Url: https://codereview.webrtc.org/2653343003
Cr-Commit-Position: refs/heads/master@{#16371}
2017-01-31 09:48:08 +00:00
deadbeef
f534659ee6 Adding ability for BaseChannel to use PacketTransportInterface.
... As opposed to DtlsTransportInternal.

The code is suboptimal right now, storing two pointers to the different
interfaces. This will all be cleaned up when we have an "RtpTransport"
abstraction that BaseChannel can use.

This CL also cleans up the "fake transport" classes a bit, and gives
them their own header files.

BUG=None

Review-Url: https://codereview.webrtc.org/2648233003
Cr-Commit-Position: refs/heads/master@{#16258}
2017-01-25 05:51:21 +00:00
deadbeef
1b54a5f018 Relanding: Removing #defines previously used for building without BoringSSL/OpenSSL.
These defines don't work any more, so they only cause confusion:

FEATURE_ENABLE_SSL
HAVE_OPENSSL_SSL_H
SSL_USE_OPENSSL

BUG=webrtc:7025

Review-Url: https://codereview.webrtc.org/2640513002
Cr-Commit-Position: refs/heads/master@{#16224}
2017-01-24 03:39:57 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00