Commit graph

144 commits

Author SHA1 Message Date
Derek Bailey
6c127a1e2a Add Stable Writable Connection Ping Interval parameter to RTCConfiguration.
Bug: webrtc:12642
Change-Id: I543760d49f87130d717c7cf0eca7d2d2f45e8eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215242
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Derek Bailey <derekbailey@google.com>
Cr-Commit-Position: refs/heads/master@{#33751}
2021-04-16 07:11:10 +00:00
Harald Alvestrand
bc959b61b3 Remove enable_rtp_data_channel
This denies the ability to request RTP data channels to callers.
Later CLs will rip out the actual code for creating these channels.

Bug: chromium:928706
Change-Id: Ibb54197f192f567984a348f1539c26be120903f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177901
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33740}
2021-04-15 10:20:00 +00:00
Harald Alvestrand
0ccfbd2de7 Reland "Use the new DNS resolver API in PeerConnection"
This reverts commit 5a40b37105.

Reason for revert: Fixed the bug and ran layout tests.

Original change's description:
> Revert "Use the new DNS resolver API in PeerConnection"
>
> This reverts commit acf8ccb3c9.
>
> Reason for revert: Speculative revert for https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/b8851745102358680592/overview.
>
> Original change's description:
> > Use the new DNS resolver API in PeerConnection
> >
> > Bug: webrtc:12598
> > Change-Id: I5a14058e7f28c993ed927749df7357c715ba83fb
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212961
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33561}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta@webrtc.org
>
> Bug: webrtc:12598
> Change-Id: Idc9853cb569849c49052f9cbd865614710fff979
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213188
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33591}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:12598
Change-Id: Ief7867f2f23de66504877cdab1b23a11df2d5de4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214120
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33647}
2021-04-08 08:44:14 +00:00
Mirko Bonadei
5a40b37105 Revert "Use the new DNS resolver API in PeerConnection"
This reverts commit acf8ccb3c9.

Reason for revert: Speculative revert for https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/b8851745102358680592/overview.

Original change's description:
> Use the new DNS resolver API in PeerConnection
>
> Bug: webrtc:12598
> Change-Id: I5a14058e7f28c993ed927749df7357c715ba83fb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212961
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33561}

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=hta@webrtc.org

Bug: webrtc:12598
Change-Id: Idc9853cb569849c49052f9cbd865614710fff979
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213188
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33591}
2021-03-30 08:37:01 +00:00
Harald Alvestrand
acf8ccb3c9 Use the new DNS resolver API in PeerConnection
Bug: webrtc:12598
Change-Id: I5a14058e7f28c993ed927749df7357c715ba83fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212961
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33561}
2021-03-25 11:28:41 +00:00
Taylor Brandstetter
9e9bf75dc1 Add comment about setting transport_name field for RemoveIceCandidates.
NOTRY=True

Bug: webrtc:8395
Change-Id: If00bcebd35eaf833ae84ba1cd42e7ca93ab76536
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203940
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33096}
2021-01-29 00:28:02 +00:00
Emil Lundmark
801c9995c8 Signal extmap-allow-mixed by default on session level
The extmap-allow-mixed SDP attribute signals that one- and two-byte RTP
header extensions can be mixed. In practice, this also means that WebRTC
will support two-byte RTP header extensions when this is signaled by
both peers.

Bug: webrtc:9985
Change-Id: I80a3f97bab162c7d9a5acf2cae07b977641c039d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197943
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33036}
2021-01-19 14:28:11 +00:00
Harald Alvestrand
a3dd772e7a Add create function for PeerConnection that can return an error.
Needed in order to return different codes for different failures
in initialization.

Sideswipe: Check TURN URL hostnames for illegal characters.

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

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

Bug: webrtc:12079
Change-Id: I6f1af7d6164c8a0d8466f76378a925d72d57d685
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190280
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32485}
2020-10-26 10:04:06 +00:00
Per Kjellander
2bca008914 Reland "Make cricket::SctpTransportInternalFactory injectable through PeerConnectionFactory Deps"
This is to allow testing without using the singleton sctp library.
cricket::SctpTransportInternalFactory is renamed to webrtc::SctpTransportFactoryInterface and moved to the API folder to follow the API structure.
Tests can use test/pc/sctp/fake_sctp_transport.h to inject a faked data channel implementation.

patch 1 contain the original cl.
patch 2 modifications

Bug: none
Change-Id: Ic088da3eb7d9aada79e6d601dbf2d1aa2be777f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182840
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32024}
2020-09-01 12:17:00 +00:00
Björn Terelius
1f580a97e5 Revert "Make cricket::SctpTransportInternalFactory injectable through PeerConnectionFactory Deps"
This reverts commit 4c0a381137.

Reason for revert: Breaks downstream test

Original change's description:
> Make cricket::SctpTransportInternalFactory injectable through PeerConnectionFactory Deps
> 
> This is to allow testing without using the singleton sctp library. 
> cricket::SctpTransportInternalFactory is renamed to webrtc::SctpTransportFactoryInterface and moved to the API folder to follow the API structure.
> Tests can use test/pc/sctp/fake_sctp_transport.h to inject a faked data channel implementation.
> 
> Bug: none
> Change-Id: I482241269463595062548870750d33f31238c6b1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182082
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32007}

TBR=deadbeef@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org

Change-Id: I46d5ba89fe723caccd065b0ac41d77ed45373838
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182802
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32008}
2020-08-27 13:59:57 +00:00
Per Kjellander
4c0a381137 Make cricket::SctpTransportInternalFactory injectable through PeerConnectionFactory Deps
This is to allow testing without using the singleton sctp library. 
cricket::SctpTransportInternalFactory is renamed to webrtc::SctpTransportFactoryInterface and moved to the API folder to follow the API structure.
Tests can use test/pc/sctp/fake_sctp_transport.h to inject a faked data channel implementation.

