771 Commits

Author SHA1 Message Date
hbos
dbb64d8f27 RTCStatsCollectorTest: Remove ExpectReportContainsDataChannel.
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}
2016-12-21 09:57:46 +00:00
hbos
02d2a92d92 RTCStatsReport::AddStats DCHECKs that the ID is unique.
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}
2016-12-21 09:29:05 +00:00
deadbeef
fe4a8a41ad Implement current/pending session description methods.
BUG=webrtc:6917

Review-Url: https://codereview.webrtc.org/2590753002
Cr-Commit-Position: refs/heads/master@{#15722}
2016-12-21 01:56:17 +00:00
nisse
306127635e Convert rtc_event_log from webrtc::Clock to rtc::TimeMicros.
TBR=pthatcher@webrtc.org
BUG=webrtc:6733

Review-Url: https://codereview.webrtc.org/2515653002
Cr-Commit-Position: refs/heads/master@{#15711}
2016-12-20 13:03:58 +00:00
nisse
b36ee8d498 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}
2016-12-20 11:30:00 +00:00
magjed
d5236e2948 Revert of Add disabled certificate check support to IceServer PeerConnection API. (patchset #8 id:140001 of https://codereview.webrtc.org/2557803002/ )
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: b0f04fdb9e

TBR=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}
2016-12-20 10:22:06 +00:00
hbos
7472dc3b94 Removed undefined method from webrtcsession.h.
It was accidentally added in https://codereview.webrtc.org/2583883002/
(added in one patch set, removed in another but forgot about the header
declaration).

BUG=webrtc:6875, chromium:627816

Review-Url: https://codereview.webrtc.org/2583123003
Cr-Commit-Position: refs/heads/master@{#15685}
2016-12-19 17:34:14 +00:00
hbos
b78306a7d3 Fix segfault when PeerConnection is destroyed during stats collection.
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}
2016-12-19 13:06:57 +00:00
hbos
df6075a77f RTCStatsCollector: Utilize network thread to minimize thread hops.
(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}
2016-12-19 12:58:02 +00:00
hnsl
b0f04fdb9e 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}
2016-12-19 12:10:30 +00:00
brandtr
7250b398a1 Move FlexfecReceiveStream from api/call/ to call/.
Also rename internal::FlexfecReceiveStream to FlexfecReceiveStreamImpl.

BUG=webrtc:6849

