This fixes some edge cases where early media could cause default
stream that block the actual signaled media from beind delivered.
Bug: webrtc:11477
Change-Id: I8b26df63a690861bd19f083102d1395e882f8733
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183120
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32030}
This CL removes the possibility that APM cannot be created, i.e., that
the create method can return nullptr. That was already the case
implicitly but this CL makes that behavior explicit.
Bug: webrtc:5298
Change-Id: I2706ea538c9d1b4bcd65faecab637640a209a4dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183101
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32029}
R.java file creation responsibilities will be moved to android_library
and android_apk targets and creating R.java files in the
android_resources targets is now deprecated. This cl migrates webrtc
targets to the new way.
Bug: chromium:1073476
Change-Id: I0a2fa759d3ff1d8e201e5719c9238701a58171e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183060
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32026}
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}
When configuring without protobuf this test fails to compile with the error:
perf_test_histogram_writer_no_protobuf.cc:20:1: error: non-void function does not return a value
Bug: None
Change-Id: I8e2676ee4b5284eac08e648fc43bdfc585fc5d64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182740
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32021}
PortAllocator depends on PacketSocketFactory, so it should be deleted
afterwords in case its created sockets depend on the resources owned
by the factory.
Bug: None
Change-Id: I7716c552d371b78360db656cc2f4fd03415d0e00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182881
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32020}
Original patch contributed by andrey.semashev@gmail.com.
In PhysicalSocketServer::WaitEpoll(), the loop verifies that the
signalled dispatcher is in dispatchers_ set. It does so by looking up
the dispatcher pointer in the set. This is vulnerable to the ABA
problem because one dispatcher may be removed and destroyed and another
created and added with the same address before epoll reports an event
for the old dispatcher. The same issue exists for other Wait
implementations, if a dispatcher is removed and a new one added with
the same socket handle is the old.
This is avoided by using a 64-bit key for looking up the dispatcher
in the set. The key is set from a running counter which gets incremented
when a dispatcher is added to the set, so even if the same dispatcher
pointer is added, removed and added again, the key value will be
different.
This changes the storage of dispatchers_ from a set to a flat_hash_map,
which uses a bit more memory but has faster lookup (O(1) as opposed to
O(log n)).
Bug: webrtc:11124
Change-Id: I6d206e1a367b58ba971edca9b48af7664384b797
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181027
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32019}
This will enable wiring up these signals to the platform specific capturers
Bug: chromium:1116430
Change-Id: I6cdab61eab202a24fa56167da57c389a5b1880c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182683
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32017}
It was only being called for the first video media channel; with
unified plan SDP mode, it's possible to have multiple video media
channels, one for each video m= section.
Bug: webrtc:10795
Change-Id: I57fda9383d0f8803df1937ac5103d9ae354c0748
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182404
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32010}
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}
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}
This patch adds send_ping_on_selected_ice_controlling that is
the same like send_ping_on_switch_ice_controlling except that it
also sends the ping on initial selection (i.e not a switch(?)).
I.e it sends "extra" pings when selecting a connection.
This lets the peer know that this candidate pair has been selected,
which causes some peers to unblock sending on the candidate pair.
TODO deprecate send_ping_on_switch_ice_controlling in favor of this,
i.e I should have done it like this on first attempt :(
Bug: webrtc:10273
Change-Id: I0e02cd5fd6d677720c1fa863af5d7c2334d02d4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182780
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32006}
Also add an unit test for RtpTransceiver under Unified Plan, and
refactor so that we no longer use StopInternal() internally.
This will make removing it easier.
Bug: chromium:980879
Change-Id: I46219112e3aba8e7513c08336b10e95b1ea5d68b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182681
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31999}
This is a reland of ba8abbb630
This can be relanded as the queuing issues that were causing a
crash in the WebRTC roll in Chromium have been resolved. I have
added the Chromium failing targets to the CQ for this commit and
they have succeeded.
Original change's description:
> [Adaptation] Remove QualityScalerResource when disabled.
>
> Bug: webrtc:11843
> Change-Id: I2d3e40356c266f189db0242f3c7590e6d83e4456
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181369
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31924}
Bug: webrtc:11843
Change-Id: I228331293060ef996f1dd7f8e18d52b0818f526b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182080
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31996}
This test was added in
https://webrtc-review.googlesource.com/c/src/+/180620. On my machine it
passes about 98% of the time.
The test is meant to count the number of times the callback that the
operations chain is empty has been invoked, and does this by ensuring
the last operation to make the chain empty has completed before
expecting that the counter has increased.
The race happns when the operation has completed but the callback that
the chain is empty has not happened yet. This CL fixes that by using
EXPECT_EQ_WAIT instead.
TBR=hta@webrtc.org
Bug: chromium:1060083
Change-Id: I2ebfac3e635ef895d6602f7360e5ec6006fc1d0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182541
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31992}
Resource adaptation needs refactoring for async adaptations. For now
the resource adaptation processor can work on the encoder thread, until
it is refactored to support async adaptation.
Bug: webrtc:11867
Change-Id: I9c46da356db19c0fd52748c999ccb216f2ca923b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182040
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31991}
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}
Some versionss of WebKit.framework export these symbols. Even if they
are private symbols, WebRTC needs to provide a way to prefix them like
the OBJC API symbols (see [1]).
[1] - https://webrtc-review.googlesource.com/c/src/+/173781
Bug: None
Change-Id: Ibb9ca2c89796a0d5e2ca65c549ba8799f24bbe7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182421
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31987}