Bug: none
Change-Id: I482241269463595062548870750d33f31238c6b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182082
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32007}
2020-08-27 13:19:14 +00:00
Henrik Boström
e574a31c50 [Perfect Negotiation] Fire onnegotiationneeded when chain is empty.
This CL generates "negotiationneeded" events if negotiation is needed
when the Operations Chain becomes empty. This is only implemented in
Unified Plan to avoid Plan B regressions (the event is pretty useless
in Plan B as it fires repeatedly).

In order to implement the spec-compliant behavior of only firing the
event when the chain is empty, this CL introduces
PeerConnectionObserver::OnNegotiationNeededEvent() and
PeerConnectionInterface::ShouldFireNegotiationNeededEvent() to allow
validating the event before firing it. This is needed because the event
must not be fired until a task has been posted and subsequently chained
operations could invalidate it in the meantime.

Test coverage is added for both legacy and modern "negotiationneeded"
events.

Bug: chromium:1060083
Change-Id: I1dbaa8f6ddb1c6e7c8abd8da3b92efcb64060383
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31989}
2020-08-25 09:56:39 +00:00
Taylor Brandstetter
c88fe70a8d Make Android/iOS local/remote description accessors thread safe.
Since the descriptions can be modified on the signaling thread,
ToString can only be safely called on that thread.

Bug: webrtc:11791
Change-Id: Icf6aada8aa66d00be94c6bda7b22e41b5d3bbc17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180541
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31862}
2020-08-05 22:34:46 +00:00
Taylor Brandstetter
239ac8a4e2 Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
This is a reland of 003c9be817

Found some downstream code that relies on
NetworkMonitorFactory::SetFactory, so I'm adding those methods back
temporarily. BasicNetworkManager will fall back to the static factory
if the one passed into PeerConnectionFactory is null.

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
>
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
>
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
>
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
>
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

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

Bug: webrtc:9883
Change-Id: I2e817c423f21936f87532a9694eb9a0a1b70c212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180722
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31824}
2020-08-01 00:36:27 +00:00
Taylor
cfba4ffe31 Revert "Reland "Pass NetworkMonitorFactory through PeerConnectionFactory.""
This reverts commit 7ded733518.

Reason for revert: Found more code calling NetworkMonitorFactory::SetFactory...

Original change's description:
> Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
> 
> This is a reland of 003c9be817
> 
> Original change's description:
> > Pass NetworkMonitorFactory through PeerConnectionFactory.
> >
> > Previously the instance was set through a static method, which was
> > really only done because it was difficult to add new
> > PeerConnectionFactory construction arguments at the time.
> >
> > Now that we have PeerConnectionFactoryDependencies it's easy to clean
> > this up.
> >
> > I'm doing this because I plan to add a NetworkMonitor implementation
> > for iOS, and don't want to inherit this ugliness.
> >
> > Bug: webrtc:9883
> > Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> > Commit-Queue: Taylor <deadbeef@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31815}
> 
> TBR=hta@webrtc.org, sakal@webrtc.org
> 
> Bug: webrtc:9883
> Change-Id: Ibf69a22e8f94226908636c7d50ff9eda65bd4129
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180720
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31822}

TBR=deadbeef@webrtc.org,sakal@webrtc.org,hta@webrtc.org

Change-Id: Iae51b94072cec9abc021eed4e51d1fbeee998adc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180721
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31823}
2020-07-31 22:44:39 +00:00
Taylor Brandstetter
7ded733518 Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
This is a reland of 003c9be817

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
>
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
>
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
>
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
>
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

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

Bug: webrtc:9883
Change-Id: Ibf69a22e8f94226908636c7d50ff9eda65bd4129
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180720
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31822}
2020-07-31 22:05:02 +00:00
Taylor
7d627545cb Revert "Pass NetworkMonitorFactory through PeerConnectionFactory."
This reverts commit 003c9be817.

Reason for revert: Breaks downstream build which is still using
SetFactory/ReleaseFactory. Probably will need to update this in lockstep.

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
> 
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
> 
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
> 
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
> 
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

TBR=deadbeef@webrtc.org,sakal@webrtc.org,hta@webrtc.org

Change-Id: I1f09df7be9c860017d515e5a87488340afa6eda6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180640
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31818}
2020-07-31 07:34:42 +00:00
Taylor Brandstetter
003c9be817 Pass NetworkMonitorFactory through PeerConnectionFactory.
Previously the instance was set through a static method, which was
really only done because it was difficult to add new
PeerConnectionFactory construction arguments at the time.

Now that we have PeerConnectionFactoryDependencies it's easy to clean
this up.

I'm doing this because I plan to add a NetworkMonitor implementation
for iOS, and don't want to inherit this ugliness.

Bug: webrtc:9883
Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31815}
2020-07-30 20:52:28 +00:00
Henrik Boström
831ae4ef65 Reland "[Perfect Negotiation] Implement non-racy version of SetLocalDescription."
This is a reland of d4089cae47
with the following fix:

Invoke MaybeStartGathering as the last step of DoSetLocalDescription.
This ensures that candidates and onicegatheringstatechange does not
happen before SLD is resolved. This is important for passing
external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html.

Original change's description:
> [Perfect Negotiation] Implement non-racy version of SetLocalDescription.
>
> BACKGROUND
>
> When SLD is invoked with SetSessionDescriptionObserver, the observer is
> called by posting a message back to the execution thread, delaying the
> call. This delay is "artificial" - it's not necessary; the operation is
> already complete. It's a post from the signaling thread to the signaling
> thread. The rationale for the post was to avoid the observer making
> recursive calls back into the PeerConnection. The problem with this is
> that by the time the observer is called, the PeerConnection could
> already have executed other operations and modified its states.
>
> This causes the referenced bug: one can have a race where SLD is
> resolved "too late" (after a pending SRD is executed) and the signaling
> state observed when SLD resolves doesn't make sense.
>
> When implementing Unified Plan, we fixed similar issues for SRD by
> adding a version that takes SetRemoteDescriptionObserverInterface as
> argument instead of SetSessionDescriptionObserver. The new version did
> not have the delay. The old version had to be kept around not to break
> downstream projects that had dependencies both on he delay and on
> allowing the PC to be destroyed midst-operation without informing its
> observers.
>
> THIS CL
>
> This does the old SRD fix for SLD as well: A new observer interface is
> added, SetLocalDescriptionObserverInterface, and
> PeerConnection::SetLocalDescription() is overloaded. If you call it with
> the old observer, you get the delay, but if you call it with the new
> observer, you don't get a delay.
>
> - SetLocalDescriptionObserverInterface is added.
> - SetLocalDescription is overloaded.
> - The adapter for SetSessionDescriptionObserver that causes the delay
>   previously only used for SRD is updated to handle both SLD and SRD.
> - FakeSetLocalDescriptionObserver is added and
>   MockSetRemoteDescriptionObserver is renamed "Fake...".
>
> Bug: chromium:1071733
> Change-Id: I920368e648bede481058ac22f5b8794752a220b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179100
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31798}