Review-Url: https://codereview.webrtc.org/2561123002
Cr-Commit-Position: refs/heads/master@{#15666}
2016-12-19 09:13:46 +00:00
pbos
5214a0ab8e Add support for content hints to VideoTrack.
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}
2016-12-16 23:39:11 +00:00
hbos
3168c7a04b Rename RTCOutboundRTPStreamStats *_rtt members to *_round_trip_time.
The spec renamed these recently:
https://w3c.github.io/webrtc-stats/#since-21-sep-2016*

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2576383002
Cr-Commit-Position: refs/heads/master@{#15630}
2016-12-15 14:17:15 +00:00
nisse
6a58f33450 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

Review-Url: https://codereview.webrtc.org/2579753002
Cr-Commit-Position: refs/heads/master@{#15629}
2016-12-15 11:54:52 +00:00
hbos
7bf5369763 RTCStatsIntegrationTest: TestMemberIsIDReference on all defined IDs.
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}
2016-12-15 11:33:42 +00:00
nisse
06035cf53a 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

Review-Url: https://codereview.webrtc.org/2581663002
Cr-Commit-Position: refs/heads/master@{#15627}
2016-12-15 11:12:22 +00:00
hbos
e10e6d1f47 RTCOutboundRTPStreamStats.roundTripTime: Only report non-negative values.
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}
2016-12-15 09:54:38 +00:00
hbos
9a394f0649 Skip RTCMediaStreamTrackStats.echoReturnLoss[Enhancement] default value.
Due to the Chromium implementation[1] of GetAudioProcesssingStats,
echoReturnLoss and echoReturnLossEnhancement could default to -100 when
no value was available. This should be improved by using rtc::Optional
or AudioProcessorInterface::GetStats being able to return false, but
this requires a bunch of refactoring.

In the meantime we "blacklist" the value -100 which is a nonsense value
anyway. In that case echoReturnLoss[Enhancement] is correctly left
undefined.

[1] https://cs.chromium.org/chromium/src/content/renderer/media/media_stream_audio_processor_options.cc?sq=package:chromium&dr=C&rcl=1481530670&l=461

BUG=chromium:669877

Review-Url: https://codereview.webrtc.org/2573443002
Cr-Commit-Position: refs/heads/master@{#15611}
2016-12-14 15:58:30 +00:00
nisse
8afbc8cba6 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

Review-Url: https://codereview.webrtc.org/2576673002
Cr-Commit-Position: refs/heads/master@{#15589}
2016-12-14 08:06:38 +00:00
nisse
36f74e5579 Delete rtc::linked_ptr. Only use, in statstypes.h, replaced with std::unique_ptr.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2567143003
Cr-Commit-Position: refs/heads/master@{#15588}
2016-12-14 07:36:26 +00:00
deadbeef
b236257763 Fixing integer overflow when parsing bandwidth attribute.
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}
2016-12-14 00:37:16 +00:00
gyzhou
95aa96465d Support external audio mixer in webrtc 2.
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}
2016-12-13 22:06:35 +00:00
deadbeef
7af91ddd6b Removing "crypto_required" from MediaContentDescription.
"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}
2016-12-13 19:29:16 +00:00
hnsl
b68cc75f19 ParseCandidate(): Refactor to fix memcheck false positive.
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}
2016-12-13 18:33:47 +00:00
hnsl
277b250936 Refactor "secure bool" into explicit PROTO_TLS.
BUG=none

Review-Url: https://codereview.webrtc.org/2568833002
Cr-Commit-Position: refs/heads/master@{#15572}
2016-12-13 13:17:31 +00:00
hbos
e381015ca0 Revert of New PeerConnectionInterface::GetStats: No bogus default implementation. (patchset #1 id:1 of https://codereview.webrtc.org/2566143002/ )
Reason for revert:
Breaks google3 importer:
http://webrtc-buildbot-master.mtv.corp.google.com:21000/builders/WebRTC%20google3%20Importer/builds/11260

Original issue's description:
> New PeerConnectionInterface::GetStats: No bogus default implementation.
>
> The Chromium mock implementation implements the new GetStats API, so we
> can remove this default implementation.
>
> BUG=chromium:627816
>
> Committed: https://crrev.com/8f2309478da41cd8b829d022874dfd5ddc58551c
> Cr-Commit-Position: refs/heads/master@{#15563}

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

Review-Url: https://codereview.webrtc.org/2575493002
Cr-Commit-Position: refs/heads/master@{#15567}
2016-12-13 10:35:24 +00:00
hbos
8f2309478d New PeerConnectionInterface::GetStats: No bogus default implementation.
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}
2016-12-13 09:45:15 +00:00
deadbeef
6de92f9255 Don't allow changing ICE pool size after SetLocalDescription.
This was the decision at IETF 97
(see: https://github.com/rtcweb-wg/jsep/issues/381). It's simpler to not
allow this (since there's no real need for it) rather than try to decide
complex rules for it.

BUG=webrtc:6864

Review-Url: https://codereview.webrtc.org/2566833002
Cr-Commit-Position: refs/heads/master@{#15559}
2016-12-13 02:49:40 +00:00
deadbeef
25ed435afe Implement parsing/serialization of a=bundle-only.
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}
2016-12-13 02:37:41 +00:00
gyzhou
39ce11f7f6 Revert of Support external audio mixer. (patchset #5 id:140001 of https://codereview.webrtc.org/2539213003/ )
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}
2016-12-13 01:07:00 +00:00
gyzhou
f6bcac59e8 Support external audio mixer in webrtc.
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}
2016-12-13 00:25:16 +00:00
philipp.hancke
ba7e71b53a remove googViewLimitedResolution stat
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}
2016-12-12 12:46:27 +00:00
hnsl
bd44bb0184 Fix out of bound reads in ParseIceServerUrl() for various input.
BUG=webrtc:6835

Review-Url: https://codereview.webrtc.org/2556783002
Cr-Commit-Position: refs/heads/master@{#15544}
2016-12-12 11:14:34 +00:00
hbos
e448dd5355 RTCIceCandidatePairStats.consentRequestsSent set by RTCStatsCollector
and requestsSent is updated.

Before:
  requestsSent = total ping requests
Now
  requestsSent = pings sent before first response
  consentRequestsSent = pings after first response

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-consentrequestssent

BUG=chromium:633550

Review-Url: https://codereview.webrtc.org/2558293002
Cr-Commit-Position: refs/heads/master@{#15541}
2016-12-12 09:22:59 +00:00
minyue
ba41428b12 Adding googAudioNetworkAdaptorConfig to MediaConstraintsInterface.
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}
2016-12-11 10:18:00 +00:00
deadbeef
d1a38b591d Implement the "needs-ice-restart" logic for SetConfiguration.
Changing the configuration will cause subsequently generated offers to change
the ufrag/pwd as necessary, so that a new round of gathering is started that
uses the new configuration.

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

BUG=webrtc:6714

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

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

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

BUG=webrtc:6855

Review-Url: https://codereview.webrtc.org/2564683002
Cr-Commit-Position: refs/heads/master@{#15526}
2016-12-10 19:44:35 +00:00
hbos
02cd4d6dfc RTCInboundRTPStreamStats.packetsLost set by RTCStatsCollector.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-packetslost

BUG=chromium:657855

Review-Url: https://codereview.webrtc.org/2559973002
Cr-Commit-Position: refs/heads/master@{#15507}
2016-12-09 12:19:50 +00:00
hbos
d82f5125b7 RTCIceCandidatePairStats.requestsReceived defined by RTCStatsCollector.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-requestsreceived

BUG=chromium:633550

Review-Url: https://codereview.webrtc.org/2565463002
Cr-Commit-Position: refs/heads/master@{#15506}
2016-12-09 12:12:45 +00:00
brandtr
1cfbd6003b Generalize FlexfecReceiveStream::Config.
- Adding information about RTCP and RTP header extensions.
- Renaming flexfec_payload_type -> payload_type and
  flexfec_ssrc -> remote_ssrc.

BUG=webrtc:5654
R=stefan@webrtc.org, philipel@webrtc.org

Review-Url: https://codereview.webrtc.org/2542413002
Cr-Commit-Position: refs/heads/master@{#15477}
2016-12-08 12:18:05 +00:00
hta
b39db841b6 Refactoring: Declare cricket::Codec constructors protected.
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}
2016-12-08 09:50:52 +00:00
zhihuang
c4adabf967 Create the Java Wrapper of RtpReceiverObserverInterface.
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}
2016-12-07 18:36:49 +00:00
kjellander
676e08f3b6 Refactor webrtc/{api,audio} and modules/audio_coding for GN check
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}
2016-12-07 16:23:35 +00:00
ossu
f515ab8c3f Moved call.h and most of api/call/* into call/
BUG=webrtc:6716

Review-Url: https://codereview.webrtc.org/2550273003
Cr-Commit-Position: refs/heads/master@{#15460}
2016-12-07 12:53:04 +00:00
deadbeef
49f34fdd23 Relanding: 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

Review-Url: https://codereview.webrtc.org/2517883002
Cr-Commit-Position: refs/heads/master@{#15453}
2016-12-07 00:22:11 +00:00
deadbeef
57fd7263d1 Revert of Refactoring that removes P2PTransport and DtlsTransport classes. (patchset #9 id:150001 of https://codereview.webrtc.org/2517883002/ )
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}
2016-12-06 23:29:07 +00:00
deadbeef
bd28681d02 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

Review-Url: https://codereview.webrtc.org/2517883002
Cr-Commit-Position: refs/heads/master@{#15450}
2016-12-06 22:56:26 +00:00
zhihuang
ebbe4f2ed5 Set the preferred DSCP value for Rtp data channel to be DSCP_AF41.
BUG=b/31996729

Review-Url: https://codereview.webrtc.org/2539813003
Cr-Commit-Position: refs/heads/master@{#15449}
2016-12-06 18:45:47 +00:00
magjed
768c64877e Move /webrtc/api/android files to /webrtc/sdk/android
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}
2016-12-06 12:29:45 +00:00
deadbeef
4c6696c912 Revert of Disable P2PTestConductor.LocalP2PTestDtlsBundleInIceRestart under msan (patchset #1 id:1 of https://codereview.webrtc.org/2546913003/ )
Reason for revert:
Should be fixed (for good this time) by https://codereview.webrtc.org/2544003004/

Original issue's description:
> Disable P2PTestConductor.LocalP2PTestDtlsBundleInIceRestart under msan
>
> The test is flaky.
>
> BUG=webrtc:6811
> TBR=deadbeef@webrtc.org
>
> Committed: https://crrev.com/a28a1b9db6b8b44b3687c45fddf834e81b921b20
> Cr-Commit-Position: refs/heads/master@{#15382}

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

Review-Url: https://codereview.webrtc.org/2546183003
Cr-Commit-Position: refs/heads/master@{#15399}
2016-12-03 02:09:09 +00:00