This is used for fallback from DTLS to SDES encryption, which we probably still
want to support. Setting a certificate puts the DTLS transport in a "DTLS
enabled" mode, so it should be delayed until SDP with "a=fingerprint" is set.
BUG=webrtc:6972
Review-Url: https://codereview.webrtc.org/2641633002
Cr-Commit-Position: refs/heads/master@{#16199}
Reason for revert:
Broke chromium build, due to a config being removed. Will add it back and remove the dependency in a chromium CL.
Original issue's description:
> Removing #defines previously used for building without BoringSSL/OpenSSL.
>
> These defines don't work any more, so they only cause confusion:
>
> FEATURE_ENABLE_SSL
> HAVE_OPENSSL_SSL_H
> SSL_USE_OPENSSL
>
> BUG=webrtc:7025
>
> Review-Url: https://codereview.webrtc.org/2640513002
> Cr-Commit-Position: refs/heads/master@{#16196}
> Committed: eaa826c2eeTBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7025
Review-Url: https://codereview.webrtc.org/2648003003
Cr-Commit-Position: refs/heads/master@{#16197}
These defines don't work any more, so they only cause confusion:
FEATURE_ENABLE_SSL
HAVE_OPENSSL_SSL_H
SSL_USE_OPENSSL
BUG=webrtc:7025
Review-Url: https://codereview.webrtc.org/2640513002
Cr-Commit-Position: refs/heads/master@{#16196}
These attributes should be parsed in candidate trickling, but when
parsing a full session description, only "a=ice-ufrag"/"a=ice-pwd"
should be used to communicate the ufrag/password.
BUG=chromium:681286
Review-Url: https://codereview.webrtc.org/2639183002
Cr-Commit-Position: refs/heads/master@{#16194}
This CL https://codereview.webrtc.org/2641763003 changed echo return
loss /...enhancement stats from being optional to being undefined
because that was the observed behavior (and a TODO was added to
investigate why).
It turns out that these stats are sometimes available, e.g. if the test
runs for a while like MSAN bot does, so this turned the test flaky.
Example failure:
https://build.chromium.org/p/client.webrtc/builders/Linux%20MSan/builds/8242
This CL reverts that change without reverting the rest of the CL which
other CLs depend on, and updates the TODO.
BUG=chromium:627816
TBR=hta@webrtc.org
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2640743007
Cr-Commit-Position: refs/heads/master@{#16187}
According to recent spec change:
https://github.com/w3c/webrtc-stats/pull/138/files
This establishes the relationship between tracks and
[Voice/Video][Sender/Receiver]Info(s). Follow-up CLs will easily be able
to collect more stats from them.
BUG=webrtc:6757, chromium:659137, chromium:627816
Review-Url: https://codereview.webrtc.org/2641763003
Cr-Commit-Position: refs/heads/master@{#16181}
DtlsTransportChannelWrapper is renamed to be DtlsTransport which inherits from
DtlsTransportInternal. There will be no concept of "channel" in p2p level.
Both P2PTransportChannel and DtlsTransport don't depend on TransportChannel
and TransportChannelImpl any more and they are removed in this CL.
BUG=none
Review-Url: https://codereview.webrtc.org/2606123002
Cr-Commit-Position: refs/heads/master@{#16173}
Reason for revert:
Failed the memory check.
May need to fix the memory leak.
Original issue's description:
> make the DtlsTransportWrapper inherit form DtlsTransportInternal
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2606123002
> Cr-Commit-Position: refs/heads/master@{#16160}
> Committed: 5aed06c8d3TBR=deadbeef@webrtc.org,pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none
Review-Url: https://codereview.webrtc.org/2639203004
Cr-Commit-Position: refs/heads/master@{#16162}
The factory follows the same principles as PeerConnectionFactory;
various modules can be passed into its constructor but default
implementations are provided. Currently the only object the factory can
create is a UdpTransport (need to start somewhere).
UdpTransportChannel (renamed to UdpTransport)
will now accept a socket passed into its constructor,
relying on the factory to create the socket. This allows some
simplifications to be made, such as getting rid of "State" since the
only states are now "has destination set or doesn't".
BUG=webrtc:7013
Review-Url: https://codereview.webrtc.org/2632613002
Cr-Commit-Position: refs/heads/master@{#16154}
New features are:
- Invoke a destructor on the worker thread.
- Make proxy wrapper for a non-refcounted object.
- Ability to use unique_ptrs (as arguments or return values).
These features are needed by this CL:
https://codereview.webrtc.org/2632613002/
BUG=None
Review-Url: https://codereview.webrtc.org/2628343003
Cr-Commit-Position: refs/heads/master@{#16151}
In top level test functions, replaced with gtest ASSERT_*. In helper
methods in main test files, replaced with EXPECT_* or RTC_DCHECK on a
case-by-case basis.
In separate mock/fake classes used by tests (which might be of some
use also in tests of third-party applications), ASSERT was replaced
with RTC_CHECK, using
git grep -l ' ASSERT(' | grep -v common.h | \
xargs sed -i 's/ ASSERT(/ RTC_CHECK(/'
followed by additional includes of base/checks.h in affected files,
and git cl format.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2622413005
Cr-Commit-Position: refs/heads/master@{#16150}
Only use, in statstypes.h, replaced by rtc::scoped_refptr.
Reason for revert:
Intend to switch from unique_ptr to scoped_refptr,
and then reland.
Original issue's description:
> Revert of Delete rtc::linked_ptr. Only use, in statstypes.h, replaced bu std::unique_ptr. (patchset #1 id:1 of https://codereview.webrtc.org/2581663002/ )
>
> Reason for revert:
> This change broke Chrome too. It's stats processing wants to make a copy of webrtc's stats mapping, which is no longer possible with std::unique_ptr.
>
> Original issue's description:
> > Reland of Delete rtc::linked_ptr. Only use, in statstypes.h, replaced bu std::unique_ptr. (patchset #1 id:1 of https://codereview.webrtc.org/2576673002/ )
> >
> > Reason for revert:
> > Downstream project fixed to not make copies while iterating over the stats mapping.
> >
> > Original issue's description:
> > > Revert of Delete rtc::linked_ptr. Only use, in statstypes.h, replaced bu std::unique_ptr. (patchset #1 id:1 of https://codereview.webrtc.org/2567143003/ )
> > >
> > > Reason for revert:
> > > The change from rtc::linked_ptr to std::unique_ptr broke a downstream project.
> > >
> > > Original issue's description:
> > > > Delete rtc::linked_ptr. Only use, in statstypes.h, replaced with std::unique_ptr.
> > > >
> > > > BUG=webrtc:6424
> > > >
> > > > Committed: https://crrev.com/36f74e55792cae19db8b222c29aa38d6e0eb1225
> > > > Cr-Commit-Position: refs/heads/master@{#15588}
> > >
> > > TBR=solenberg@webrtc.org,pthatcher@webrtc.org,hta@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:6424
> > >
> > > Committed: https://crrev.com/8afbc8cba65d99bb7a0feece8fb3055b144106b1
> > > Cr-Commit-Position: refs/heads/master@{#15589}
> >
> > TBR=solenberg@webrtc.org,pthatcher@webrtc.org,hta@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:6424
> >
> > Committed: https://crrev.com/06035cf53abad80b0525f286a3b81e388cc7ee00
> > Cr-Commit-Position: refs/heads/master@{#15627}
>
> TBR=solenberg@webrtc.org,pthatcher@webrtc.org,hta@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6424
>
> Committed: https://crrev.com/6a58f33450a46370039cd82537612040a91165b3
> Cr-Commit-Position: refs/heads/master@{#15629}
TBR=solenberg@webrtc.org,pthatcher@webrtc.org,hta@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2641793002
Cr-Commit-Position: refs/heads/master@{#16148}
Reason for revert:
The new method doesn't work as intended.
It can't pass ownership, because the StatsReports is a vector of raw pointers to StatReport objects owned by the StatsCollector.
Original issue's description:
> New method StatsObserver::OnCompleteReports, passing ownership.
>
> The new name, OnCompleteReports rather than OnComplete, is needed
> because in C++ method lookup, overriding a method hides all otherwise
> inherited methods with the same name, even if they have a different
> signature. And here, the intention is that each subclass should
> override one or the other of the two methods, and inherit the method it
> doesn't override.
>
> This cl is a prerequisite for
> https://codereview.webrtc.org/2567143003/, because the Chrome glue
> code needs to retain the stats report after the OnComplete method has
> returned.
>
> Currently, Chrome makes a copy of the stats mapping (which breaks when
> changing ValuePtr from an rtc::linked_ptr to an std::unique_ptr). After
> this cl, Chrome can be fixed to take ownership and no longer needs to
> copy anything, unblocking cl 2567143003.
>
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2584553002
> Cr-Commit-Position: refs/heads/master@{#15708}
> Committed: b36ee8d498TBR=solenberg@webrtc.org,magjed@webrtc.org,tkchin@webrtc.org,hbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2641783002
Cr-Commit-Position: refs/heads/master@{#16144}
Based on the mapping between [Audio/Video]TrackInterface and
[Voice/Video][Sender/Receiver]Info.
The IDs of RTCMediaStreamTrackStats are updated to distinguish between
local and remote cases. Previously, if local and remote cases had the
same label only one of them would be included in the report (bug).
BUG=webrtc:6758, chromium:657854, chromium:657855, chromium:657856, chromium:627816
Review-Url: https://codereview.webrtc.org/2610843003
Cr-Commit-Position: refs/heads/master@{#16095}
This maps, in both directions, [Audio/Video]TrackInterface with
[Voice/Video][Sender/Receiver]Info.
This mapping is necessary for RTCStatsCollector to know the relationship
between RTCMediaStreamTrackStats and RTC[In/Out]boundRTPStreamStats, and
to be able to collect several RTCMediaStreamTrackStats stats.
BUG=webrtc:6757, chromium:659137, chromium:657854, chromium:627816
Review-Url: https://codereview.webrtc.org/2611983002
Cr-Commit-Position: refs/heads/master@{#16090}
Also did some slight refactoring of the code that turns constraints
into rtc::Optionals. Used a template method to avoid code duplication,
and used the same pattern for "CopyConstraintsIntoAudioOptions" as was
being used for "CopyConstraintsIntoRtcConfiguration".
BUG=webrtc:6752
Review-Url: https://codereview.webrtc.org/2628523003
Cr-Commit-Position: refs/heads/master@{#16063}
Previously, BaseChannel supported a "no RTCP" mode, which wasn't
being used any more and is being deleted.
Also, "RTCP mux required" previously worked by calling "ActivateRtcpMux"
after construction. Now it works by explicitly passing a
"require_rtcp_mux" parameter into the constructor.
BUG=None
Review-Url: https://codereview.webrtc.org/2622613004
Cr-Commit-Position: refs/heads/master@{#16045}
The BaseChannel can set the transport directly without depending on
TransportController.
When initializing the network of the BaseChannel, the ChannelManager will
create TransportChannels with the TransportController.
When enabling bundling, WebRtcSession will get or create TransportChannels
with the TransportController.
When a TransportChannel of the BaseChannel needs to be destroyed, it will
fire a signal to notify the WebRtcSession.
BUG=none.
Review-Url: https://codereview.webrtc.org/2614263002
Cr-Commit-Position: refs/heads/master@{#16043}
Bulk of the changes were produced using
git grep -l ' ASSERT(' | grep -v test | grep -v 'common\.h' |\
xargs -n1 sed -i 's/ ASSERT(/ RTC_DCHECK(/'
followed by additional includes of base/checks.h in affected files,
and git cl format.
Also had to do some tweaks to #if !defined(NDEBUG) logic in the
taskrunner code (webrtc/base/task.cc, webrtc/base/taskparent.cc,
webrtc/base/taskparent.h, webrtc/base/taskrunner.cc), replaced to
consistently use RTC_DCHECK_IS_ON, and some of the checks needed
additional #if protection.
Test code was excluded, because it should probably use RTC_CHECK
rather than RTC_DCHECK.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2620303003
Cr-Commit-Position: refs/heads/master@{#16030}
Bulk of changes done using
git grep -l 'RTC_DCHECK(false)' | \
xargs sed -i 's/RTC_DCHECK(false)/RTC_NOTREACHED()/'
peerconnection.cc also used RTC_DCHECK(false && "msg") in two places,
which were updated manually.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2623313004
Cr-Commit-Position: refs/heads/master@{#16026}
This change moves the definition of the UMA MetricsObserverInterface from api/peerconnectioninterface.h into api/umametrics.h. This allows us to remove the unwanted dependency on peerconnectioninterface.h from files in webrtc/p2p.
This is a simple refactoring with no functional changes.
BUG=None
Review-Url: https://codereview.webrtc.org/2627093005
Cr-Commit-Position: refs/heads/master@{#16020}
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-Original-Commit-Position: refs/heads/master@{#15777}
Committed: 7a5fa6cd61
Review-Url: https://codereview.webrtc.org/2587133004
Cr-Commit-Position: refs/heads/master@{#16016}
This cl was produced by
git grep -l 'ASSERT(false)' |\
xargs -n1 sed -i 's/ASSERT(false)/RTC_NOTREACHED()/'
followed by additional includes of base/checks.h in affected files,
git cl format to adjust spacing in webrtc/base/transformadapter.cc.
Finally, to make presubmit happy, one unnamed TODO marker was deleted
in that file.
This is a step towards deletion of base/common.h.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2625003003
Cr-Commit-Position: refs/heads/master@{#16009}
Moves webrtc/common_video/rotation.h and parts of
webrtc/common_video/include/video_frame_buffer.h and
webrtc/video_frame.h, and adds to a new GN target api:video_frame_api.
BUG=webrtc:5880
Review-Url: https://codereview.webrtc.org/2517173004
Cr-Commit-Position: refs/heads/master@{#15993}
External dependencies have been updated to use webrtc/sdk/android
instead, and we can remove the remaining files in webrtc/api/android.
BUG=webrtc:5882
TBR=tommi
Review-Url: https://codereview.webrtc.org/2628553003
Cr-Commit-Position: refs/heads/master@{#15985}
The BaseChannel code is geared around RTP; the presence of media engines,
send and receive streams, SRTP, SDP directional attribute negotiation, etc.
It doesn't make sense to use it for SCTP as well. This separation should make
future work both on BaseChannel and the SCTP code paths easier.
SctpDataEngine now becomes SctpTransport, and is used by WebRtcSession
directly. cricket::DataChannel is also renamed, to RtpDataChannel, so it
doesn't get confused with webrtc::DataChannel any more.
Beyond just moving code around, some consequences of this CL:
- We'll now stop using the worker thread for SCTP. Packets will be
processed right on the network thread instead.
- The SDP directional attribute is ignored, as it's supposed to be.
BUG=None
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Original-Commit-Position: refs/heads/master@{#15906}
Committed: 67b3bbe639
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Commit-Position: refs/heads/master@{#15973}
Refactor "OPT_SSLTCP" renaming it to "OPT_TLS_FAKE", making it clear
that it's not actually some kind of SSL over TCP. Also making it clear
that it's mutually exclusive with OPT_TLS. Maintaining deprecated
backwards compatible support for "OPT_SSLTCP".
Add "OPT_TLS_INSECURE" that implements the new certificate-check
disabled TLS mode, which is also mutually exclusive with the other
TLS options.
PortAllocator: Add a new TLS policy enum TlsCertPolicy which defines
the new insecure mode and added it as a RelayCredentials member.
TurnPort: Add new TLS policy member with appropriate getter and setter
to avoid constructor bloat. Initialize it from the RelayCredentials
after the TurnPort is created.
Expose the new feature in the PeerConnection API via
IceServer.tls_certificate_policy as well as via the Android JNI
PeerConnection API.
For security reasons we ensure that:
1) The policy is always explicitly initialized to secure.
2) API users have to explicitly integrate with the feature to
use it, and will otherwise get no change in behavior.
3) The feature is not immediately exposed in non-native
contexts. For example, disabling of certificate validation
is not implemented via URI parsing since this would
immediately allow it to be used from a web page.
This is a second attempt of https://codereview.webrtc.org/2557803002/
which was rolled back in https://codereview.webrtc.org/2590153002/
BUG=webrtc:6840
Review-Url: https://codereview.webrtc.org/2594623002
Cr-Commit-Position: refs/heads/master@{#15967}
Reason for revert:
Hitting DCHECK in chromium's WebrtcTransportTest.TerminateDataChannel and WebrtcTransportTest.DataStreamLate. Will investigate and reland.
Original issue's description:
> Separating SCTP code from BaseChannel/MediaChannel.
>
> The BaseChannel code is geared around RTP; the presence of media engines,
> send and receive streams, SRTP, SDP directional attribute negotiation, etc.
> It doesn't make sense to use it for SCTP as well. This separation should make
> future work both on BaseChannel and the SCTP code paths easier.
>
> SctpDataEngine now becomes SctpTransport, and is used by WebRtcSession
> directly. cricket::DataChannel is also renamed, to RtpDataChannel, so it
> doesn't get confused with webrtc::DataChannel any more.
>
> Beyond just moving code around, some consequences of this CL:
> - We'll now stop using the worker thread for SCTP. Packets will be
> processed right on the network thread instead.
> - The SDP directional attribute is ignored, as it's supposed to be.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2564333002
> Cr-Commit-Position: refs/heads/master@{#15906}
> Committed: 67b3bbe639TBR=pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None
Review-Url: https://codereview.webrtc.org/2614813003
Cr-Commit-Position: refs/heads/master@{#15908}
The BaseChannel code is geared around RTP; the presence of media engines,
send and receive streams, SRTP, SDP directional attribute negotiation, etc.
It doesn't make sense to use it for SCTP as well. This separation should make
future work both on BaseChannel and the SCTP code paths easier.
SctpDataEngine now becomes SctpTransport, and is used by WebRtcSession
directly. cricket::DataChannel is also renamed, to RtpDataChannel, so it
doesn't get confused with webrtc::DataChannel any more.
Beyond just moving code around, some consequences of this CL:
- We'll now stop using the worker thread for SCTP. Packets will be
processed right on the network thread instead.
- The SDP directional attribute is ignored, as it's supposed to be.
BUG=None
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Commit-Position: refs/heads/master@{#15906}
This use of a=bundle-only is unspecified, but not disallowed, so it
should simply result in the attribute being ignored, not a parse
failure.
Note that older versions of Firefox may generate SDP with a=bundle-only
and a nonzero port, so this also fixes an interop issue. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=1325991
BUG=webrtc:4674
Review-Url: https://codereview.webrtc.org/2609863003
Cr-Commit-Position: refs/heads/master@{#15890}
Reason for revert:
Doing a reland where systeminfo.cc includes basictypes.h so that CPU_X86 etc. are defined when they are checked/used.
Original issue's description:
> Revert of Replace basictypes.h with stdint.h for int_t types. (patchset #1 id:1 of https://codereview.webrtc.org/2604043002/ )
>
> Reason for revert:
> Very likely cause of Chromium import bot breakage (unused function '__cpuid'), TBD why.
>
> Original issue's description:
> > Replace basictypes.h with stdint.h for int_t types.
> >
> > Removes basictypes.h for types that only makes use of it for fixed-size-int
> > typedefs and replaces it with stdint.h.
> >
> > BUG=webrtc:6853
> > R=tommi@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2604043002
> > Cr-Commit-Position: refs/heads/master@{#15867}
> > Committed: 7fd1a75300
>
> TBR=tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6853
>
> Review-Url: https://codereview.webrtc.org/2603203003
> Cr-Commit-Position: refs/heads/master@{#15869}
> Committed: 7eb0e23bcf
BUG=webrtc:6853
TBR=tommi@webrtc.org
Review-Url: https://codereview.webrtc.org/2609783002
Cr-Commit-Position: refs/heads/master@{#15873}
State and priority added to ConnectionInfo. The Connection::State enum
is replaced by IceCandidatePairState enum class.
At P2PTransportChannel::GetStats, Connection::stats is called, producing
ConnectionInfo for the connection that is then filled in with additional
values from the Connection. This is refactored so that all values are
set by Connection::stats.
RTCStatsCollector is updated to surface the ConnectionInfo stats.
BUG=webrtc:6755, chromium:633550, chromium:627816
Review-Url: https://codereview.webrtc.org/2597423003
Cr-Commit-Position: refs/heads/master@{#15870}
Reason for revert:
Very likely cause of Chromium import bot breakage (unused function '__cpuid'), TBD why.
Original issue's description:
> Replace basictypes.h with stdint.h for int_t types.
>
> Removes basictypes.h for types that only makes use of it for fixed-size-int
> typedefs and replaces it with stdint.h.
>
> BUG=webrtc:6853
> R=tommi@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2604043002
> Cr-Commit-Position: refs/heads/master@{#15867}
> Committed: 7fd1a75300TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6853
Review-Url: https://codereview.webrtc.org/2603203003
Cr-Commit-Position: refs/heads/master@{#15869}
Removes basictypes.h for types that only makes use of it for fixed-size-int
typedefs and replaces it with stdint.h.
BUG=webrtc:6853
R=tommi@webrtc.org
Review-Url: https://codereview.webrtc.org/2604043002
Cr-Commit-Position: refs/heads/master@{#15867}
TestMemberIsPositive and TestMemberIsNonNegative added and used in test.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2593623002
Cr-Commit-Position: refs/heads/master@{#15866}