TBR=hta@webrtc.org

Bug: chromium:1071733
Change-Id: Ic6e8d96afa1c19604762f373716c08dbfa9d178c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180481
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31804}
2020-07-29 11:27:43 +00:00
Henrik Boström
4c9c75a2a6 Revert "[Perfect Negotiation] Implement non-racy version of SetLocalDescription."
This reverts commit d4089cae47.

Reason for revert: Breaks chromium WPT that is timing sensitive to onicegatheringstatechanges.
This CL accidentally moved the MaybeStartGatheringIceCandidates to after completing the SLD call. The fix is to move it back. I'll do that in a re-land.

Original change's description:
> [Perfect Negotiation] Implement non-racy version of SetLocalDescription.
> 
> BACKGROUND
> 
> When SLD is invoked with SetSessionDescriptionObserver, the observer is
> called by posting a message back to the execution thread, delaying the
> call. This delay is "artificial" - it's not necessary; the operation is
> already complete. It's a post from the signaling thread to the signaling
> thread. The rationale for the post was to avoid the observer making
> recursive calls back into the PeerConnection. The problem with this is
> that by the time the observer is called, the PeerConnection could
> already have executed other operations and modified its states.
> 
> This causes the referenced bug: one can have a race where SLD is
> resolved "too late" (after a pending SRD is executed) and the signaling
> state observed when SLD resolves doesn't make sense.
> 
> When implementing Unified Plan, we fixed similar issues for SRD by
> adding a version that takes SetRemoteDescriptionObserverInterface as
> argument instead of SetSessionDescriptionObserver. The new version did
> not have the delay. The old version had to be kept around not to break
> downstream projects that had dependencies both on he delay and on
> allowing the PC to be destroyed midst-operation without informing its
> observers.
> 
> THIS CL
> 
> This does the old SRD fix for SLD as well: A new observer interface is
> added, SetLocalDescriptionObserverInterface, and
> PeerConnection::SetLocalDescription() is overloaded. If you call it with
> the old observer, you get the delay, but if you call it with the new
> observer, you don't get a delay.
> 
> - SetLocalDescriptionObserverInterface is added.
> - SetLocalDescription is overloaded.
> - The adapter for SetSessionDescriptionObserver that causes the delay
>   previously only used for SRD is updated to handle both SLD and SRD.
> - FakeSetLocalDescriptionObserver is added and
>   MockSetRemoteDescriptionObserver is renamed "Fake...".
> 
> Bug: chromium:1071733
> Change-Id: I920368e648bede481058ac22f5b8794752a220b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179100
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31798}

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

Change-Id: Ie1e1ecc49f3b1d7a7e230db6d36decbc4cbe8c86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1071733
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180480
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31802}
2020-07-29 09:46:56 +00:00
Henrik Boström
d4089cae47 [Perfect Negotiation] Implement non-racy version of SetLocalDescription.
BACKGROUND

When SLD is invoked with SetSessionDescriptionObserver, the observer is
called by posting a message back to the execution thread, delaying the
call. This delay is "artificial" - it's not necessary; the operation is
already complete. It's a post from the signaling thread to the signaling
thread. The rationale for the post was to avoid the observer making
recursive calls back into the PeerConnection. The problem with this is
that by the time the observer is called, the PeerConnection could
already have executed other operations and modified its states.

This causes the referenced bug: one can have a race where SLD is
resolved "too late" (after a pending SRD is executed) and the signaling
state observed when SLD resolves doesn't make sense.

When implementing Unified Plan, we fixed similar issues for SRD by
adding a version that takes SetRemoteDescriptionObserverInterface as
argument instead of SetSessionDescriptionObserver. The new version did
not have the delay. The old version had to be kept around not to break
downstream projects that had dependencies both on he delay and on
allowing the PC to be destroyed midst-operation without informing its
observers.

THIS CL

This does the old SRD fix for SLD as well: A new observer interface is
added, SetLocalDescriptionObserverInterface, and
PeerConnection::SetLocalDescription() is overloaded. If you call it with
the old observer, you get the delay, but if you call it with the new
observer, you don't get a delay.

- SetLocalDescriptionObserverInterface is added.
- SetLocalDescription is overloaded.
- The adapter for SetSessionDescriptionObserver that causes the delay
  previously only used for SRD is updated to handle both SLD and SRD.
- FakeSetLocalDescriptionObserver is added and
  MockSetRemoteDescriptionObserver is renamed "Fake...".

Bug: chromium:1071733
Change-Id: I920368e648bede481058ac22f5b8794752a220b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179100
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31798}
2020-07-28 10:05:57 +00:00
Niels Möller
9ad1f6feca Reland "Delete PeerConnectionInterface::BitrateParameters"
This is a reland of e2dfe74b0e
Downstream breakage has been fixed.

Original change's description:
> Delete PeerConnectionInterface::BitrateParameters
>
> Replaced by the api struct BitrateSettings, added in
> https://webrtc-review.googlesource.com/74020
>
> Bug: None
> Change-Id: I8b50b32f5c7a8918fad675904d913a21fd905274
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177665
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31714}

Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Ic039e51f9f842329525887a28d1cb9819addc74b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179282
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31728}
2020-07-15 07:35:16 +00:00
Artem Titov
f60d4c2dfe Revert "Delete PeerConnectionInterface::BitrateParameters"
This reverts commit e2dfe74b0e.

