Remove ExpectReportContainsDataChannel in favor of EXPECT_EQ checks of
RTCDataChannelStats objects.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2597433002
Cr-Commit-Position: refs/heads/master@{#15731}
Previously it was allowed to call AddStats with stats of the same ID
multiple times.
This revealed a few things:
- Local and remote streams can have the same label.
RTCMediaStreamStats's ID is updated to include "local"/"remote".
- The same certificate can show up multiple times (e.g. for local and
remote in a loopback), so we skip creating RTCCertificateStats for the
same certificate multiple times
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2593503003
Cr-Commit-Position: refs/heads/master@{#15730}
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}
Reason for revert:
This CL broke all Chromium WebRTC FYI bots. A roll+fix was attempted here: https://codereview.chromium.org/2590783003/, but failed to land. I'm reverting this CL now to make the tree green again. Make the API change gradual when you reland so that we can update Chromium between.
Original issue's description:
> Add disabled certificate check support to IceServer PeerConnection API.
>
> 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.
>
> 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.
>
> BUG=webrtc:6840
>
> Review-Url: https://codereview.webrtc.org/2557803002
> Cr-Commit-Position: refs/heads/master@{#15670}
> Committed: b0f04fdb9eTBR=pthatcher@webrtc.org,deadbeef@webrtc.org,hnsl@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6840
Review-Url: https://codereview.webrtc.org/2590153002
Cr-Commit-Position: refs/heads/master@{#15703}
RTCStatsCollector relies on PeerConnection and its WebRtcSession. If the
PeerConnection is destroyed, reference counting keeps the
RTCStatsCollector alive until the request has completed. But the request
is using PeerConnection/WebRtcSession resources that are destroyed in
~PeerConnection().
To get around this problem, RTCStatsCollector::WaitForPendingRequest()
is added, which is invoked at ~PeerConnection().
Integration test added, it caused a segmentation fault before this
change / EXPECT failure.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2583613003
Cr-Commit-Position: refs/heads/master@{#15674}
(This is a re-upload of https://codereview.webrtc.org/2567243003/, the
CQ stopped working there.)
The previously used WebRtcSession::GetTransportStats did a synchronous
invoke per channel (voice, video, data) on the signaling thread to the
network thread - e.g. 3 blocking invokes.
It is replaced by WebRtcSession::GetStats[_s] which can be invoked on
the signaling thread or on any thread if a ChannelNamePairs argument is
present (provided by WebRtcSession::GetChannelNamePairs on the signaling
thread).
With these changes, and changes allowing the getting of certificates
from any thread, the RTCStatsCollector can turn the 3 blocking thread
invokes into 1 non-blocking invoke.
BUG=webrtc:6875, chromium:627816
Review-Url: https://codereview.webrtc.org/2583883002
Cr-Commit-Position: refs/heads/master@{#15672}
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.
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.
BUG=webrtc:6840
Review-Url: https://codereview.webrtc.org/2557803002
Cr-Commit-Position: refs/heads/master@{#15670}
Also rename internal::FlexfecReceiveStream to FlexfecReceiveStreamImpl.
BUG=webrtc:6849
Review-Url: https://codereview.webrtc.org/2561123002
Cr-Commit-Position: refs/heads/master@{#15666}
Permits overriding the source-default is_screencast option to be able to
treat screencast sources as fluid video, preserving motion at the loss
of individual frame quality (or vice versa).
BUG=chromium:653531
R=deadbeef@webrtc.org
Review-Url: https://codereview.webrtc.org/2579993003
Cr-Commit-Position: refs/heads/master@{#15659}
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
Review-Url: https://codereview.webrtc.org/2579753002
Cr-Commit-Position: refs/heads/master@{#15629}
This makes sure that the referenced stats dictionaries exist.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2577033002
Cr-Commit-Position: refs/heads/master@{#15628}
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
Review-Url: https://codereview.webrtc.org/2581663002
Cr-Commit-Position: refs/heads/master@{#15627}
Underlying stats gatherers may otherwise default it to -1.
BUG=chromium:669877, chromium:627816
Review-Url: https://codereview.webrtc.org/2562703007
Cr-Commit-Position: refs/heads/master@{#15625}
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
Review-Url: https://codereview.webrtc.org/2576673002
Cr-Commit-Position: refs/heads/master@{#15589}
It's still valid SDP so just clamp it at INT_MAX.
BUG=chromium:648071
Review-Url: https://codereview.webrtc.org/2571073002
Cr-Commit-Position: refs/heads/master@{#15582}
An external audio mixer will be passed from PeerConnectionFactory to
AudioTransportProxy.
This CL has rewritten based on reverted CL
https://codereview.chromium.org/2539213003/
The only difference is that
static MediaEngineInterface* Create(
webrtc::AudioDeviceModule* adm,
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
audio_decoder_factory,
WebRtcVideoEncoderFactory* video_encoder_factory,
WebRtcVideoDecoderFactory* video_decoder_factory);
in media/engine/webrtcmediaengine.h is kept in this CL instead of
replaced for backward compatibility.
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2570993002
Cr-Commit-Position: refs/heads/master@{#15580}
"Crypto required" is a property of the PeerConnection of construction
time; it has nothing to do with SDP. So I'm moving it out of
MediaContentDescription and putting it in the BaseChannel constructor
instead. This is more intuitive, and provides the added assurance that
"secure_required_" can't be flipped from "true" to "false".
BUG=None
Review-Url: https://codereview.webrtc.org/2537343003
Cr-Commit-Position: refs/heads/master@{#15579}
Also make supported protocols explicit in check.
Fix inconsistency where TLS_PROTOCOL_NAME was not exported.
BUG=webrtc:6885
Review-Url: https://codereview.webrtc.org/2570803003
Cr-Commit-Position: refs/heads/master@{#15577}
The Chromium mock implementation implements the new GetStats API, so we
can remove this default implementation.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2566143002
Cr-Commit-Position: refs/heads/master@{#15563}
This CL doesn't start *using* a=bundle-only; it just adds support for
parsing it. We need to do this first, because otherwise old versions of
WebRTC will interpret a zero port value as a rejected m= section.
BUG=webrtc:4674
Review-Url: https://codereview.webrtc.org/2562183002
Cr-Commit-Position: refs/heads/master@{#15558}
Reason for revert:
A interface change broke some downstream code in google3.
Original issue's description:
> Support external audio mixer in webrtc.
>
> An external audio mixer will be passed from PeerConnectionFactory to
> AudioTransportProxy.
>
> BUG=webrtc:6457
>
> Committed: https://crrev.com/f6bcac59e88c3be5ffd73bbb1098f2d82ee316a1
> Cr-Commit-Position: refs/heads/master@{#15556}
TBR=solenberg@webrtc.org,aleloi@webrtc.org,deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2562333003
Cr-Commit-Position: refs/heads/master@{#15557}
An external audio mixer will be passed from PeerConnectionFactory to
AudioTransportProxy.
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2539213003
Cr-Commit-Position: refs/heads/master@{#15556}
adaptReason in webrtcvideoengine2.h only defines NONE=0, CPU=1 and BANDWIDTH=2 so &0x4 can not happen anymore.
This was probably never implemented in videoengine2
BUG=webrtc:6870
Review-Url: https://codereview.webrtc.org/1887773002
Cr-Commit-Position: refs/heads/master@{#15546}
This is to allow application to pass an audio network adaptor config string to WebRTC.
BUG=webrtc:6303
Review-Url: https://codereview.webrtc.org/2437803004
Cr-Commit-Position: refs/heads/master@{#15532}
Changing the configuration will cause subsequently generated offers to change
the ufrag/pwd as necessary, so that a new round of gathering is started that
uses the new configuration.
This CL also makes some minor unrelated changes: changing the reference SDP in
the PC tests to more match what we generate, and relaxing the network thread
requirement for JsepTransport (since there's no reason the "needs-ice-restart"
flag can't be accessed from the signaling thread).
BUG=webrtc:6714
Review-Url: https://codereview.webrtc.org/2563153002
Cr-Commit-Position: refs/heads/master@{#15527}
The enum is at about the same level of detail as DOMExceptions, and I
looked through the spec making sure that chromium will be able to perform
the DOMException mapping for each one.
The new enum is called RtcError and is outside the PeerConnectionInterface
scope, because we may want to use this for things not associated with a
PeerConnection in the future.
This CL doesn't yet use the error enum anywhere; that will probably happen
in follow-up CLs for the individual methods.
BUG=webrtc:6855
Review-Url: https://codereview.webrtc.org/2564683002
Cr-Commit-Position: refs/heads/master@{#15526}
This makes it obvious that cricket::Codec should not be
instantiated; only subclasses should be instantiated.
BUG=none
Review-Url: https://codereview.webrtc.org/2546363002
Cr-Commit-Position: refs/heads/master@{#15468}
Create the RtpReceiver.Observer which is a Java wrapper over the webrtc::RtpReceiverObserverInterface.
The callback function onFirstPacketReceived will be called whenever the first audio or video packet it received.
BUG=webrtc:6742
Review-Url: https://codereview.webrtc.org/2531333003
Cr-Commit-Position: refs/heads/master@{#15464}
This moves some GN check configurations out of .gn to individual targets.
The now checked targets are:
"//webrtc/api/*",
"//webrtc/audio/*",
"//webrtc/modules/audio_coding/*",
Many targets were fixed by adding dependencies, but the ones that
requires more refactorings are left with the check_includes attribute
set to false instead.
Make //webrtc/test:test_support a public dep of //webrtc/test:test_main
to avoid having to add that to all users of it.
BUG=webrtc:6828
NOTRY=True
Review-Url: https://codereview.webrtc.org/2556943003
Cr-Commit-Position: refs/heads/master@{#15461}
Their base class, Transport, still exists, but it now has a more specific
role: a helper class that applies TransportDescriptions. And is renamed
to JsepTransport as a result.
TransportController is now the entity primarily responsible for managing
TransportChannels. It also starts storing pointers to the DTLS and ICE
chanels separately, which will make it easier to remove
TransportChannel/TransportChannelImpl in a subsequent CL.
BUG=None
Review-Url: https://codereview.webrtc.org/2517883002
Cr-Commit-Position: refs/heads/master@{#15453}
Reason for revert:
Deletion of transport.h broke downstream builds.
Going to reland with transport.h containing enums/etc.
Original issue's description:
> Refactoring that removes P2PTransport and DtlsTransport classes.
>
> Their base class, Transport, still exists, but it now has a more specific
> role: a helper class that applies TransportDescriptions. And is renamed
> to JsepTransport as a result.
>
> TransportController is now the entity primarily responsible for managing
> TransportChannels. It also starts storing pointers to the DTLS and ICE
> chanels separately, which will make it easier to remove
> TransportChannel/TransportChannelImpl in a subsequent CL.
>
> BUG=None
>
> Committed: https://crrev.com/bd28681d02dee8c185aeb39207e8154f0ad14a37
> Cr-Commit-Position: refs/heads/master@{#15450}
TBR=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/2553043004
Cr-Commit-Position: refs/heads/master@{#15452}
Their base class, Transport, still exists, but it now has a more specific
role: a helper class that applies TransportDescriptions. And is renamed
to JsepTransport as a result.
TransportController is now the entity primarily responsible for managing
TransportChannels. It also starts storing pointers to the DTLS and ICE
chanels separately, which will make it easier to remove
TransportChannel/TransportChannelImpl in a subsequent CL.
BUG=None
Review-Url: https://codereview.webrtc.org/2517883002
Cr-Commit-Position: refs/heads/master@{#15450}
I decided to make one webrtc/sdk/android/BUILD.gn for both tests and Java/jni src.
External dependencies needs to be updated after this CL.
Future work is required to clean up the Android api and move
implementation details to /webrtc/sdk/android/src.
BUG=webrtc:5882,webrtc:6804
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2547483003
Cr-Commit-Position: refs/heads/master@{#15443}