966 Commits

Author SHA1 Message Date
hbos
7562fc8adb Make hbos and hta rtcstats* OWNERS of webrtc/pc, not webrtc/api.
We were already OWNERS of these files, but when these files were moved
from webrtc/api/ to webrtc/pc/ and a new OWNERS file created our
ownership was accidentally not moved.

Becoming per-file=rtcstats* OWNER of webrtc/pc/ which includes:
 rtcstats_integrationtest.cc
 rtcstatscollector.cc
 rtcstatscollector.h
 rtcstatscollector_unittest.cc

Dropping ownership of webrtc/api/ which no longer includes any
rtcstats* files.

Already OWNER of all of webrtc/api/stats/ which includes:
 rtcstats.h
 rtcstats_objects.h
 rtcstatscollectorcallback.h
 rtcstatsreport.h

Already OWNER of all of webrtc/stats/ which includes:
 rtcstats.cc
 rtcstats_objects.cc
 rtcstats_unittest.cc
 rtcstatsreport.cc
 rtcstatsreport_unittest.cc

BUG=webrtc:7060
TBR=hta@webrtc.org, deadbeef@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2726563002
Cr-Commit-Position: refs/heads/master@{#16906}
2017-02-28 14:46:44 +00:00
hbos
bf8d3e572c RTCIceCandidatePairStats.[total/current]RoundTripTime collected.
Collected in accordance with the spec:
https://w3c.github.io/webrtc-stats/#candidatepair-dict*

totalRoundTripTime is collected as the sum of rtt measurements, it was
previously not collected.
currentRoundTripTime is collected as the latest rtt measurement, it
was previously collected as a smoothed value, which was incorrect.

Connection is updated to collect these values which are surfaced
through ConnectionInfo.

BUG=webrtc:7062, webrtc:7204

Review-Url: https://codereview.webrtc.org/2719523002
Cr-Commit-Position: refs/heads/master@{#16905}
2017-02-28 14:34:47 +00:00
deadbeef
8d60a946ae Replace NULL with nullptr or null in webrtc/api/.
BUG=webrtc:7147

Review-Url: https://codereview.webrtc.org/2715103002
Cr-Commit-Position: refs/heads/master@{#16880}
2017-02-27 22:47:33 +00:00
hbos
92eaec6104 RTCIceCandidatePairStats.nominated collected.
Connection::nominated() is updated to mean
(remote_nomination_ || acked_nomination_), which means both a
controlling and controlled agent can be said to be "nominated".
Previously this was (remote_nomination_ > 0) which only applies to the
controlling agent.

PortTest.TestNomination added to test nomination values and nomination
stat.

This value is surfaced through cricket::ConnectionInfo::nominated.
RTCStatsCollector uses this value in its collection of
RTCIceCandidatePairStats.

RTCStatsCollectorTest.CollectRTCIceCandidatePairStats updated to test
that ConnectionInfo::nominated is surfaced using mocks.
rtcstats_integrationtest.cc updated to expect nomination set without
using mocks.

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

BUG=webrtc:7062, webrtc:7204

Review-Url: https://codereview.webrtc.org/2709293004
Cr-Commit-Position: refs/heads/master@{#16855}
2017-02-27 09:38:08 +00:00
deadbeef
e814a0dee0 Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc.
This CL adds the following interfaces:
* RtpTransportController
* RtpTransport
* RtpSender
* RtpReceiver

They're implemented on top of the "BaseChannel" object, which is normally used
in a PeerConnection, and roughly corresponds to an SDP "m=" section. As a result
of this, there are several limitations:

* You can only have one of each type of sender and receiver (audio/video) on top
  of the same transport controller.
* The sender/receiver with the same media type must use the same RTP transport.
* You can't change the transport after creating the sender or receiver.
* Some of the parameters aren't supported.

Later, these "adapter" objects will be gradually replaced by real objects that don't
have these limitations, as "BaseChannel", "MediaChannel" and related code is
restructured. In this CL, we essentially have:

ORTC adapter objects -> BaseChannel -> Media engine
PeerConnection -> BaseChannel -> Media engine

And later we hope to have simply:

PeerConnection -> "Real" ORTC objects -> Media engine

See the linked bug for more context.

BUG=webrtc:7013
TBR=stefan@webrtc.org

Review-Url: https://codereview.webrtc.org/2675173003
Cr-Commit-Position: refs/heads/master@{#16842}
2017-02-26 02:15:09 +00:00
deadbeef
b5388d7748 Move rtc_api_unittests into rtc_unittests.
This avoids adding an additional test target. Plus, everything in
rtc_api_unittests is (and likely will be) simple utility classes akin to
what's already being tested in rtc_unittests.

BUG=None
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2709573003
Cr-Commit-Position: refs/heads/master@{#16819}
2017-02-24 09:17:43 +00:00
deadbeef
6038e97e04 Adding RTCErrorOr class to be used by ORTC APIs.
This utility class can be used to represent either an error or a
successful return value. Follows the pattern of StatusOr in the protobuf
library.

This will be used by ORTC factory methods; for instance, CreateRtpSender
will either return an RtpSender or an error if the parameters are
invalid or some other failure occurs.

This CL also moves RTCError classes to a separate file, and adds tests
that were missing before.

BUG=webrtc:7013

Review-Url: https://codereview.webrtc.org/2692723002
Cr-Commit-Position: refs/heads/master@{#16659}
2017-02-17 07:31:33 +00:00
zhihuang
d7e771da7b Add the URL attribute to cricket::Candiate. (Objc wrapper)
The url of the ICE server is added to the IceCandiate class.
This can be used to tell which server this candidate was gathered from.

BUG=webrtc:7128

Review-Url: https://codereview.webrtc.org/2688943003
Cr-Commit-Position: refs/heads/master@{#16652}
2017-02-16 19:29:39 +00:00
hbos
a51d4f34d9 Re-land of RTCInboundRTPStreamStats.qpSum collected.
This was previously only collected for local tracks
(RTCOutboundRTPStreamStats.qpSum).

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcrtpstreamstats-qpsum

This CL also improves some testing in rtcstatscollector_unittest.cc.
Default and non-default values are tested in the same unittests,
removing the test that was specific to default-values, which was
otherwise code duplication.

This is a re-land of https://codereview.webrtc.org/2675943002 after
dependent CL that was re-landed.

BUG=webrtc:7065
TBR=hta@webrtc.org, sakal@webrtc.org

Review-Url: https://codereview.webrtc.org/2703503003
Cr-Commit-Position: refs/heads/master@{#16642}
2017-02-16 13:34:48 +00:00
deadbeef
39e14da919 Changing some PeerConnection-related comments.
As recommended by nisse@ in comments on this CL:
https://codereview.webrtc.org/2685093002/

BUG=None
NOTRY=True
TBR=nisse@webrtc.org

Review-Url: https://codereview.webrtc.org/2692923002
Cr-Commit-Position: refs/heads/master@{#16589}
2017-02-13 17:49:58 +00:00
deadbeef
804c1af48b Move trackmediainfomap files from api/ to pc/.
It looks like this was left out of the original api/pc move CL since it
had been added recently.

BUG=webrtc:5883
TBR=ossu@webrtc.org

Review-Url: https://codereview.webrtc.org/2690793003
Cr-Commit-Position: refs/heads/master@{#16560}
2017-02-12 03:07:31 +00:00
deadbeef
112b2e99d8 Switching some interfaces to use std::unique_ptr<>.
This helps show where ownership is transfered between objects.

Specifically, this CL wraps cricket::VideoCapturer, MediaEngineInterface
and DataEngineInterface in unique_ptr.

BUG=None
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2685093002
Cr-Commit-Position: refs/heads/master@{#16548}
2017-02-11 04:13:37 +00:00
kwiberg
087bd34d23 Move AudioDecoder and related stuff to the api/ directory
BUG=webrtc:5805, webrtc:6725

Review-Url: https://codereview.webrtc.org/2668523004
Cr-Commit-Position: refs/heads/master@{#16534}
2017-02-10 16:15:44 +00:00
deadbeef
b10f32f9b2 Adding more comments to every header file in api/ subdirectory.
Many of these interfaces are not intuitive, or are the way they are for
complex historical reasons, so it would be nice to document these things
for future developers.

Also, many nonstandard things (such as RTCConfiguration options) were
not documented at all before this CL.

BUG=webrtc:7131
TBR=pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2680273002
Cr-Commit-Position: refs/heads/master@{#16485}
2017-02-08 09:38:21 +00:00
skvlad
ed02c6d68f Revert of RTCInboundRTPStreamStats.qpSum collected. (patchset #4 id:80001 of https://codereview.webrtc.org/2675943002/ )
Reason for revert:
Breaks downstream build.

Original issue's description:
> RTCInboundRTPStreamStats.qpSum collected.
>
> This was previously only collected for local tracks
> (RTCOutboundRTPStreamStats.qpSum).
>
> Spec: https://w3c.github.io/webrtc-stats/#dom-rtcrtpstreamstats-qpsum
>
> This CL also improves some testing in rtcstatscollector_unittest.cc.
> Default and non-default values are tested in the same unittests,
> removing the test that was specific to default-values, which was
> otherwise code duplication.
>
> BUG=webrtc:7065
>
> Review-Url: https://codereview.webrtc.org/2675943002
> Cr-Commit-Position: refs/heads/master@{#16477}
> Committed: cd195bea5e

TBR=sakal@webrtc.org,hta@webrtc.org,hbos@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7065

Review-Url: https://codereview.webrtc.org/2687483002 .
Cr-Commit-Position: refs/heads/master@{#16479}
2017-02-07 18:45:31 +00:00
hbos
cd195bea5e RTCInboundRTPStreamStats.qpSum collected.
This was previously only collected for local tracks
(RTCOutboundRTPStreamStats.qpSum).

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcrtpstreamstats-qpsum

This CL also improves some testing in rtcstatscollector_unittest.cc.
Default and non-default values are tested in the same unittests,
removing the test that was specific to default-values, which was
otherwise code duplication.

BUG=webrtc:7065

Review-Url: https://codereview.webrtc.org/2675943002
Cr-Commit-Position: refs/heads/master@{#16477}
2017-02-07 16:31:27 +00:00
kthelgason
2bc6864278 Reland of Drop frames until specified bitrate is achieved. (patchset #1 id:1 of https://codereview.webrtc.org/2666303002/ )
Reason for revert:
Perf test broke as it made assumptions that quality scaling was turned off. This turns out not to be the case. Fixed by turning quality scaling off for the tests.

Original issue's description:
> Revert of Drop frames until specified bitrate is achieved. (patchset #12 id:240001 of https://codereview.webrtc.org/2630333002/ )
>
> Reason for revert:
> due to failures on perf tests (not on perf stats, but fails running due to dcheck failures), see e.g., https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20(K%20Nexus5)
>
> Original issue's description:
> > Drop frames until specified bitrate is achieved.
> >
> > This CL fixes a regression introduced with the new quality scaler
> > where the video would no longer start in a scaled mode. This CL adds
> > code that compares incoming captured frames to the target bitrate,
> > and if they are found to be too large, they are dropped and sinkWants
> > set to a lower resolution. The number of dropped frames should be low
> > (0-4 in most cases) and should not introduce a noticeable delay, or
> > at least should be preferrable to having the first 2-4 seconds of video
> > have very low quality.
> >
> > BUG=webrtc:6953
> >
> > Review-Url: https://codereview.webrtc.org/2630333002
> > Cr-Commit-Position: refs/heads/master@{#16391}
> > Committed: 83399caec5
>
> TBR=perkj@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6953
>
> Review-Url: https://codereview.webrtc.org/2666303002
> Cr-Commit-Position: refs/heads/master@{#16395}
> Committed: 35fc2aa82f

TBR=perkj@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,minyue@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6953

Review-Url: https://codereview.webrtc.org/2675223002
Cr-Commit-Position: refs/heads/master@{#16473}
2017-02-07 15:02:22 +00:00
hbos
338f78ac95 RTCIceCandidatePairStats.available[Outgoing/Incoming]Bitrate collected.
Collected for current pairs, undefined for other pairs. This is the
same as the old stats' VideoBwe.googAvailable[Send/Receive]Bandwidth.

NOTE: The value this is based on for incoming bitrate is not set. This
CL wires it up but has a TODO that the incoming bitrate needs to be
collected properly. (Same problem for both old and new stats.)

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-availableoutgoingbitrate
Discussion: https://github.com/w3c/webrtc-stats/issues/112#issuecomment-277167781

BUG=webrtc:7062

Review-Url: https://codereview.webrtc.org/2675923002
Cr-Commit-Position: refs/heads/master@{#16472}
2017-02-07 14:41:21 +00:00
hbos
3443bb75a0 RTCRTPStreamStats.ssrc changed type to uint32_t.
As per PR: https://github.com/w3c/webrtc-stats/pull/157

BUG=webrtc:7065, webrtc:7066

Review-Url: https://codereview.webrtc.org/2675583003
Cr-Commit-Position: refs/heads/master@{#16471}
2017-02-07 14:28:11 +00:00
hbos
585a9b191c Refactor and clean-up relating to RTCCodecStats.
Refactor how |codec_id| is set, remove outdated TODO, update comments
with new bugs IDs.

BUG=webrtc:7061

Review-Url: https://codereview.webrtc.org/2670343002
Cr-Commit-Position: refs/heads/master@{#16467}
2017-02-07 12:59:16 +00:00
deadbeef
e702b30fec Adding C++ versions of currently spec'd "RtpParameters" structs.
These structs will be used for ORTC objects (and their WebRTC
equivalents).

This CL also introduces some minor changes to the existing implemented
structs:

- max_bitrate_bps uses rtc::Optional instead of "-1 means unset"
- "mime_type" turned into "name"/"kind" (which can be used to form the
  MIME type string, if needed).
- clock_rate and channels changed to rtc::Optional, since they will
  need to be for RtpSender.send().
- Renamed "channels" to "num_channels" (the ORTC name, which I prefer).

BUG=webrtc:7013, webrtc:7112

Review-Url: https://codereview.webrtc.org/2651883010
Cr-Commit-Position: refs/heads/master@{#16437}
2017-02-04 20:09:01 +00:00
skvlad
5107246d4b Allow applications to limit the ICE check rate through RTCConfiguration
If an application sets a non-null value in RTCConfiguration.iceCheckMinInterval, we do not sent STUN pings more often than that. This is useful for bandwidth constrained scenarios.

This CL also increases the maximum STUN ping timeout to 60 seconds up from its previous value of 5 (which meant that a ping response received 5 seconds later would not be counted), and allows the RTT estimate to go up to 60 seconds from its previous limit of 3. RTTs above 3 seconds are possible on mobile links. (webrtc:7109)

This CL was originally written by pthatcher@, I am just submitting it after a minor cleanup.

BUG=webrtc:7082, webrtc:7109

Review-Url: https://codereview.webrtc.org/2670053002
Cr-Commit-Position: refs/heads/master@{#16421}
2017-02-02 19:50:14 +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
minyue
35fc2aa82f Revert of Drop frames until specified bitrate is achieved. (patchset #12 id:240001 of https://codereview.webrtc.org/2630333002/ )
Reason for revert:
due to failures on perf tests (not on perf stats, but fails running due to dcheck failures), see e.g., https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20(K%20Nexus5)

Original issue's description:
> Drop frames until specified bitrate is achieved.
>
> This CL fixes a regression introduced with the new quality scaler
> where the video would no longer start in a scaled mode. This CL adds
> code that compares incoming captured frames to the target bitrate,
> and if they are found to be too large, they are dropped and sinkWants
> set to a lower resolution. The number of dropped frames should be low
> (0-4 in most cases) and should not introduce a noticeable delay, or
> at least should be preferrable to having the first 2-4 seconds of video
> have very low quality.
>
> BUG=webrtc:6953
>
> Review-Url: https://codereview.webrtc.org/2630333002
> Cr-Commit-Position: refs/heads/master@{#16391}
> Committed: 83399caec5

TBR=perkj@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6953

Review-Url: https://codereview.webrtc.org/2666303002
Cr-Commit-Position: refs/heads/master@{#16395}
2017-02-01 11:14:00 +00:00
oprypin
803dc29bb6 Enable cpplint and fix cpplint errors in webrtc/api
Adding 'explicit' to these constructors has a low risk of causing
compatibility problems:
explicit RTCConfiguration(RTCConfigurationType type)
explicit IdBase(StatsType type)

BUG=webrtc:5267
TESTED=Fixed issues reported by:
find webrtc/api -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.

Review-Url: https://codereview.webrtc.org/2663063003
Cr-Commit-Position: refs/heads/master@{#16392}
2017-02-01 09:55:59 +00:00
kthelgason
83399caec5 Drop frames until specified bitrate is achieved.
This CL fixes a regression introduced with the new quality scaler
where the video would no longer start in a scaled mode. This CL adds
code that compares incoming captured frames to the target bitrate,
and if they are found to be too large, they are dropped and sinkWants
set to a lower resolution. The number of dropped frames should be low
(0-4 in most cases) and should not introduce a noticeable delay, or
at least should be preferrable to having the first 2-4 seconds of video
have very low quality.

BUG=webrtc:6953

Review-Url: https://codereview.webrtc.org/2630333002
Cr-Commit-Position: refs/heads/master@{#16391}
2017-02-01 09:31:52 +00:00
kwiberg
1e4e8cb43d Add CreatePeerConnectionFactory overloads that take audio codec factory args
BUG=5805

Review-Url: https://codereview.webrtc.org/2653343003
Cr-Commit-Position: refs/heads/master@{#16371}
2017-01-31 09:48:08 +00:00
nisse
1c0dea8675 Delete VideoFrame::set_render_time_ms.
Also mark the render_time_ms getter function and the ntp timestamp
as deprecated.

BUG=webrtc:6977

Review-Url: https://codereview.webrtc.org/2633493002
Cr-Commit-Position: refs/heads/master@{#16354}
2017-01-30 10:43:18 +00:00
hbos
b0ae920fad RTCRTPStreamStats.mediaTrackId renamed to trackId.
According to spec change:
https://github.com/w3c/webrtc-stats/pull/142

BUG=webrtc:7064, chromium:685655

Review-Url: https://codereview.webrtc.org/2619353007
Cr-Commit-Position: refs/heads/master@{#16326}
2017-01-27 14:35:16 +00:00
nisse
7d2542623a Delete unneeded includes of base/common.h.
Bulk of the changes were done using

   git grep -l '#include "webrtc/base/common.h"' | \
     xargs sed -i '\,^#include.*webrtc/base/common\.h,d'

followed by adding back the include in the few places where it is
still needed, and in one case (pseudotcp.cc) instead deleting its use
of RTC_UNUSED.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2644103002
Cr-Commit-Position: refs/heads/master@{#16263}
2017-01-25 09:47:24 +00:00
ossu
a388310af2 Added api/webrtcsdp.h forwarding header to work around upstream projects.
NOTRY=true  # Small change, in a hurry and msan is being slow
TBR=tommi@webrtc.org
BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2653703004
Cr-Commit-Position: refs/heads/master@{#16248}
2017-01-24 15:13:59 +00:00
mbonadei
9aa3f0a200 Reland of Moving webrtc.gni up one level from build/ (patchset #1 id:1 of https://codereview.webrtc.org/2657563002/ )
Reason for revert:
Starting to work on a fix (it seems that there are third_party dependencies that depends on the path to the webrtc.gni file)

Original issue's description:
> Revert of Moving webrtc.gni up one level from build/ (patchset #1 id:1 of https://codereview.webrtc.org/2651543003/ )
>
> Reason for revert:
> This was causing the following failure: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder/builds/838/steps/generate_build_files/logs/stdio
>
> Original issue's description:
> > Moving webrtc.gni up one level from build/
> >
> > BUG=webrtc:7030
> >
> > Review-Url: https://codereview.webrtc.org/2651543003
> > Cr-Commit-Position: refs/heads/master@{#16241}
> > Committed: 35a32700fc
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7030
>
> Review-Url: https://codereview.webrtc.org/2657563002
> Cr-Commit-Position: refs/heads/master@{#16244}
> Committed: 69dc7dbe24

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

Review-Url: https://codereview.webrtc.org/2654773002
Cr-Commit-Position: refs/heads/master@{#16247}
2017-01-24 14:58:22 +00:00
mbonadei
69dc7dbe24 Revert of Moving webrtc.gni up one level from build/ (patchset #1 id:1 of https://codereview.webrtc.org/2651543003/ )
Reason for revert:
This was causing the following failure: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder/builds/838/steps/generate_build_files/logs/stdio

Original issue's description:
> Moving webrtc.gni up one level from build/
>
> BUG=webrtc:7030
>
> Review-Url: https://codereview.webrtc.org/2651543003
> Cr-Commit-Position: refs/heads/master@{#16241}
> Committed: 35a32700fc

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

Review-Url: https://codereview.webrtc.org/2657563002
Cr-Commit-Position: refs/heads/master@{#16244}
2017-01-24 13:14:35 +00:00
mbonadei
35a32700fc Moving webrtc.gni up one level from build/
BUG=webrtc:7030

Review-Url: https://codereview.webrtc.org/2651543003
Cr-Commit-Position: refs/heads/master@{#16241}
2017-01-24 12:49:35 +00:00
ossu
da25006431 Fixed public_deps for libjingle_peerconnection{,_api}
https://codereview.webrtc.org/2514883002/ changed and moved these targets around but did not add public dependencies for the fallbacks, which causes gn gen --check a lot of anger.

NOTRY=true # Only build changes and windows bots are cranky atm.
BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2651663002
Cr-Commit-Position: refs/heads/master@{#16214}
2017-01-23 15:37:43 +00:00
hbos
50cfe1fda7 RTCMediaStreamTrackStats.framesDropped collected by RTCStatsCollector.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-framesdropped
Implemented as frames_received - frames_rendered.

Part of this CL is adding frames_rendered to VideoReceiveStream::Stats
and updating it at ReceiveStatisticsProxy::OnRenderedFrame.

BUG=webrtc:6757, chromium:659137, chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2607933002
Cr-Commit-Position: refs/heads/master@{#16213}
2017-01-23 15:21:55 +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
deadbeef
7bcdb69957 Ignore ufrag/password in "a=candidate" lines in SDP.
These attributes should be parsed in candidate trickling, but when
parsing a full session description, only "a=ice-ufrag"/"a=ice-pwd"
should be used to communicate the ufrag/password.

BUG=chromium:681286

Review-Url: https://codereview.webrtc.org/2639183002
Cr-Commit-Position: refs/heads/master@{#16194}
2017-01-20 20:43:58 +00:00
hbos
f64941f1a5 RTCMediaStreamTrackStats.framesDecoded collected.
According to spec:
https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-framesdecoded

BUG=webrtc:6757, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2642713004
Cr-Commit-Position: refs/heads/master@{#16192}
2017-01-20 15:39:09 +00:00
hbos
fefe076789 RTCMediaStreamTrackStats.framesSent collected by RTCStatsCollector.
BUG=webrtc:6757, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2606033002
Cr-Commit-Position: refs/heads/master@{#16188}
2017-01-20 14:14:25 +00:00
hbos
2d4d653e1f Fix msan flake in rtcstats_integrationtest.cc.
This CL https://codereview.webrtc.org/2641763003 changed echo return
loss /...enhancement stats from being optional to being undefined
because that was the observed behavior (and a TODO was added to
investigate why).

It turns out that these stats are sometimes available, e.g. if the test
runs for a while like MSAN bot does, so this turned the test flaky.
Example failure:
https://build.chromium.org/p/client.webrtc/builders/Linux%20MSan/builds/8242

This CL reverts that change without reverting the rest of the CL which
other CLs depend on, and updates the TODO.

BUG=chromium:627816
TBR=hta@webrtc.org
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2640743007
Cr-Commit-Position: refs/heads/master@{#16187}
2017-01-20 12:16:41 +00:00
hbos
42f6d2fb6c RTCMediaStreamTrackStats.framesReceived collected by RTCStatsCollector.
VideoReceiverInfo::frames_received added based on
VideoReceiveStream::Stats::frame_counts (.key_frames + .delta_frames).

BUG=webrtc:6757, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2607913002
Cr-Commit-Position: refs/heads/master@{#16185}
2017-01-20 11:56:50 +00:00
hbos
9e30274c03 RTCMediaStreamTrackStats collected on a per-attachment basis.
According to recent spec change:
https://github.com/w3c/webrtc-stats/pull/138/files

This establishes the relationship between tracks and
[Voice/Video][Sender/Receiver]Info(s). Follow-up CLs will easily be able
to collect more stats from them.

BUG=webrtc:6757, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2641763003
Cr-Commit-Position: refs/heads/master@{#16181}
2017-01-20 10:47:10 +00:00
zhihuang
b2cdd93fd6 Remove the dependency of TransportChannel and TransportChannelImpl.
DtlsTransportChannelWrapper is renamed to be DtlsTransport which inherits from
DtlsTransportInternal. There will be no concept of "channel" in p2p level.
Both P2PTransportChannel and DtlsTransport don't depend on TransportChannel
and TransportChannelImpl any more and they are removed in this CL.

BUG=none

Review-Url: https://codereview.webrtc.org/2606123002
Cr-Commit-Position: refs/heads/master@{#16173}
2017-01-20 00:54:25 +00:00
zhihuang
6ce9259cb0 Revert of make the DtlsTransportWrapper inherit form DtlsTransportInternal (patchset #11 id:320001 of https://codereview.webrtc.org/2606123002/ )
Reason for revert:
Failed the memory check.
May need to fix the memory leak.

Original issue's description:
> make the DtlsTransportWrapper inherit form DtlsTransportInternal
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2606123002
> Cr-Commit-Position: refs/heads/master@{#16160}
> Committed: 5aed06c8d3

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

Review-Url: https://codereview.webrtc.org/2639203004
Cr-Commit-Position: refs/heads/master@{#16162}
2017-01-19 12:49:47 +00:00
zhihuang
5aed06c8d3 make the DtlsTransportWrapper inherit form DtlsTransportInternal
BUG=none

Review-Url: https://codereview.webrtc.org/2606123002
Cr-Commit-Position: refs/heads/master@{#16160}
2017-01-19 09:48:02 +00:00
deadbeef
d1c0998730 Adding OrtcFactory, and changing UdpTransport to match current plan.
The factory follows the same principles as PeerConnectionFactory;
various modules can be passed into its constructor but default
implementations are provided. Currently the only object the factory can
create is a UdpTransport (need to start somewhere).

UdpTransportChannel (renamed to UdpTransport)
will now accept a socket passed into its constructor,
relying on the factory to create the socket. This allows some
simplifications to be made, such as getting rid of "State" since the
only states are now "has destination set or doesn't".

BUG=webrtc:7013

Review-Url: https://codereview.webrtc.org/2632613002
Cr-Commit-Position: refs/heads/master@{#16154}
2017-01-18 23:16:37 +00:00