Reason for revert: Breaks downstream project

Original change's description:
> Delete PeerConnectionInterface::BitrateParameters
> 
> Replaced by the api struct BitrateSettings, added in
> https://webrtc-review.googlesource.com/74020
> 
> Bug: None
> Change-Id: I8b50b32f5c7a8918fad675904d913a21fd905274
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177665
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31714}

TBR=deadbeef@webrtc.org,ilnik@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,kthelgason@webrtc.org

Change-Id: Ia62b3c43996e95668d7972882baf06a186a539d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179221
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31719}
2020-07-13 15:41:39 +00:00
Niels Möller
e2dfe74b0e Delete PeerConnectionInterface::BitrateParameters
Replaced by the api struct BitrateSettings, added in
https://webrtc-review.googlesource.com/74020

Bug: None
Change-Id: I8b50b32f5c7a8918fad675904d913a21fd905274
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177665
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31714}
2020-07-13 10:06:42 +00:00
Niels Möller
2a70703eb8 Delete MediaTransportInterface and DatagramTransportInterface
Bug: webrtc:9719
Change-Id: Ic9936a78ab42f4a9bb4cc3265f0a2cf36946558f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176500
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31536}
2020-06-17 08:41:14 +00:00
Henrik Boström
4c1e7cc19b [Adaptation] Add ability to inject resources on the PeerConnection.
This unblocks injecting platform-specific resources, such as power
usage signals in Chrome.

This CL adds AddAdaptationResource to PeerConnectionInterface and
integration tests verifying that if an injected resource is overusing,
resolution will soon be reduced.

To aid testing, some testing-only classes have been updated.

Bug: webrtc:11525
Change-Id: I820099e79f18d910fd641ee1412ad064b99ebce9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177003
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31505}
2020-06-11 14:17:01 +00:00
Eldar Rello
9276e2c39b Remove enable_simulcast_stats config flag as not needed anymore
Bug: webrtc:9547
Change-Id: Ie50453aa3496d16bfadfc9fdd3e7e6982278cfba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176841
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31492}
2020-06-10 15:59:32 +00:00
Henrik Boström
a0ff50c031 Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce3.

Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".

Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839d.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}

TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com

# Not skipping CQ checks because this is a reland.

Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 20:22:19 +00:00
Henrik Boström
9a925c9ce3 Revert "Improve outbound-rtp statistics for simulcast"
This reverts commit da6cda839d.

Reason for revert: Breaks googRtt in legacy getStats API

Original change's description:
> Improve outbound-rtp statistics for simulcast
> 
> Bug: webrtc:9547
> Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#31097}

TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9547
Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31165}
2020-05-05 13:38:51 +00:00
Eldar Rello
cda577fd59 Enable simulcast statistics
Bug: webrtc:9547
Change-Id: I8b2920dacfac0085449a797f2831b86e2e5e65b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173749
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31126}
2020-04-24 08:32:13 +00:00
Eldar Rello
da6cda839d Improve outbound-rtp statistics for simulcast
Bug: webrtc:9547
Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31097}
2020-04-17 11:28:00 +00:00
Harald Alvestrand
61f74d91f8 Reland "Expose can_trickle_ice_candidates on PeerConnection"
This reverts commit cb8c40138c.

Reason for revert: Added missing default.

Original change's description:
> Revert "Expose can_trickle_ice_candidates on PeerConnection"
>
> This reverts commit c6a65c8866.
>
> Reason for revert: Breaks downstream due to missing default
>
> Original change's description:
> > Expose can_trickle_ice_candidates on PeerConnection
> >
> > Bug: chromium:708484
> > Change-Id: I9a40e75066341f0d9f965bd3718bfcb3f0459533
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169450
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Taylor <deadbeef@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30653}
>
> TBR=deadbeef@webrtc.org,hta@webrtc.org
>
> Change-Id: Iaa5b977c4237715a8a5127cf167cf6512a3f7059
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:708484
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169540
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30655}

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

Change-Id: I608da7781f158b4b02dd226d4dcd5615c4935fa8
Bug: chromium:708484
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169541
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30656}
2020-03-02 11:35:53 +00:00
Harald Alvestrand
cb8c40138c Revert "Expose can_trickle_ice_candidates on PeerConnection"
This reverts commit c6a65c8866.

Reason for revert: Breaks downstream due to missing default

Original change's description:
> Expose can_trickle_ice_candidates on PeerConnection
> 
> Bug: chromium:708484
> Change-Id: I9a40e75066341f0d9f965bd3718bfcb3f0459533
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169450
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30653}

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

Change-Id: Iaa5b977c4237715a8a5127cf167cf6512a3f7059
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:708484
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169540
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30655}
2020-03-02 10:14:14 +00:00
Harald Alvestrand
c6a65c8866 Expose can_trickle_ice_candidates on PeerConnection
Bug: chromium:708484
Change-Id: I9a40e75066341f0d9f965bd3718bfcb3f0459533
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169450
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30653}
2020-03-02 05:19:16 +00:00
Steve Anton
f417238217 Remove iceRegatherIntervalRange
This was an ICE configuration experiment added a couple years ago that did not end up being used.

Bug: webrtc:11316
Change-Id: Iafb7e1c4f7b4598815f045808dbf6e470172f119
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167680
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30395}
2020-01-28 19:16:18 +00:00
Eldar Rello
0095d37137 Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEvent
Bug: chromium:1013564
Change-Id: Ie1bb86ed6a2a7d73fe6ee666f973d809ed05a7ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161084
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#30004}
2019-12-04 13:18:22 +00:00
Ken MacKay
831ce5f171 Export more symbols to fix Chromecast component build
When building certain Chromecast build flavors in component build mode,
there are some link errors due to symbols not being exported. This CL
fixes those issues.

TBR: kwiberg@webrtc.org
Bug: None
Change-Id: I408f0a84b8ac4610cc6b5aa6ff58248ea82c9c66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161148
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29992}
2019-12-03 17:41:04 +00:00
Bjorn A Mellem
7a9a092708 Delete media transport integration.
MediaTransport is deprecated and the code is unused.

