Commit Graph

64 Commits

Author SHA1 Message Date
1e23461d5e Revert of Adding error output param to SetConfiguration, using new RTCError type. (patchset #4 id:60001 of https://codereview.webrtc.org/2587133004/ )
Reason for revert:
Broke chromium FYI bot because the chromium mock PC overrides the method whose signature is changing.

Also broke a downstream internal test, which I need to investigate further.

Original issue's description:
> Adding error output param to SetConfiguration, using new RTCError type.
>
> Most notably, will return "INVALID_MODIFICATION" if a field in the
> configuration was modified and modification of that field isn't supported.
>
> Also changing RTCError to a class that wraps an enum type, because it will
> eventually need to hold other information (like SDP line number), to match
> the RTCError that was recently added to the spec:
> https://github.com/w3c/webrtc-pc/pull/850
>
> BUG=webrtc:6916
>
> Review-Url: https://codereview.webrtc.org/2587133004
> Cr-Commit-Position: refs/heads/master@{#15777}
> Committed: 7a5fa6cd61

TBR=pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6916

Review-Url: https://codereview.webrtc.org/2600813002
Cr-Commit-Position: refs/heads/master@{#15778}
2016-12-24 09:43:32 +00:00
7a5fa6cd61 Adding error output param to SetConfiguration, using new RTCError type.
Most notably, will return "INVALID_MODIFICATION" if a field in the
configuration was modified and modification of that field isn't supported.

Also changing RTCError to a class that wraps an enum type, because it will
eventually need to hold other information (like SDP line number), to match
the RTCError that was recently added to the spec:
https://github.com/w3c/webrtc-pc/pull/850

BUG=webrtc:6916

Review-Url: https://codereview.webrtc.org/2587133004
Cr-Commit-Position: refs/heads/master@{#15777}
2016-12-24 08:47:59 +00:00
fe4a8a41ad Implement current/pending session description methods.
BUG=webrtc:6917

Review-Url: https://codereview.webrtc.org/2590753002
Cr-Commit-Position: refs/heads/master@{#15722}
2016-12-21 01:56:17 +00:00
6de92f9255 Don't allow changing ICE pool size after SetLocalDescription.
This was the decision at IETF 97
(see: https://github.com/rtcweb-wg/jsep/issues/381). It's simpler to not
allow this (since there's no real need for it) rather than try to decide
complex rules for it.

BUG=webrtc:6864

Review-Url: https://codereview.webrtc.org/2566833002
Cr-Commit-Position: refs/heads/master@{#15559}
2016-12-13 02:49:40 +00:00
d1a38b591d Implement the "needs-ice-restart" logic for SetConfiguration.
Changing the configuration will cause subsequently generated offers to change
the ufrag/pwd as necessary, so that a new round of gathering is started that
uses the new configuration.

This CL also makes some minor unrelated changes: changing the reference SDP in
the PC tests to more match what we generate, and relaxing the network thread
requirement for JsepTransport (since there's no reason the "needs-ice-restart"
flag can't be accessed from the signaling thread).

BUG=webrtc:6714

Review-Url: https://codereview.webrtc.org/2563153002
Cr-Commit-Position: refs/heads/master@{#15527}
2016-12-10 21:15:39 +00:00
3edec7cf1b Adding error enum to be used by PeerConnectionInterface methods.
The enum is at about the same level of detail as DOMExceptions, and I
looked through the spec making sure that chromium will be able to perform
the DOMException mapping for each one.

The new enum is called RtcError and is outside the PeerConnectionInterface
scope, because we may want to use this for things not associated with a
PeerConnection in the future.

This CL doesn't yet use the error enum anywhere; that will probably happen
in follow-up CLs for the individual methods.

BUG=webrtc:6855

Review-Url: https://codereview.webrtc.org/2564683002
Cr-Commit-Position: refs/heads/master@{#15526}
2016-12-10 19:44:35 +00:00
c63b894686 Modify the parameter type of PeerConnectionObserver callback OnAddTrack.
Change the second parameter type to a const reference of vector so that
the vector will not be copied.

BUG=none

Review-Url: https://codereview.webrtc.org/2551603003
Cr-Commit-Position: refs/heads/master@{#15396}
2016-12-02 23:41:15 +00:00
4dfb8cef51 Make the default value of rtcp-mux policy to required.
Change the default value of rtcp-mux policy in RTCConfiguration.
Refactor the peerconnectioninterface and webrtcsession unit tests.

BUG=webrtc:6030

Review-Url: https://codereview.webrtc.org/2043193003
Cr-Commit-Position: refs/heads/master@{#15217}
2016-11-23 18:30:21 +00:00
81c3a03004 Added a callback function OnAddTrack to PeerConnectionObserver
Added the callback in native c++ API.
The callback function is called when a track is added and a new RtpReceiver is created.
The application can tell when tracks are added to the streams by listening to this callback.

BUG=webrtc:6112

Review-Url: https://codereview.webrtc.org/2505173002
Cr-Commit-Position: refs/heads/master@{#15142}
2016-11-17 20:06:37 +00:00
46c7389a63 Adding GetConfiguration to PeerConnection.
Just returns the configuration the PC was constructed with, or the last
one passed into SetConfiguration.

BUG=chromium:587453

Review-Url: https://codereview.webrtc.org/2504103002
Cr-Commit-Position: refs/heads/master@{#15111}
2016-11-17 03:42:09 +00:00
71a1b61c4f WebRTC: Fix and enable -Woverloaded-virtual warnings.
Essentially applying the same change as in
https://codereview.webrtc.org/2023413002 in more locations.

There's only one change affecting production code: enabling the warning
for webrtc/media:rtc_media. The rest are test changes.

With these changes, the only place the warning is disabled is in the Windows
implementation of webrtc/modules/video_capture:video_capture_internal_impl,
which is harder to fix, since it relies on sample code from the Windows SDK.

BUG=webrtc:6653
NOTRY=True

Review-Url: https://codereview.webrtc.org/2468093004
Cr-Commit-Position: refs/heads/master@{#14938}
2016-11-07 09:18:14 +00:00
e9e94c3fee Return false if PeerConnection::GetStats() is called on invalid tracks
Before calling StatsCollctor::GetStats() in PeerConnection::GetStats(), check if the track is valid. If not, return false.
A track is invalid if it is not a nullptr and there is no report data for it.

BUG=webrtc:6652

Review-Url: https://codereview.webrtc.org/2470023004
Cr-Commit-Position: refs/heads/master@{#14934}
2016-11-04 18:38:19 +00:00
11a9cbfa50 Refactoring: move ownership of RtcEventLog from Call to PeerConnection
This CL is a pure refactoring which should not result in any functinal
changes. It moves ownership of the RtcEventLog from webrtc::Call to the
webrtc::PeerConnection object.

This is done so that we can add RtcEventLog support for ICE events -
which will require the TransportController to have a pointer to the
RtcEventLog. PeerConnection is the closest common owner of both Call and
TransportController (through WebRtcSession).

BUG=webrtc:6393

Review-Url: https://codereview.webrtc.org/2353033005
Cr-Commit-Position: refs/heads/master@{#14578}
2016-10-07 18:53:15 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
bfd398ccda Add a switch to redetermine role when ICE restarts.
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2295493002 .

Cr-Commit-Position: refs/heads/master@{#13982}
2016-08-31 05:07:56 +00:00
9763d56464 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
Review-Url: https://codereview.webrtc.org/2166873002
Cr-Original-Commit-Position: refs/heads/master@{#13645}
Cr-Commit-Position: refs/heads/master@{#13657}
2016-08-05 18:14:54 +00:00
907abe4411 Revert of Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (patchset #8 id:280001 of https://codereview.webrtc.org/2166873002/ )
Reason for revert:
Reverting because it broke an RTP data channel test on the FYI bots.

Original issue's description:
> Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
>
> To allow end-to-end QuicDataChannel usage with a
> PeerConnection, RTCConfiguration has been modified to
> include a boolean for whether to do QUIC, since negotiation of
> QUIC is not implemented. If one peer does QUIC, then it will be
> assumed that the other peer must do QUIC or the connection
> will fail.
>
> PeerConnection has been modified to create data channels of type
> QuicDataChannel when the peer wants to do QUIC.
>
> WebRtcSession has ben modified to use a QuicDataTransport
> instead of a DtlsTransportChannelWrapper/DataChannel
> when QUIC should be used
>
> QuicDataTransport implements the generic functions of
> BaseChannel to manage the QuicTransportChannel.
>
> Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
> Cr-Commit-Position: refs/heads/master@{#13645}

TBR=pthatcher@webrtc.org,zhihuang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2206793007
Cr-Commit-Position: refs/heads/master@{#13647}
2016-08-04 19:22:22 +00:00
34b54c36a5 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Review-Url: https://codereview.webrtc.org/2166873002
Cr-Commit-Position: refs/heads/master@{#13645}
2016-08-04 18:06:58 +00:00
29ff8446c0 Add PeerConnection IsClosed check.
Add IsClosed check when excuting some functions so that they can return early if the PeerConnection is closed.
The observer will not be called after the PeerConnection is closed.

BUG=webrtc:5861

Review-Url: https://codereview.webrtc.org/1975453002
Cr-Commit-Position: refs/heads/master@{#13544}
2016-07-27 18:07:32 +00:00
f8e65779a7 Add virtual Initialize methods to PortAllocator and NetworkManager.
This will allow PeerConnection to handle hopping to the right thread
and doing thread-specific initialization for the PortAllocator.
This eliminates a required thread-hop for whatever is passing the
PortAllocator into CreatePeerConnection.

BUG=617648
R=pthatcher@webrtc.org, skvlad@webrtc.org

Review URL: https://codereview.webrtc.org/2097653002 .

Committed: https://crrev.com/a6bdb0990a659ff9e7c4374f5033a6bcc4fbfb21
Cr-Original-Commit-Position: refs/heads/master@{#13283}
Cr-Commit-Position: refs/heads/master@{#13306}
2016-06-28 00:20:25 +00:00
ba8d4337b7 Revert of Add virtual Initialize methods to PortAllocator and NetworkManager. (patchset #4 id:60001 of https://codereview.webrtc.org/2097653002/ )
Reason for revert:
Didn't intend to land yet. Chromium CL still needed.

Original issue's description:
> Add virtual Initialize methods to PortAllocator and NetworkManager.
>
> This will allow PeerConnection to handle hopping to the right thread
> and doing thread-specific initialization for the PortAllocator.
> This eliminates a required thread-hop for whatever is passing the
> PortAllocator into CreatePeerConnection.
>
> BUG=617648
> R=pthatcher@webrtc.org, skvlad@webrtc.org
>
> Committed: https://crrev.com/a6bdb0990a659ff9e7c4374f5033a6bcc4fbfb21
> Cr-Commit-Position: refs/heads/master@{#13283}

TBR=pthatcher@webrtc.org,skvlad@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=617648

Review-Url: https://codereview.webrtc.org/2092023004
Cr-Commit-Position: refs/heads/master@{#13284}
2016-06-24 21:05:19 +00:00
a6bdb0990a Add virtual Initialize methods to PortAllocator and NetworkManager.
This will allow PeerConnection to handle hopping to the right thread
and doing thread-specific initialization for the PortAllocator.
This eliminates a required thread-hop for whatever is passing the
PortAllocator into CreatePeerConnection.

BUG=617648
R=pthatcher@webrtc.org, skvlad@webrtc.org

Review URL: https://codereview.webrtc.org/2097653002 .

Cr-Commit-Position: refs/heads/master@{#13283}
2016-06-24 21:04:11 +00:00
a601f5c863 Separating internal and external methods of RtpSender/RtpReceiver.
This moves the implementation specific methods to separate classes
(RtpSenderInternal/RtpReceiverInternal) so that the interface classes
represent the interface that external applications can rely on.

The reason this wasn't done earlier was that PeerConnection needed
to store proxy pointers, but also needed to access implementation-
specific methods on the underlying objects. This is now possible
by using "RtpSenderProxyWithInternal<RtpSenderInternal>", which is a proxy
that implements RtpSenderInterface but also provides direct access
to an RtpSenderInternal.

Review-Url: https://codereview.webrtc.org/2023373002
Cr-Commit-Position: refs/heads/master@{#13056}
2016-06-06 21:27:43 +00:00
d79599d74a Turning FakeDtlsIdentityStore into FakeRTCCertificateGenerator.
This is one less DtlsIdentityStoreInterface implementation, and one step closer
to removing this interface in favor of RTCCertificateGeneratorInterface.

This also removes PeerConnectionInterface::CreatePeerConnectionWithStore which
is no longer needed.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2020623002 .

Cr-Commit-Position: refs/heads/master@{#12990}
2016-06-01 11:59:01 +00:00
d03c23b216 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConneciton, is
updated to take a generator instead of a store.
  Many unittests still use a store, to allow them to continue to do so the
factory gets CreatePeerConnectionWithStore which uses the old function
signature (and invokes the new signature by wrapping the store in an
RTCCertificateGeneratorStoreWrapper). As soon as the FakeDtlsIdentityStore is
turned into a certificate generator instead of a store, the unittests will be
updated and we can remove CreatePeerConnectionWithStore.

This is a reupload of https://codereview.webrtc.org/2013523002/ with minor
changes.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2017943002 .

Cr-Commit-Position: refs/heads/master@{#12984}
2016-06-01 09:44:29 +00:00
603470576e Add a flag to filter out high-cost networks.
This allows webrtc to not gather on cellular networks if wifi or
other low cost networks are present.
BUG=

Review-Url: https://codereview.webrtc.org/1987833002
Cr-Commit-Position: refs/heads/master@{#12979}
2016-06-01 01:29:18 +00:00
98cde26c78 Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel.
This will make it much less likely for application developers to not
realize the object is reference counted.

It also fixes a bug in the Java PeerConnection binding, by allowing a
reference to be transferred in the OnRemoveStream call via std::move.

BUG=webrtc:5128
R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1972793003 .

Cr-Commit-Position: refs/heads/master@{#12976}
2016-05-31 20:02:30 +00:00
d7973ccdb5 Revert of Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface. (patchset #2 id:20001 of https://codereview.webrtc.org/2013523002/ )
Reason for revert:
There are more CreatePeerConnection calls than I anticipated/had found in Chromium, like remoting/protocol/webrtc_transport.cc. Reverting due to broken Chromium FYI bots.

Original issue's description:
> Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
>
> The store was used in WebRtcSessionDescriptionFactory to generate certificates,
> now a generator is used instead (new API). PeerConnection[Factory][Interface],
> and WebRtcSession are updated to pass generators all the way down to the
> WebRtcSessionDescriptionFactory instead of stores.
>
> The webrtc implementation of a generator, RTCCertificateGenerator, is used as
> the default generator (peerconnectionfactory.cc:189) instead of the webrtc
> implementation of a store, DtlsIdentityStoreImpl.
>   The generator is fully parameterized and does not generate RSA-1024 unless you
> ask for it (which makes sense not to do beforehand since ECDSA is now default).
> The store was not fully parameterized (known filed bug).
>
> The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
> updated to take a generator instead of a store. But as to not break Chromium,
> the old function signature taking a store is kept. It is implemented to invoke
> the generator version by wrapping the store in an
> RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
> new function signature we can remove the old CreatePeerConnection.
>   Due to having multiple CreatePeerConnection signatures, some calling places
> are updated to resolve the ambiguity introduced.
>
> BUG=webrtc:5707, webrtc:5708
> R=phoglund@webrtc.org, tommi@webrtc.org
> TBR=tkchin@webrc.org
>
> Committed: 400781a209

TBR=tkchin@webrtc.org,tommi@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2020633002
Cr-Commit-Position: refs/heads/master@{#12948}
2016-05-27 13:08:58 +00:00
400781a209 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
updated to take a generator instead of a store. But as to not break Chromium,
the old function signature taking a store is kept. It is implemented to invoke
the generator version by wrapping the store in an
RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
new function signature we can remove the old CreatePeerConnection.
  Due to having multiple CreatePeerConnection signatures, some calling places
are updated to resolve the ambiguity introduced.

BUG=webrtc:5707, webrtc:5708
R=phoglund@webrtc.org, tommi@webrtc.org
TBR=tkchin@webrc.org

Review URL: https://codereview.webrtc.org/2013523002 .

Cr-Commit-Position: refs/heads/master@{#12947}
2016-05-27 12:52:06 +00:00
417eebe5dd Fixing the behavior of the candidate filter with pooled candidates.
According to JSEP, the candidate filter does not affect pooled
candidates because they can be filtered once they're ready to be
surfaced to the application.

So, pooled port allocator sessions will use a filter of CF_ALL, with a
new filter applied when the session is taken by a P2PTransportChannel.

When the filter is applied:
* Some candidates may no longer be returned by ReadyCandidates()
* Some candidates may no longer have a "related address" (for privacy)
* Some ports may no longer be returned by ReadyPorts()

To simplify this, the candidate filtering logic is now moved up from
the Ports to the BasicPortAllocator, with some helper methods to perform
the filtering and stripping out of data.

R=honghaiz@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1998813002 .

Cr-Commit-Position: refs/heads/master@{#12856}
2016-05-23 23:02:29 +00:00
e9021a3601 Propogate network-worker thread split to api
BUG=webrtc:5645

Review-Url: https://codereview.webrtc.org/1968393002
Cr-Commit-Position: refs/heads/master@{#12767}
2016-05-17 08:52:06 +00:00
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00
a1c303535f Relanding: Implement RTCConfiguration.iceCandidatePoolSize.
Depends on this CL in order to work in Chromium:
https://codereview.chromium.org/1976673002/

It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).

This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.

R=pthatcher@webrtc.org

Committed: 48e9d05f51

Review URL: https://codereview.webrtc.org/1956453003 .

Cr-Commit-Position: refs/heads/master@{#12729}
2016-05-13 15:15:20 +00:00
c55fb30649 Revert of Implement RTCConfiguration.iceCandidatePoolSize. (patchset #7 id:120001 of https://codereview.webrtc.org/1956453003/ )
Reason for revert:
Breaks remoting_unittests. They defined their own operator== which conflicts with this one.

I'll remove the operator== in a roll CL. But until it's approved, I'm reverting this so the FYI bots will pass.

Original issue's description:
> Implement RTCConfiguration.iceCandidatePoolSize.
>
> It works by creating pooled PortAllocatorSessions which can be picked up
> by a P2PTransportChannel when needed (after a local description is set).
>
> This can optimize candidate gathering time when there is some time between
> creating a PeerConnection and setting a local description.
>
> R=pthatcher@webrtc.org
>
> Committed: 48e9d05f51

TBR=pthatcher@webrtc.org,honghaiz@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/1972043004
Cr-Commit-Position: refs/heads/master@{#12709}
2016-05-12 19:51:45 +00:00
48e9d05f51 Implement RTCConfiguration.iceCandidatePoolSize.
It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).

This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.

R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1956453003 .

Cr-Commit-Position: refs/heads/master@{#12708}
2016-05-12 17:19:44 +00:00
dc4eb8c5b3 Refactoring some tests in peerconnectioninterface_unittest.cc.
Some tests were passing in a local description created from hard-coded
SDP strings, which won't work in the future (since some attributes such
as the fingerprint and ICE ufrag/pwd are non-modifiable). These tests
now do the typical approach of calling CreateOffer and modifying the
result if necessary.

Also added some non-const versions of the SessionDescription accessor
helper functions, since that makes it much easier to modify a
SessionDescription. Previous alternatives were re-implementing the
helper methods from scratch, or converting the description to SDP,
modifying it, and converting it back.

R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1966333002 .

Cr-Commit-Position: refs/heads/master@{#12704}
2016-05-12 15:14:54 +00:00
3fe372dbee Fix all -Wnon-virtual-dtor warnings.
This is needed to get the GN build going for several parts
of the code tree.

BUG=webrtc:3307
NOTRY=True
R=henrika@webrtc.org, nisse@webrtc.org

Review URL: https://codereview.webrtc.org/1928653005 .

Cr-Commit-Position: refs/heads/master@{#12693}
2016-05-12 06:11:09 +00:00
6ab3db249b Revert of Remove webrtc/base/scoped_ptr.h (patchset #3 id:100001 of https://codereview.webrtc.org/1942823002/ )
Reason for revert:
Breaks user code. Said code needs to stop using scoped_ptr!

Original issue's description:
> Remove webrtc/base/scoped_ptr.h
>
> BUG=webrtc:5520
>
> NOTRY=True
>
> Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a
> Cr-Commit-Position: refs/heads/master@{#12684}

TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1965063003
Cr-Commit-Position: refs/heads/master@{#12686}
2016-05-11 12:07:33 +00:00
65fc62e9dd Remove webrtc/base/scoped_ptr.h
BUG=webrtc:5520

NOTRY=True

Review-Url: https://codereview.webrtc.org/1942823002
Cr-Commit-Position: refs/heads/master@{#12684}
2016-05-11 11:29:38 +00:00
8f65cdf22b Only generate one CNAME per PeerConnection.
The CNAME is generated in the PeerConnection constructor and is populated through the MediaSessionOptions.
A default cname will be set in the MediaSessionOptions constructor.

BUG=webrtc:3431

Review-Url: https://codereview.webrtc.org/1871993002
Cr-Commit-Position: refs/heads/master@{#12650}
2016-05-07 01:40:35 +00:00
ef8b61e110 Enable -Winconsistent-missing-override flag.
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
2016-04-29 13:09:23 +00:00
d1fe281e12 Replace scoped_ptr with unique_ptr in webrtc/api/
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1930463002

Cr-Commit-Position: refs/heads/master@{#12530}
2016-04-27 13:47:40 +00:00
7ff1737e7c Re-enabling tests that were disabled for Windows debug builds.
The issue should be fixed by this commit:
https://boringssl.googlesource.com/boringssl.git/+/feaa57d13daa0b5bf3c068ce18d24870d50bfae9

BUG=webrtc:5659
NOTRY=True
R=kjellander@webrtc.org

Review URL: https://codereview.webrtc.org/1837393002 .

Cr-Commit-Position: refs/heads/master@{#12200}
2016-04-01 18:50:47 +00:00
71bdda0ede Add RTCConfiguration getter and setter methods. The immediate plan is to move some flags into an embedded MediaConfig (https://codereview.webrtc.org/1818033002/), which will be possible after Chrome is updated to use these new setter methods.
BUG=webrtc:4906
R=hbos@google.com, hbos@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1836083003 .

Cr-Commit-Position: refs/heads/master@{#12177}
2016-03-31 11:00:08 +00:00
d45b95c270 Making new unit test assertions use the standard timeout.
This is to reduce the likelihood of them flaking in the future.

R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1836253002 .

Cr-Commit-Position: refs/heads/master@{#12149}
2016-03-29 20:16:55 +00:00
Per
85e46a8f13 Fix PeerConnectionInterfaceTest.CloseAndTestStreamsAndStates
Increase delay for waiting for AudioSource state change to 10ms to hopefully fix flake that started happening on the 24th of Mars after landing https://codereview.webrtc.org/1816143002/.

TBR=deadbeef@webrtc.org
BUG=5692

Review URL: https://codereview.webrtc.org/1844503002 .

Cr-Commit-Position: refs/heads/master@{#12130}
2016-03-29 07:18:16 +00:00
d61bf803d2 Removed MediaStreamTrackInterface::set_state
The track state should be implicitly set by the underlying source.
This removes the public method and cleans up how AudioRtpReceiver is created. Further more it cleans up how the RtpReceivers are destroyed.

Note that this cl depend on https://codereview.webrtc.org/1790633002.
BUG=webrtc:5426

Review URL: https://codereview.webrtc.org/1816143002

Cr-Commit-Position: refs/heads/master@{#12115}
2016-03-24 10:16:23 +00:00
af510afc91 Use a FakeVideoTrackSource instead of nullptr in all VideoTrack tests.
Extracted from cl 1790633002.

BUG=webrtc:5426

Review URL: https://codereview.webrtc.org/1818963002

Cr-Commit-Position: refs/heads/master@{#12074}
2016-03-21 15:20:47 +00:00
eec21bdae3 Reland Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
This CL removes copy and assign support from Buffer and changes various
parameters from Buffer to CopyOnWriteBuffer so they can be passed along
and copied without actually copying the underlying data.

With this changed some parameters to be "const" and fixed an issue when
creating a CopyOnWriteBuffer with empty data.

BUG=webrtc:5155

Review URL: https://codereview.webrtc.org/1823503002

Cr-Commit-Position: refs/heads/master@{#12062}
2016-03-20 13:15:48 +00:00