85 Commits

Author SHA1 Message Date
Edward Lemur
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
hbos
8d609f6b6d Reland of Implemented the GetSources() in native code. (patchset #1 id:1 of https://codereview.webrtc.org/2809613002/ )
Reason for revert:
Re-land, reverting did not fix bug.

https://bugs.chromium.org/p/webrtc/issues/detail?id=7465

Original issue's description:
> Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
>
> Reason for revert:
> Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see
>
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
>
> Original issue's description:
> > Added the GetSources() to the RtpReceiverInterface and implemented
> > it for the AudioRtpReceiver.
> >
> > This method returns a vector of RtpSource(both CSRC source and SSRC
> > source) which contains the ID of a source, the timestamp, the source
> > type (SSRC or CSRC) and the audio level.
> >
> > The RtpSource objects are buffered and maintained by the
> > RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> > the info of the contributing source will be pulled along the object
> > chain:
> > AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> > AudioReceiveStream -> voe::Channel -> RtpRtcp module
> >
> > Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
> >
> > BUG=chromium:703122
> > TBR=stefan@webrtc.org, danilchap@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2770233003
> > Cr-Commit-Position: refs/heads/master@{#17591}
> > Committed: 292084c376
>
> TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:703122
>
> Review-Url: https://codereview.webrtc.org/2809613002
> Cr-Commit-Position: refs/heads/master@{#17616}
> Committed: fbcc5cb386

TBR=deadbeef@webrtc.org,solenberg@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org,olka@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:703122

Review-Url: https://codereview.webrtc.org/2810623003
Cr-Commit-Position: refs/heads/master@{#17621}
2017-04-10 14:39:05 +00:00
olka
fbcc5cb386 Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
Reason for revert:
Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see

https://bugs.chromium.org/p/webrtc/issues/detail?id=7465

Original issue's description:
> Added the GetSources() to the RtpReceiverInterface and implemented
> it for the AudioRtpReceiver.
>
> This method returns a vector of RtpSource(both CSRC source and SSRC
> source) which contains the ID of a source, the timestamp, the source
> type (SSRC or CSRC) and the audio level.
>
> The RtpSource objects are buffered and maintained by the
> RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> the info of the contributing source will be pulled along the object
> chain:
> AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> AudioReceiveStream -> voe::Channel -> RtpRtcp module
>
> Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
>
> BUG=chromium:703122
> TBR=stefan@webrtc.org, danilchap@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2770233003
> Cr-Commit-Position: refs/heads/master@{#17591}
> Committed: 292084c376

TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:703122

Review-Url: https://codereview.webrtc.org/2809613002
Cr-Commit-Position: refs/heads/master@{#17616}
2017-04-10 11:38:13 +00:00
zhihuang
292084c376 Added the GetSources() to the RtpReceiverInterface and implemented
it for the AudioRtpReceiver.

This method returns a vector of RtpSource(both CSRC source and SSRC
source) which contains the ID of a source, the timestamp, the source
type (SSRC or CSRC) and the audio level.

The RtpSource objects are buffered and maintained by the
RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
the info of the contributing source will be pulled along the object
chain:
AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
AudioReceiveStream -> voe::Channel -> RtpRtcp module

Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource

BUG=chromium:703122
TBR=stefan@webrtc.org, danilchap@webrtc.org

Review-Url: https://codereview.webrtc.org/2770233003
Cr-Commit-Position: refs/heads/master@{#17591}
2017-04-07 17:57:22 +00:00
deadbeef
20cb0c1c85 Move DTMF sender to RtpSender (as opposed to WebRtcSession).
Previously in the spec, there was a createDtmfSender method on
PeerConnection, but that's been replaced by a "dtmf" attribute
on RtpSender, which allows getting a DTMF sender without having
an audio track.

This also simplifies the code slightly, since tracks are now not
necessary for identification.

BUG=webrtc:4180

Review-Url: https://codereview.webrtc.org/2666853002
Cr-Commit-Position: refs/heads/master@{#16409}
2017-02-02 04:27:00 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00
deadbeef
8662f94023 Only set certificate on DTLS transport if fingerprint is found in SDP.
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}
2017-01-21 05:20:51 +00:00
deadbeef
f33491ebaf Revert of Removing #defines previously used for building without BoringSSL/OpenSSL. (patchset #2 id:20001 of https://codereview.webrtc.org/2640513002/ )
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: eaa826c2ee

TBR=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}
2017-01-21 01:01:45 +00:00
deadbeef
eaa826c2ee 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}
2017-01-20 23:15:58 +00:00
nisse
c8ee882753 Replace use of ASSERT in test code.
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}
2017-01-18 15:20:55 +00:00
nisse
e8abe3ef1b Revert of New method StatsObserver::OnCompleteReports, passing ownership. (patchset #2 id:20001 of https://codereview.webrtc.org/2584553002/ )
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: b36ee8d498

TBR=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}
2017-01-18 13:00:34 +00:00
hbos
84abeb1d37 RTC[In/Out]boundRTPStreamStats.mediaTrackId collected.
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}
2017-01-16 14:16:44 +00:00
hbos
1f8239ca6f TrackMediaInfoMap added.
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}
2017-01-16 12:24:10 +00:00
nisse
c80e741ad0 Replace ASSERT(false) by RTC_NOTREACHED().
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}
2017-01-11 13:56:46 +00:00
deadbeef
953c2cea5e Reland of: 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-Original-Commit-Position: refs/heads/master@{#15906}
Committed: 67b3bbe639
Review-Url: https://codereview.webrtc.org/2564333002
Cr-Commit-Position: refs/heads/master@{#15973}
2017-01-09 22:53:41 +00:00
deadbeef
c0dad89bed Revert of Separating SCTP code from BaseChannel/MediaChannel. (patchset #14 id:240001 of https://codereview.webrtc.org/2564333002/ )
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: 67b3bbe639

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/2614813003
Cr-Commit-Position: refs/heads/master@{#15908}
2017-01-05 04:28:21 +00:00
deadbeef
67b3bbe639 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}
2017-01-05 02:38:02 +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
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
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
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
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
hbos
db346a7cbe RTCStatsIntegrationTest added.
This is an integration test using peerconnectiontestwrapper.h to set up
and end to end test using a real PeerConnection implementation. These
tests will complement rtcstatscollector_unittest.cc which collects all
stats using mocks.

The integration test is set up so that all stats types are returned by
GetStats and verifies that expected dictionary members are defined. The
test could in the future be updated to include sanity checks for the
values of members. There is a sanity check that references to other
stats dictionaries yield existing stats of the appropriate type, but
other than that members are only tested for if they are defined not.

StatsCallback of rtcstatscollector_unittest.cc is moved so that it can
be reused and renamed to RTCStatsObtainer.

TODO: Audio stream track stats members are missing in the test. Find out
if this is because of a real problem or because of testing without real
devices. Do this before closing crbug.com/627816.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2521663002
Cr-Commit-Position: refs/heads/master@{#15287}
2016-11-29 09:57:08 +00:00
zhihuang
4dfb8cef51 Make the default value of rtcp-mux policy to required.
Change the default value of rtcp-mux policy in RTCConfiguration.
Refactor the peerconnectioninterface and webrtcsession unit tests.

BUG=webrtc:6030

Review-Url: https://codereview.webrtc.org/2043193003
Cr-Commit-Position: refs/heads/master@{#15217}
2016-11-23 18:30:21 +00:00
aleloi
17338d41ac Created an AudioMixer mock in webrtc/api/test.
The mock is used in a dependent CL https://codereview.webrtc.org/2436033002.

There is also a goal to allow external mixing implementations
(subclasses of webrtc::AudioMixer) and inject them to
PeerConnectionFactory. We think that part of that is an official and
maintained mock.

Summary of changes:
    * Created a mixer mock/stub in webrtc/api/test
    * Made a target webrtc/api:mock_audio_mixer for it.

NOTRY=True
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2520323002
Cr-Commit-Position: refs/heads/master@{#15190}
2016-11-22 14:02:12 +00:00
hbos
09bc128603 RTCMediaStream[Track]Stats added.
Not all members are collected by RTCStatsCollector and detached tracks
are not visible in the returned stats. This needs to be addressed before
closing crbug.com/660827 and crbug.com/659137

BUG=chromium:660827, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2467873005
Cr-Commit-Position: refs/heads/master@{#14978}
2016-11-08 14:29:26 +00:00
kjellander
71a1b61c4f WebRTC: Fix and enable -Woverloaded-virtual warnings.
Essentially applying the same change as in
https://codereview.webrtc.org/2023413002 in more locations.

There's only one change affecting production code: enabling the warning
for webrtc/media:rtc_media. The rest are test changes.

With these changes, the only place the warning is disabled is in the Windows
implementation of webrtc/modules/video_capture:video_capture_internal_impl,
which is harder to fix, since it relies on sample code from the Windows SDK.

BUG=webrtc:6653
NOTRY=True

Review-Url: https://codereview.webrtc.org/2468093004
Cr-Commit-Position: refs/heads/master@{#14938}
2016-11-07 09:18:14 +00:00
hbos
cc555c5019 RTCDataChannelStats[1] added, supporting all stats members.
Also updates MockDataChannel to also mock id, messages_sent, bytes_sent,
messages_received and bytes_received.

[1] https://w3c.github.io/webrtc-stats/#dcstats-dict*

BUG=chromium:654927, chromium:627816

Review-Url: https://codereview.webrtc.org/2420473002
Cr-Commit-Position: refs/heads/master@{#14670}
2016-10-18 19:48:37 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
hbos
d565b73121 RTCStatsCollector and RTCPeerConnectionStats added.
This is the stats collector for the new stats types, RTCStats[1] and
RTCStatsReport[2]. It so far only produces RTCPeerConnectionStats[3] as
an example of how it would collect stats. Each RTCStats subclass will
get a corresponding RTCStatsCollector::ProduceFooStats().

Stats reports are cached and returned as const references (ref
counting). This allows stats to be inspected by multiple observers and
across multiple threads. No copies will have to be made when surfacing
this to Blink or other places.

The current implementation of ProducePeerConnectionStats() only look at
existing DataChannels. This might be incorret if data channels can be
removed? Will investigate in a follow-up, crbug.com/636818.

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#idl-def-rtcstats
[2] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstatsreport-object
[3] https://w3c.github.io/webrtc-stats/archives/20160526/webrtc-stats.html#pcstats-dict*

BUG=chromium:627816, chromium:636818

Review-Url: https://codereview.webrtc.org/2242043002
Cr-Commit-Position: refs/heads/master@{#13979}
2016-08-30 21:04:40 +00:00
Taylor Brandstetter
9b5306c4ef Adding test for unordered, fragmented SCTP message delivery.
This functionality broke after a recent usrsctp roll. This test would be
useful in catching issues that arise in the future.

BUG=633959
R=honghaiz@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2233033002 .

Cr-Commit-Position: refs/heads/master@{#13823}
2016-08-18 18:40:45 +00:00
magjed
235020dba6 Roll chromium_revision 915e47250f..e3860bd297 (412201:412289)
Change log: 915e47250f..e3860bd297
Full diff: 915e47250f..e3860bd297

No dependencies changed.
No update to Clang.

NOTRY=TRUE
TBR=
BUG=webrtc:6219

Review-Url: https://codereview.webrtc.org/2253973002
Cr-Commit-Position: refs/heads/master@{#13809}
2016-08-18 08:45:53 +00:00
hbos
b24b1ceb48 Moving mock classes around so that they may be reused in other unittests
New files, classes moved from statscollector_unittest.cc:
+webrtc/api/test/mock_peerconnection.h
 for MockPeerConnectionFactory and MockPeerConnection
+webrtc/api/test/mock_webrtcsession.h
 for MockWebRtcSession
+webrtc/media/base/test/mock_mediachannel.h
 for MockVideoMediaChannel and MockVoiceMediaChannel

The webrtc/media/base/test folder is new.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2238933002
Cr-Commit-Position: refs/heads/master@{#13769}
2016-08-16 08:19:48 +00:00
maxmorin
88e31a3fd8 Fix warnings, simplify ADM.
This is in preparation for adding a gn target for audio_device_tests.

BUG=webrtc:6170,webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2222563002
Cr-Commit-Position: refs/heads/master@{#13768}
2016-08-16 07:56:14 +00:00
maxmorin
1aee0b5bd9 Remove old methods in AudioTransport, make it pass a gn build
when building with default warnings.

This is in preparation for making a gn target for audio_device_tests.

BUG=webrtc:6170, webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2219653004
Cr-Commit-Position: refs/heads/master@{#13759}
2016-08-15 18:46:28 +00:00
zhihuang
9763d56464 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
Review-Url: https://codereview.webrtc.org/2166873002
Cr-Original-Commit-Position: refs/heads/master@{#13645}
Cr-Commit-Position: refs/heads/master@{#13657}
2016-08-05 18:14:54 +00:00
deadbeef
907abe4411 Revert of Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (patchset #8 id:280001 of https://codereview.webrtc.org/2166873002/ )
Reason for revert:
Reverting because it broke an RTP data channel test on the FYI bots.

Original issue's description:
> Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
>
> To allow end-to-end QuicDataChannel usage with a
> PeerConnection, RTCConfiguration has been modified to
> include a boolean for whether to do QUIC, since negotiation of
> QUIC is not implemented. If one peer does QUIC, then it will be
> assumed that the other peer must do QUIC or the connection
> will fail.
>
> PeerConnection has been modified to create data channels of type
> QuicDataChannel when the peer wants to do QUIC.
>
> WebRtcSession has ben modified to use a QuicDataTransport
> instead of a DtlsTransportChannelWrapper/DataChannel
> when QUIC should be used
>
> QuicDataTransport implements the generic functions of
> BaseChannel to manage the QuicTransportChannel.
>
> Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
> Cr-Commit-Position: refs/heads/master@{#13645}

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

Review-Url: https://codereview.webrtc.org/2206793007
Cr-Commit-Position: refs/heads/master@{#13647}
2016-08-04 19:22:22 +00:00
zhihuang
34b54c36a5 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Review-Url: https://codereview.webrtc.org/2166873002
Cr-Commit-Position: refs/heads/master@{#13645}
2016-08-04 18:06:58 +00:00
hbos
3d70fef3f3 Remove DtlsIdentityStoreInterface, it is no longer used.
This interface and its implementations have been replaced by
rtc::RTCCertificateGeneratorInterface.

Removes dtlsidentitystore.h, updates .gyp/gn and removes old #includes.

BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2034013003
Cr-Commit-Position: refs/heads/master@{#13432}
2016-07-11 11:10:14 +00:00
sakal
d34a711f22 Reland of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2106333005/ )
Reason for revert:
Issues fixed

Original issue's description:
> Revert of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2111823002/ )
>
> Reason for revert:
> Breaks downstream dependencies
>
> Original issue's description:
> > Combine webrtc/api/java/android and webrtc/api/java/src.
> >
> > It used to be that there was a Java api for devices not running Android
> > but that is no longer the case. I combined the directories and made
> > the folder structure chromium style.
> >
> > BUG=webrtc:6067
> > R=magjed@webrtc.org, tommi@webrtc.org
> >
> > Committed: ceefe20dd6
>
> TBR=magjed@webrtc.org,tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6067
>
> Committed: 9b0dc622d4

TBR=magjed@webrtc.org,tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6067

Review-Url: https://codereview.webrtc.org/2111923003
Cr-Commit-Position: refs/heads/master@{#13363}
2016-07-01 12:10:59 +00:00
Sami Kalliomaki
9b0dc622d4 Revert of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2111823002/ )
Reason for revert:
Breaks downstream dependencies

Original issue's description:
> Combine webrtc/api/java/android and webrtc/api/java/src.
>
> It used to be that there was a Java api for devices not running Android
> but that is no longer the case. I combined the directories and made
> the folder structure chromium style.
>
> BUG=webrtc:6067
> R=magjed@webrtc.org, tommi@webrtc.org
>
> Committed: ceefe20dd6

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

Review URL: https://codereview.webrtc.org/2106333005 .

Cr-Commit-Position: refs/heads/master@{#13357}
2016-07-01 07:37:49 +00:00
Sami Kalliomaki
ceefe20dd6 Combine webrtc/api/java/android and webrtc/api/java/src.
It used to be that there was a Java api for devices not running Android
but that is no longer the case. I combined the directories and made
the folder structure chromium style.

BUG=webrtc:6067
R=magjed@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2111823002 .

Cr-Commit-Position: refs/heads/master@{#13356}
2016-07-01 07:09:09 +00:00
Taylor Brandstetter
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

R=pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2019423006 .

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
Henrik Boström
d79599d74a Turning FakeDtlsIdentityStore into FakeRTCCertificateGenerator.
This is one less DtlsIdentityStoreInterface implementation, and one step closer
to removing this interface in favor of RTCCertificateGeneratorInterface.

This also removes PeerConnectionInterface::CreatePeerConnectionWithStore which
is no longer needed.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2020623002 .

Cr-Commit-Position: refs/heads/master@{#12990}
2016-06-01 11:59:01 +00:00
Henrik Boström
d03c23b216 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConneciton, is
updated to take a generator instead of a store.
  Many unittests still use a store, to allow them to continue to do so the
factory gets CreatePeerConnectionWithStore which uses the old function
signature (and invokes the new signature by wrapping the store in an
RTCCertificateGeneratorStoreWrapper). As soon as the FakeDtlsIdentityStore is
turned into a certificate generator instead of a store, the unittests will be
updated and we can remove CreatePeerConnectionWithStore.

This is a reupload of https://codereview.webrtc.org/2013523002/ with minor
changes.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2017943002 .

Cr-Commit-Position: refs/heads/master@{#12984}
2016-06-01 09:44:29 +00:00
Taylor Brandstetter
98cde26c78 Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel.
This will make it much less likely for application developers to not
realize the object is reference counted.

It also fixes a bug in the Java PeerConnection binding, by allowing a
reference to be transferred in the OnRemoveStream call via std::move.

BUG=webrtc:5128
R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1972793003 .

Cr-Commit-Position: refs/heads/master@{#12976}
2016-05-31 20:02:30 +00:00
danilchap
e9021a3601 Propogate network-worker thread split to api
BUG=webrtc:5645

Review-Url: https://codereview.webrtc.org/1968393002
Cr-Commit-Position: refs/heads/master@{#12767}
2016-05-17 08:52:06 +00:00
kwiberg
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00
Taylor Brandstetter
a1c303535f Relanding: Implement RTCConfiguration.iceCandidatePoolSize.
Depends on this CL in order to work in Chromium:
https://codereview.chromium.org/1976673002/

It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).

This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.

R=pthatcher@webrtc.org

Committed: 48e9d05f51

Review URL: https://codereview.webrtc.org/1956453003 .

Cr-Commit-Position: refs/heads/master@{#12729}
2016-05-13 15:15:20 +00:00
deadbeef
c55fb30649 Revert of Implement RTCConfiguration.iceCandidatePoolSize. (patchset #7 id:120001 of https://codereview.webrtc.org/1956453003/ )
Reason for revert:
Breaks remoting_unittests. They defined their own operator== which conflicts with this one.

I'll remove the operator== in a roll CL. But until it's approved, I'm reverting this so the FYI bots will pass.

Original issue's description:
> Implement RTCConfiguration.iceCandidatePoolSize.
>
> It works by creating pooled PortAllocatorSessions which can be picked up
> by a P2PTransportChannel when needed (after a local description is set).
>
> This can optimize candidate gathering time when there is some time between
> creating a PeerConnection and setting a local description.
>
> R=pthatcher@webrtc.org
>
> Committed: 48e9d05f51

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

Review-Url: https://codereview.webrtc.org/1972043004
Cr-Commit-Position: refs/heads/master@{#12709}
2016-05-12 19:51:45 +00:00