No-Try: True
Bug: webrtc:9719
Change-Id: I5b864c1e74bf04df16c15f51b8fac3d407331dcd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160620
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29923}
2019-11-26 19:19:36 +00:00
Erik Språng
662678dbf7 Adds injectable trials from peerconnection down to transport controller.
This will be immediately useful to guarantee consistent state across
components referencing the pacer, but will be a net benefit overall
imo.

Bug: webrtc:10809
Change-Id: I49630696f757a832ccf2e4c8597193bf087ce53b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159885
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29859}
2019-11-21 12:41:45 +00:00
Qingsi Wang
25ec8882f7 Make ICE transports injectable.
Bug: chromium:1024965
Change-Id: I4961f50aee34c82701299f59a95cb90d231db6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158820
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29807}
2019-11-15 21:31:19 +00:00
Mirko Bonadei
051cae5d11 RTC_EXPORT IceServer, StatsReport::{IdBase,Value}.
The component build test failed close to the end of compilation because
of these three missing symbols, see [1].

[1] - https://ci.chromium.org/p/chromium/builders/try/win_chromium_compile_dbg_ng/435777

Bug: webrtc:9419
Change-Id: Icd32fc195229d612bc7b00451f41dc47e589e638
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159686
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29770}
2019-11-12 12:52:25 +00:00
Henrik Boström
ee6f4f67ef [PeerConnection] Implement asynchronous version of AddIceCandidate().
This is the same as the existing version, except it uses the Operations
Chain. As such, if an asynchronous operation that uses the chain is
currently pending, such as CreateOffer() or CreateAnswer(),
AddIceCandidate() will not happen until the previous operation
completes.

Bug: chromium:1019222
Change-Id: Ie6e5fc386fa9c29b5e2f8e3f65bfbaf9837d351c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158741
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29704}
2019-11-06 12:16:00 +00:00
Ivo Creusen
c3d1f9b0cd Enable injection of a custom NetEqFactory into PeerConnectionFactory.
Injecting both a custom NetEqFactory and an AudioDecoderFactory is not
supported, in that case the AudioDecoderFactory should be wrapped inside
the NetEqFactory.

Bug: webrtc:11005
Change-Id: I4e311eb1bfa03c91bca587d70540e81829f881c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158720
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29673}
2019-11-01 11:30:36 +00:00
Henrik Boström
4e19670d3a [PeerConnection] Implement parameterless SetLocalDescription().
For background, motivation, requirements and implementation notes, see
https://docs.google.com/document/d/1XLwNN2kUIGGTwz9LQ0NwJNkcybi9oKnynUEZB1jGA14/edit?usp=sharing

The parameterless SetLocalDescription() will implicitly create an
offer or answer to be set by chaining create offer or answer with
setting the session description, as per spec:
https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription

Bug: chromium:980885
Change-Id: Ia430160869df18fd47b756b9adf9e7e23ba8e969
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157444
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29653}
2019-10-30 10:24:44 +00:00
philipel
16cec3be2c Added allow_codec_switching parameter to RTCConfig.
Bug: webrtc:10795
Change-Id: I5507f1d801e262223bd18198c685b5fffa644b0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157891
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29612}
2019-10-25 11:06:31 +00:00
Mirko Bonadei
35214fcfe2 Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
2019-10-15 09:07:44 +00:00
Honghai Zhang
f8998cf8c4 Add a turn port prune policy to keep the first ready turn port.
Bug: webrtc:11026
Change-Id: I6222e9613ee4ce2dcfbb717e2430ea833c0dc373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155542
Commit-Queue: Honghai Zhang <honghaiz@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29470}
2019-10-14 19:08:23 +00:00
Eldar Rello
5ab79e62f6 Reland "Implement rollback for setRemoteDescription"
This is a reland of 16d4c4d4fb after
downstream project was updated to be prepared for the new SdpType.

Original change's description:
> Implement rollback for setRemoteDescription
>
> Bug: chromium:980875
> Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29422}

TBR=steveanton@webrtc.org

Bug: chromium:980875
Change-Id: Iba8d25bf2dc481b25a03eeae9818bd5f4c3eaa2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156569
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29460}
2019-10-14 12:40:53 +00:00
Alex Loiko
907f1548af Revert "Implement rollback for setRemoteDescription"
This reverts commit 16d4c4d4fb.

Reason for revert: breaks downstream dependency. (The new enum value kRollback is not handled correctly downstream).

Original change's description:
> Implement rollback for setRemoteDescription
> 
> Bug: chromium:980875
> Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29422}

TBR=steveanton@webrtc.org,mbonadei@webrtc.org,aleloi@webrtc.org,hbos@webrtc.org,aleloi@google.com,hta@webrtc.org,shampson@webrtc.org,elrello@microsoft.com

Change-Id: If76f6b672fdc59b7f00dfc7c150abda16614cd04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:980875
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156304
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29427}
2019-10-10 09:09:14 +00:00
Eldar Rello
16d4c4d4fb Implement rollback for setRemoteDescription
Bug: chromium:980875
Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29422}
2019-10-09 17:13:04 +00:00
Bjorn A Mellem
7da4e563b7 Allow receive-only use of datagram transport for data channels.
Adds a field trial and configuration parameter to control whether
datagram transport may be used for data channels in a receive-only
manner.  By default, if use_datagram_transport_for_data_channels is
enabled, PeerConnection will create a datagram transport and offer its
use for outgoing calls as well as accept incoming offers with compatible
datagram transport parameters.

With this change, a receive_only mode is added for datagram transport
data channels.  When receive_only is set, the PeerConnection will not
create or offer datagram transports for outgoing calls, but will accept
incoming calls that offer compatible datagram transport parameters.

Bug: webrtc:9719
Change-Id: I35667bcc408ea4bbc61155898e6d2472dd262711
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154463
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29327}
2019-09-26 20:01:06 +00:00
Niels Möller
e24557f51e Declare api:libjingle_peerconnection_api dependency on media:media_base
Deletes one of the two // nogncheck comments in peerconnection_interface.h.

