26 Commits

Author SHA1 Message Date
ehmaldonado
80c829f253 Enable tracing on rtcstats_integrationtest.cc
BUG=chromium:653087

Review-Url: https://codereview.webrtc.org/2979203002
Cr-Commit-Position: refs/heads/master@{#19076}
2017-07-18 14:35:19 +00:00
tommi
e7251599a3 Reland of Make the default ctor of rtc::Thread, protected
This is a partial re-land. The change doesn't make the default Thread ctor protected anymore but it does mark it as deprecated and updates all use of it in WebRTC.

Original issue's description:

Make the default ctor of rtc::Thread, protected.
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.

The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.

BUG=none

Review-Url: https://codereview.webrtc.org/2977953002
Cr-Commit-Position: refs/heads/master@{#19031}
2017-07-14 21:44:46 +00:00
zstein
e76bd3aa43 Adding stats that can be used to compute output audio levels as described here https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalaudioenergy.
BUG=webrtc:7982

Review-Url: https://codereview.webrtc.org/2964593002
Cr-Commit-Position: refs/heads/master@{#19027}
2017-07-14 19:17:49 +00:00
charujain
a117b04113 Revert of Make the default ctor of rtc::Thread, protected (patchset #3 id:40001 of https://codereview.webrtc.org/2981623002/ )
Reason for revert:
Break projects.

Original issue's description:
> Make the default ctor of rtc::Thread, protected.
> The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.
>
> The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2981623002
> Cr-Commit-Position: refs/heads/master@{#19001}
> Committed: a8a3515997

TBR=kthelgason@webrtc.org,tommi@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/2979963002
Cr-Commit-Position: refs/heads/master@{#19003}
2017-07-13 14:06:39 +00:00
tommi
a8a3515997 Make the default ctor of rtc::Thread, protected.
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.

The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.

BUG=none

Review-Url: https://codereview.webrtc.org/2981623002
Cr-Commit-Position: refs/heads/master@{#19001}
2017-07-13 12:47:25 +00:00
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
Henrik Kjellander
a80c16a67c Revert "Update includes for webrtc/{base => rtc_base} rename (2/3)"
This reverts commit c3771cc4d37f5573fe53b7c7cff295a4f0f9560f.
(breaks downstream internal project)

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2972463002 .
Cr-Commit-Position: refs/heads/master@{#18873}
2017-07-01 14:48:18 +00:00
kjellander
c3771cc4d3 Update includes for webrtc/{base => rtc_base} rename (2/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

BUG=webrtc:7634
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.

Review-Url: https://codereview.webrtc.org/2969623003
Cr-Commit-Position: refs/heads/master@{#18870}
2017-06-30 20:42:44 +00:00
deadbeef
86c40a14b4 Fixing RTCIceCandidatePairStats.nominated for ICE controlling agent.
Was only working when the nonstandard "renomination" extension to ICE
is enabled, which chromium doesn't use.

BUG=chromium:734094

Review-Url: https://codereview.webrtc.org/2957303002
Cr-Commit-Position: refs/heads/master@{#18814}
2017-06-28 16:37:23 +00:00
ossu
6488ea424a Remove temporary include of builtin_audio_encoder_factory.h.
Add the include to the files where it is actually used instead.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2869863003
Cr-Commit-Position: refs/heads/master@{#18176}
2017-05-17 11:39:36 +00:00
deadbeef
98e186c71c Remove VirtualSocketServer's dependency on PhysicalSocketServer.
The only thing the physical socket server was used for was
"Wait"/"WakeUp", but it could be replaced by a simple rtc::Event.

So, removing this dependency makes things less confusing; the fact that
VirtualSocketServer takes a PhysicalSocketServer may lead someone to
think it uses real sockets internally, when it doesn't.

BUG=None

Review-Url: https://codereview.webrtc.org/2883313003
Cr-Commit-Position: refs/heads/master@{#18172}
2017-05-17 01:00:06 +00:00
kwiberg
9e5b11ea75 Test CreatePeerConnectionFactory() with a forwarding mock AudioDecoderFactory
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2810703002
Cr-Commit-Position: refs/heads/master@{#17761}
2017-04-19 10:47:57 +00:00
hbos
a7a9be159d Move RTCOutboundRTPStreamStats.roundTripTime to inbound, don't collect.
The value is being moved:
https://github.com/w3c/webrtc-stats/pull/167

Stop collecting this value. Our previous value was incorrect, our RTT
value was a smoothed value based on STUN pings but the spec says it
should be based on RTCP timestamps in RTCP Receiver Report (RR) on
inbound streams with isRemote=true (not supported).

Updated some bug references.

BUG=webrtc:7065, webrtc:7066

Review-Url: https://codereview.webrtc.org/2722633005
Cr-Commit-Position: refs/heads/master@{#16931}
2017-03-01 09:02:45 +00:00
hbos
13f54b2c56 Rename RTCCodecStats.codec -> mimeType, parameters -> sdpFmtpLine.
As per https://github.com/w3c/webrtc-stats/pull/168.

NOTRY due to broken linux_ubsan_vptr, all other tests passed.

BUG=webrtc:7061
NOTRY=True

Review-Url: https://codereview.webrtc.org/2718383002
Cr-Commit-Position: refs/heads/master@{#16907}
2017-02-28 14:56:04 +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
hbos
3fd31fe502 Fix TSAN race in webrtc::voe::Channel.
|transport_overhead_per_packet_| and |rtp_overhead_per_packet_| could
be read from and written to on different threads concurrently. This CL
introduces a lock to GUARD these variables.

NOTRY because master.tryserver.webrtc.linux_ubsan_vptr is broken, all
other tests pass.

BUG=webrtc:7231
NOTRY=True

Review-Url: https://codereview.webrtc.org/2710363003
Cr-Commit-Position: refs/heads/master@{#16900}
2017-02-28 13:43:16 +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
philipel
1498defa78 Disable RTCStatsIntegrationTest on TSAN bots.
BUG=webrtc:7231
TBR=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2707263010
Cr-Commit-Position: refs/heads/master@{#16828}
2017-02-24 15:41:04 +00:00
sakal
5fec128de9 Add QP for libvpx VP8 decoder.
BUG=webrtc:6541, webrtc:7065
TBR=hta@webrtc.org

Review-Url: https://codereview.webrtc.org/2656603002
Cr-Commit-Position: refs/heads/master@{#16722}
2017-02-20 14:43:58 +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
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
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
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
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