784 Commits

Author SHA1 Message Date
hbos
d17a5a7709 RTCIceCandidateStats.deleted = false added.
Since previously, only the deleted = false case is supported, but now
that stat is added. It's a recent addition to the spec:
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-deleted

BUG=webrtc:6756, chromium:632723, chromium:627816

Review-Url: https://codereview.webrtc.org/2591963003
Cr-Commit-Position: refs/heads/master@{#15871}
2017-01-02 16:09:59 +00:00
hbos
06495bcbb7 RTCIceCandidatePairStats.[state/priority] added, ConnectionInfo updated.
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}
2017-01-02 16:08:18 +00:00
pbos
7eb0e23bcf 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}
2017-01-02 15:32:25 +00:00
pbos
7fd1a75300 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}
2017-01-02 14:58:46 +00:00
hbos
23351197fb Improve rtcstats_integrationtest.cc by sanity checking values.
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}
2017-01-02 14:52:19 +00:00
pbos
9baddf25b9 Replace basictypes.h with stddef.h for size_t.
Files only making use of size_t from basictypes.h are replaced with
stddef.h, except in cases where they already for instance use stdio.h or
stdlib.h that already provide size_t.

BUG=webrtc:6853
R=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2605123002
Cr-Commit-Position: refs/heads/master@{#15865}
2017-01-02 14:44:41 +00:00
hbos
c3a2b7f487 RTCIceCandidateStats.isRemote added and collected.
This was added to the spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-isremote

BUG=webrtc:6756, chromium:632723, chromium:627816

Review-Url: https://codereview.webrtc.org/2595003003
Cr-Commit-Position: refs/heads/master@{#15863}
2017-01-02 12:46:15 +00:00
hbos
f415f8ae73 Removed RTCStatsCollector::ProducePartialResultsOnWorkerThread.
No stats are collected by it, remove to reduce unnecessary thread hops.

BUG=webrtc:6875, chromium:627816

Review-Url: https://codereview.webrtc.org/2583193002
Cr-Commit-Position: refs/heads/master@{#15862}
2017-01-02 12:28:51 +00:00
deadbeef
1e23461d5e Revert of Adding error output param to SetConfiguration, using new RTCError type. (patchset #4 id:60001 of https://codereview.webrtc.org/2587133004/ )
Reason for revert:
Broke chromium FYI bot because the chromium mock PC overrides the method whose signature is changing.

Also broke a downstream internal test, which I need to investigate further.

Original issue's description:
> Adding error output param to SetConfiguration, using new RTCError type.
>
> 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-Commit-Position: refs/heads/master@{#15777}
> Committed: 7a5fa6cd61

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

Review-Url: https://codereview.webrtc.org/2600813002
Cr-Commit-Position: refs/heads/master@{#15778}
2016-12-24 09:43:32 +00:00
deadbeef
7a5fa6cd61 Adding error output param to SetConfiguration, using new RTCError type.
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-Commit-Position: refs/heads/master@{#15777}
2016-12-24 08:47:59 +00:00
deadbeef
40610e24ce Hook up new "rtc_enable_sctp" build argument to "HAVE_SCTP" define.
This allows building without SCTP support (and even building/running
tests). The "HAVE_SCTP" define has been functional for a while, but there
wasn't any easy way to turn it on/off.

NOTRY=True
BUG=webrtc:6933

Review-Url: https://codereview.webrtc.org/2593313002
Cr-Commit-Position: refs/heads/master@{#15763}
2016-12-22 18:53:38 +00:00
hbos
23368e1aef RTCStatsCollectorTest: ExpectReportContainsCertificateInfo /w EXPECT_EQ
Modify ExpectReportContainsCertificateInfo to use EXPECT_EQ checks of
RTCCertificateStats objects.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2594553003
Cr-Commit-Position: refs/heads/master@{#15738}
2016-12-21 12:29:17 +00:00
hbos
c42ba32877 RTCStatsCollectorTest: Remove ExpectReportContainsCandidate.
Remove ExpectReportContainsCandidate in favor of EXPECT_EQ checks of
RTC[Local/Remote]IceCandidateStats objects.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2594753002
Cr-Commit-Position: refs/heads/master@{#15737}
2016-12-21 11:31:45 +00:00
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