Bug: webrtc:8733
Change-Id: I7cda4957206c4c5f36261517718b526734bad68a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150798
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29247}
2019-09-20 06:29:22 +00:00
Niels Möller
7b04a91f4a Delete almost all default methods on PeerConnectionInterface
Keeping default implementations only for methods involved in
ongoing transitions.

Intended to catch inconsistencies between the interface and the
PeerConnectionProxy class, at compile time.

Bug: webrtc:10716
Change-Id: I4cb126c353855f7288ba09273fa6f87aaa0f32eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140860
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29224}
2019-09-18 16:27:44 +00:00
Niels Möller
c4e80ad3bb Delete forward declarations from peer_connection_interface.h
Bug: None
Change-Id: I011b5c8ae81055ae5b4941438af226665dcbd075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152825
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29191}
2019-09-16 09:59:56 +00:00
Niels Möller
65f17ca6b4 Move MediaTransportInterface out of the libjingle_peerconnection_api target
And move related files into api/transport/ and api/transport/media/.
The moved files are unchanged, except that
congestion_control_interface.h and datagram_transport_interface.h
no longer include media_transport_interface.h, instead, they forward
declare the few MediaTransport* types they reference.

Bug: webrtc:8733
Change-Id: I4f4000d0d111f10d15a54c99af27ec26c46ae652
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152482
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29178}
2019-09-13 10:49:56 +00:00
Patrik Höglund
662e31ffec Prepare to move packet_socket_factory to api/.
I gave up on removing proxy_info, user_agent and tcp_options. I don't
think it's feasible to remove them without removing all the proxy code.
The assumption that you can set the proxy and user agent long after
you have created the factory is entrenched in unit tests and the code
itself. So is the ability to set tcp opts depending on protocol or
endpoint properties.

It may be easier to untangle proxy stuff from the factory later,
when it becomes a more first-class citizen and isn't passed via
the allocator.

Requires https://chromium-review.googlesource.com/c/chromium/src/+/1778870
to land first.

Bug: webrtc:7447
Change-Id: Ib496e2bb689ea415e9f8ec1dfedff13a83fa4a8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150799
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29091}
2019-09-06 09:09:02 +00:00
Niels Möller
340e0c5f7a Delete old version of PeerConnection::SetConfiguration
Followup to https://webrtc-review.googlesource.com/c/src/+/149166

Bug: None
Change-Id: I7b33ee241e3259b8d43f924a38a1e79ec2cd697f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149812
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29057}
2019-09-04 08:23:18 +00:00
Jonas Oreland
3c02842f2e Add TURN_LOGGING_ID
This patch adds a new (optional) attribute to TURN_ALLOCATE_REQUEST,
TURN_LOGGING_ID (0xFF05).

The attribute is put into the comprehension-optional range
so that a TURN server should ignore it if it doesn't know if.
https://tools.ietf.org/html/rfc5389#section-18.2

The intended usage of this attribute is to correlate client and
backend logs.

Bug: webrtc:10897
Change-Id: I51fdbe15f9025e817cd91ee8e2c3355133212daa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149829
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28966}
2019-08-27 07:18:00 +00:00
Bjorn A Mellem
b689af4c99 Changes to enable use of DatagramTransport as a data channel transport.
PeerConnection now has a new setting in RTCConfiguration to enable use of
datagram transport for data channels.  There is also a corresponding field
trial, which has both a kill-switch and a way to change the default value.

PeerConnection's interaction with MediaTransport for data channels has been
refactored to work with DataChannelTransportInterface instead.

Adds a DataChannelState and OnStateChanged() to the DataChannelSink
callbacks.  This allows PeerConnection to listen to the data channel's
state directly, instead of indirectly by monitoring media transport
state.  This is necessary to enable use of non-media-transport (eg.
datagram transport) data channel transports.

For now, PeerConnection watches the state through MediaTransport as well.
This will persist until MediaTransport implements the new callback.

Datagram transport use is negotiated.  As such, an offer that requests to use
datagram transport for data channels may be rejected by the answerer.  If the
offer includes DTLS, the data channels will be negotiated as SCTP/DTLS data
channels with an extra x-opaque parameter for datagram transport.  If the
opaque parameter is rejected (by an answerer without datagram support), the
offerer may fall back to SCTP.

If DTLS is not enabled, there is no viable fallback.  In this case, the data
channels are negotiated as media transport data channels.  If the receiver does
not understand the x-opaque line, it will reject these data channels, and the
offerer's data channels will be closed.

Bug: webrtc:9719
Change-Id: Ic1bf3664c4bcf9d754482df59897f5f72fe68fcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147702
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28932}
2019-08-21 18:47:58 +00:00
Niels Möller
2579f0c584 RTCError as return type for PeerConnectionInterface::SetConfiguration
Bug: None
Change-Id: I6dd7378ceac617e29945d72906cb8e2e0bd49538
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149166
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28910}
2019-08-20 06:52:05 +00:00
Alex Drake
00c7ecf625 Surface CandidatePairChange event
In order to be able to detect and measure context around candidate pair changes.

Bug: webrtc:10419
Change-Id: Iab0d7e7c80d925d1aa44617fc35975fdc6bbc6b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147340
Commit-Queue: Alex Drake <alexdrake@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28779}
2019-08-06 18:25:57 +00:00
Sebastian Jansson
6acb069c2c Adds default for PeerConnectionObserver::OnIceConnectionChange
It's planned to be deprecated so it should not be required.

Bug: webrtc:9883
Change-Id: I7daa922786d3cbf6bca38e205f4f57773f3f8448
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147275
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28715}
2019-07-31 11:33:34 +00:00
Henrik Boström
79b6980020 [PeerConnection] Implement restartIce().
This is part of "Perfect Negotiation" (https://crbug.com/980872).
Spec PR here (merged): https://github.com/w3c/webrtc-pc/pull/2169
Spec: https://w3c.github.io/webrtc-pc/#dfn-localufragstoreplace

The restartIce() makes the next createOffer() generate new ICE
credentials, as if {iceRestart:true} was passed in as options. It also
causes negotiationneeded. This is better than manually restarting ICE
because it survives rollbacks (when that is implemented) and
restartIce() can be called regardless of current signalingState.

Bug: chromium:980881
Change-Id: I8e70bec31ce9d4d6a303bd35e91b2dcc28fcad60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144941
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28596}
2019-07-18 10:00:10 +00:00
Jonas Olsson
0182a0300f Reland "Remove the injectable bitrate allocation strategy API."
This is a reland of 80cb3f6db6

Original change's description:
> Remove the injectable bitrate allocation strategy API.
>
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
>
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=kwiberg@webrtc.org

Bug: webrtc:10556
Change-Id: Ic17a7a7cc447292306876ee9582ad62fd2499765
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145900
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28585}
2019-07-17 10:20:45 +00:00
Mirko Bonadei
e95b57cdfc Revert "Remove the injectable bitrate allocation strategy API."
This reverts commit 80cb3f6db6.

Reason for revert: Performance regression on downstream project.

Original change's description:
> Remove the injectable bitrate allocation strategy API.
> 
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
> 
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=henrika@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,srte@webrtc.org,alexnarest@webrtc.org,jonasolsson@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10556
Change-Id: Ife905d661e7b1a227662395c729a9336c62fd2d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145338
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28560}
2019-07-12 15:27:19 +00:00
Jonas Olsson
80cb3f6db6 Remove the injectable bitrate allocation strategy API.
This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
plus a ton of now-dead code.

Bug: webrtc:10556
Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28523}
2019-07-10 13:13:25 +00:00
Bjorn A Mellem
5985a0481e Add a field trial to control datagram transport use.
First, the existing configuration parameter (use_datagram_transport) is
now optional.

The new field trial has two flag values:
 1. Whether to enable the datagram transport (enabled)
 2. Whether to use the datagram transport by default (default_value)

The first is a kill-switch.  It disables the datagram transport, even
for applications which inject a datagram transport factory and specify
use_datagram_transport = true.  This allows applications which hard-code
a datagram transport to switch it off via field trials.

This flag defaults to true, to avoid breaking downstream projects which
already inject and configure a datagram transport.  It may be changed to
false after updating downstream to set this field trial flag to true
when required.

The second provides a default value to be used in case the
aforementioned use_datagram_transport parameter is unset.  Applications
which explicitly set use_datagram_transport will use that value.
Applications which do not explicitly specify whether or not to use the
datagram transport will use it (or not) according to the default_value
flag.

One goal of this flag is to simplify rollout in applications which
already set field trials based on configuration, but require code
changes for new RTCConfiguration parameters.  A second goal is to
provide platforms with a knob to control whether datagram transport is
"opt-in" or "opt-out".

This flag defaults to false, to prevent downstream projects from
unintentionally enabling the datagram tranpsort.

Bug: webrtc:9719
Change-Id: I521a5fa61c992e76e5081118678a1812a261d672
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144184
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28435}
2019-07-01 20:03:05 +00:00
Niels Möller
e4ac723bdc Delete deprecated version of PeerConnectionFactoryInterface::StartAecDump
Bug: webrtc:6463
Change-Id: Ia60c34f7e1c9f3bb3f18417c7b621ba033e2ab5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141668
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28395}
2019-06-27 07:33:59 +00:00
Niels Möller
505bac209b Add default implementation of deprecated StartAecDump method.
Intended to enable deletion in downstream mock classes.

Tbr: kwiberg@webrtc.org
Bug: webrtc:6463
Change-Id: Iecc568c3ef6a983d21467a2b02ad61c59cac7e4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142231
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28318}
2019-06-19 07:45:54 +00:00
Niels Möller
e8e4dc4c8b Change StartAecDump methods to work with FILE* and FileWrapper
Bug: webrtc:6463
Change-Id: Id275975decb9b2876021ced19ee9f279b07bea53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140283
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28233}
2019-06-11 13:43:36 +00:00
Eldar Rello
da13ea2f96 Reland "Added OnIceCandidateError to API and implementation"
This is a reland of 9469c784db

Original change's description:
> Added OnIceCandidateError to API and implementation
>
> Bug: webrtc:3098
> Change-Id: I27ffd015ebf9e8130c1288f7331b0e2fdafb01ef
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135953
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28173}

TBR=steveanton@webrtc.org

Bug: webrtc:3098
Change-Id: I77af2065fc1479273f399e2b3d919f98fe8ac23d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140641
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28179}
2019-06-06 16:59:22 +00:00
Yves Gerey
3b8ed28d72 Revert "Added OnIceCandidateError to API and implementation"
This reverts commit 9469c784db.

Reason for revert: Breaks downstream projects.

Original change's description:
> Added OnIceCandidateError to API and implementation
> 
> Bug: webrtc:3098
> Change-Id: I27ffd015ebf9e8130c1288f7331b0e2fdafb01ef
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135953
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28173}

TBR=steveanton@webrtc.org,hbos@webrtc.org,qingsi@webrtc.org,amithi@webrtc.org,elrello@microsoft.com

Change-Id: I3d77242ca3556cb491f523c238fbc7d3e294839b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:3098
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140620
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#28177}
2019-06-06 14:08:24 +00:00
Eldar Rello
9469c784db Added OnIceCandidateError to API and implementation
Bug: webrtc:3098
Change-Id: I27ffd015ebf9e8130c1288f7331b0e2fdafb01ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135953
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28173}
2019-06-05 16:34:02 +00:00
Mirta Dvornicic
479a3c0f92 Add support for enabling and negotiating raw RTP packetization.
Raw RTP packetization is done using the existing RtpPacketizerGeneric
without adding the generic payload header. It is intended to be used
together with generic frame descriptor RTP header extension.

Bug: webrtc:10625
Change-Id: I2e3d0a766e4933ddc4ad4abc1449b9b91ba6cd35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138061
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28154}
2019-06-04 14:35:54 +00:00
Qingsi Wang
1fe119f12f Change the gating of surfacing candidates on ICE transport type change
from a field trial to RTCConfiguration.

The test coverage is also expanded for the underlying feature.

Bug: None
Change-Id: Ic9c1362867e4a956c5453be7a9355083b6a442f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138980
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28143}
2019-06-03 18:41:13 +00:00
Niels Möller
695cf6ac42 Delete deprecated StartRtcEventLog override with PlatformFile
Bug: webrtc:6463
Change-Id: I57c2372a232d72b054d8e3e4f423e11b3fb22430
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28131}
2019-06-03 09:00:56 +00:00
Danil Chapovalov
b32f2c7f57 Publish rtc event log api and default factory for it in api/
Bug: webrtc:10206
Change-Id: I34194ddb6fd2b0a3d7c553fadc9ddc1ea9740da0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28023}
2019-05-22 13:38:25 +00:00
Danil Chapovalov
3b112e2f35 Delete multi-parameter CreateModularPeerConnectionFactory
In favor of single-parameter CreateModularPeerConnectionFactory

Bug: None
Change-Id: Ie7e85ee4d76ff3168466440ce6471eaa75ace643
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132559
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28013}
2019-05-21 17:22:40 +00:00
Anton Sukhanov
762076b886 Add flag to use datagram transport (without implementation)
Integration with datagram transport will come in next CLs.

NOTE that since we now have implemented negotiation for media transport, we can replace configuration flags with field trials, but it will be done later for both media and datagram transports.

Bug: webrtc:9719
Change-Id: Icf062d030899d53d5646977ba195d1634050704b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137820
Commit-Queue: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27996}
2019-05-20 22:42:31 +00:00
Harald Alvestrand
4aa1192508 Change default SDP syntax for SCTP to spec-compliant.
This also introduces an option in CreateOfferOptions for
getting the non-spec behavior (2013 vintage) back.

Bug: chromium:962860
Change-Id: I72267408a61d6eb03e9895fe38b4cc803d8cbbaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136809
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27941}
2019-05-14 20:38:08 +00:00
Niels Möller
f00ca1a2b8 Make the output_period_ms argument to StartRtcEventLog optional
Intended to ease transition to new log format.

Bug: webrtc:6463, webrtc:8111
Change-Id: Icadaedb6a6a7d31038a45ff5eb0b054528f00f2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135944
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27920}
2019-05-13 07:58:39 +00:00
Jonas Oreland
a3aa9bd75b Make VideoBitrateAllocatorFactory injectable.
This patch makes VideoBitrateAllocatorFactory injectable
by adding to PeerConnectionDependencies instead of allowing it to be
overridden using MediaEngine (on PeerConnectionFactory).

With this patch VideoBitrateAllocatorFactory is owned
by the PeerConnection.

WANT_LGTM (examples) : sakal@
WANT_LGTM (api/pc) : steveanton@

Bug: webrtc:10547
Change-Id: I768d400a621f2b7a98795eb7f410adb48651bfd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132706
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27654}
2019-04-17 06:17:34 +00:00
Ying Wang
0810a7c25a Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.

Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
2019-04-10 12:38:58 +00:00
Danil Chapovalov
9435c61021 Expose TaskQueueFactory for webrtc::Call in peer connection api
making a step for GlobalTaskQueueFactory to be optional way
to provide TaskQueueFactory

Bug: webrtc:10284
Change-Id: Ife838b3691c256820973118bc5b3cb372dea09cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130488
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27423}
2019-04-02 18:46:54 +00:00
Mirko Bonadei
66e7679fb8 Export symbols needed by the Chromium component build (part 8).
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).

[1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md

Bug: webrtc:9419
Change-Id: Ib2c29054b2ae008f5291bd3b762a504b18534326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130513
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27410}
2019-04-02 10:13:36 +00:00
Jakob Ivarsson
647d5e6d91 Increase the default maximum jitter buffer size to 200 packets.
Bug: webrtc:10415
Change-Id: Iec5a5a263c11d92a23290c1c2de053fe9e5d5839
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128082
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27142}
2019-03-15 10:25:11 +00:00
Harald Alvestrand
c85328f2ca Add SCTP transport to the public API.
This involves inserting an extra layer between jsep_transport_controller
and the cricket::SctpTransportInternal layer. The objects at this layer
are reference counted.

Bug: chromium:818643
Change-Id: Ibed57c4a538de981cee63e0f7f1f319f029cab39
Reviewed-on: https://webrtc-review.googlesource.com/c/123884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26889}
2019-02-28 10:15:05 +00:00
Mirko Bonadei
61b4f7489d Fix PeerConnectionInterface::StartRtcEventLog documentation.
Logging will not stop after 10 minutes but after the max size of the
file is reached.

Bug: None
No-Try: True
Change-Id: I18c064cc60b52d892d5070b3eddf08749b60604c
Reviewed-on: https://webrtc-review.googlesource.com/c/121959
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26625}
2019-02-11 08:00:39 +00:00
Niels Möller
260a71d47c Delete deprecated method PeerConnectionFactory::CreateVideoSource
Bug: webrtc:6353
Change-Id: Icb8847b234e7a844a4dff9ff44861f6967ac7b5b
Reviewed-on: https://webrtc-review.googlesource.com/c/118661
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26587}
2019-02-07 14:24:02 +00:00
Piotr (Peter) Slatala
55b91b988f Only create no-op DTLS if media transport is used for both media and data
Currently it's possible that no-op DTLS is created if media transport is only used for data channels.
Changing it so that no-op DTLS is only created when both media & data will flow through media transport.

Bug: webrtc:9719
Change-Id: I87f27fc778ea21b12f2904bad1452d893f66b541
Reviewed-on: https://webrtc-review.googlesource.com/c/119909
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26416}
2019-01-26 00:04:22 +00:00
Anders Carlsson
45340ca824 Remove legacy video codec factories.
Removes the deprecated video codec factories and the related flag and
helper classes.

Bug: webrtc:7925
Change-Id: I0a6d1666ece9ad074fefc79b626ba241765e1b98
Reviewed-on: https://webrtc-review.googlesource.com/c/113940
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26245}
2019-01-14 14:56:40 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

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

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

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

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

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