Commit graph

2423 commits

Author SHA1 Message Date
Jakob Ivarsson
38fcd58429 Change default NetEq sample rate to 48k.
This should avoid some resampling before any packets have been received given that the vast majority of devices use 48k sample rate and the most common codec is Opus (which we always decode in 48k).

Bug: none
Change-Id: Ie7baea57c3eb1b763a6460c3b06b56d67b2b258e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280662
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38536}
2022-11-02 13:47:01 +00:00
Philipp Hancke
0487c5797a stats: implement candidate-pair lastPacket(Sent|Received)Timestamp
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-lastpacketsenttimestamp
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-lastpacketreceivedtimestamp

which are useful together with the ice-restart-necessary logic mentioned
in
  https://w3c.github.io/webrtc-pc/#dictionary-rtcofferoptions-members

BUG=webrtc:14619

Change-Id: I4a8ab00a37fbd4af8b948720c83787cbdfc6b9a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281281
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38534}
2022-11-02 12:16:21 +00:00
Henrik Boström
adbcbf73fa [Stats] Delete 'track' metrics that have previously been moved.
These have all been moved to "inbound-rtp" and now that upstream
projects have migrated we can delete the old location.

Unblocks https://crbug.com/webrtc/14175

Bug: webrtc:14521, webrtc:14524
Change-Id: Ia2bfa399d62304cc0ead0e65c340dfad20acc530
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281183
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38532}
2022-11-02 09:21:04 +00:00
Artem Titov
19813a4222 Remove unused MetricsLoggerAndExporter
Bug: None
Change-Id: I9e05e5c29cd80bf991bd50c3bd4ee4f09ddf8134
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281420
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38531}
2022-11-02 07:35:47 +00:00
Danil Chapovalov
f6e48bf4d1 Add IWYU pragmas for some api headers
Bug: None
Change-Id: I1912e05dbc31d960f36c97151dcb387446535c71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280965
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38510}
2022-10-31 15:43:16 +00:00
Henrik Boström
45b35d442d Unship track.totalFramesDuration/sumSquaredFrameDurations.
These metrics were not only non-standard, but residing in the
non-standard "track" stats object that we want to delete. As per
https://github.com/w3c/webrtc-stats/issues/695#issuecomment-1259611462
these metrics are no longer needed because we already have
inbound-rtp.totalInterFrameDelay/totalSquaredInterFrameDelay which is
basically the same thing.

// mac_rel infra failures are unrelated
NOTRY=True

Bug: webrtc:14522
Change-Id: I565da42514a93f15532ba8357dd006547a5296ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278100
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38509}
2022-10-31 15:09:10 +00:00
Henrik Boström
24e0337846 Make disable_ipv6 ABSL_DEPRECATED.
// All tests pass, infra failure unrelated
NOTRY=True

Bug: webrtc:14608
Change-Id: Ie16dcf9dc66e687f0befef42c7d8e914696af191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38502}
2022-10-30 21:47:27 +00:00
Henrik Boström
f36d607c4a Remove the possibility to disable IPv6 in Java and ObjC.
It's deprecated and has been removed from Chrome. Let's follow suite.

// Passing all but unrelated bots
NOTRY=True

Bug: webrtc:14608
Change-Id: I6f2601af5b1dc08164230ebf15db2d2f1754f9e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280740
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38488}
2022-10-27 19:45:58 +00:00
Henrik Boström
aebba7b468 [Stats] Expose totalPacketSendDelay for audio as well.
This information is now readily available. Let's expose it.

In practise we don't pace audio by default and the delay is ~0, however
we can tell that this metric is working as intended by setting
PacingController's pace_audio_ to true via the "WebRTC-Pacer-BlockAudio"
field trial. In this case chrome://webrtc-internals/ plots neats graphs
for audio send delay.

Bug: webrtc:10635
Change-Id: Iecfd93bb84ec61e5d54232769a9e7a500601b199
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280523
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38483}
2022-10-27 10:33:16 +00:00
Philipp Hancke
d237c2bd2d add RTCRtpSender.generateKeyFrame
defined in
  https://w3c.github.io/webrtc-encoded-transform/#rtcrtpsender-extension

Note: this does not implement the "rid(s)" parameter which will be done in a future CL.

VP8 still synchronizes keyframes on all layers even when asked for ones on individual layers while H264 (when implemented as three different encoders in SimulcastEncoderAdapter) can actually utilize this.

This does not change the behavior when receiving a RTCP PLI for a particular layer.

BUG=chromium:1354101

Change-Id: Ic8b14d155242e32c9aeafa55fe6652f346ac76b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274169
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38472}
2022-10-25 18:37:35 +00:00
Artem Titov
96002fa8da [PCLF] Include video resolution into video dump file name
Bug: b/240540204
Change-Id: Idad6a5c67c2dcedb07cfa915ac986590c1e29275
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280383
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#38470}
2022-10-25 17:21:47 +00:00
Harald Alvestrand
0137e730b7 Fix errors in new SessionDescriptionInterface mock
and really compile it with CompileAllHeaders.

Bug: webrtc:14594
Change-Id: I51b0364cbede0e1d614ee708fbc01580bda68d3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280223
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38465}
2022-10-25 09:27:40 +00:00
philipel
99c4c73dbf Add FuzzyMatchSdpVideoFormat convenience function for VideoEncoderFactoryTemplate.
Bug: webrtc:13573
Change-Id: I6813f2a2524271be7862b700da4831575ec6e206
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279701
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38463}
2022-10-25 08:30:25 +00:00
Harald Alvestrand
98fe985480 Add MockSessionDescriptionInterface
This is needed to get rid of a mock in Chrome.

Bug: webrtc:14594
Change-Id: I27df2a1466e6a2dea87a211f803b3f2c7aa57478
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280041
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38458}
2022-10-24 12:21:31 +00:00
Emil Lundmark
1c8103d4db Add FieldTrialsRegistry that verifies looked up field trials
This new class implements the existing FieldTrialsView interface,
extending it with the verification functionality. For now, the
verification will only be performed if the rtc_strict_field_trials GN
arg is set.

Most classes extending FieldTrialsView today have been converted to
extend from FieldTrialsRegistry instead to automatically perform
verification.

Bug: webrtc:14154
Change-Id: I4819724cd66a04507e62fcc2bb1019187b6ba8c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276270
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38453}
2022-10-24 09:12:30 +00:00
Lionel Koenig
9707f579ae delay estrimator: Enable looking for early reverberation
Enable by default the look for the first echo.

Bug: webrtc:14205
Change-Id: Iae904679c1432f3a0766263907cf376903685b97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278043
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38452}
2022-10-24 08:35:52 +00:00
Emil Lundmark
6bf20cc76a Verify field trials looked up through field_trial::FindFullName
For now, the run-time check will only be enabled if the
rtc_strict_field_trials GN arg is set.

In order to allow testing with imaginary field trial keys, two test
helpers have been added. It's a bit awkward to test these since the
field trial string is already global, hence the helpers are also
modifying global state. Tests must make sure this global state is reset
between runs. Things won't be an issue anymore when [1] has removed the
global string.

[1] https://crbug.com/webrtc/10335

Bug: webrtc:14154
Change-Id: Ida44cc817079d7177325e2228cf1f1d242b799e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276269
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38447}
2022-10-20 10:46:01 +00:00
Henrik Boström
c5f8f800a2 [Stats] Add googTimingFrameInfo to the modern API.
This is exposing something that is already exposed in the legacy
getStats() API and is only available if the "video-timing" header
extension is used. Adding this metric here should unblock legacy
getStats() API deprecation. The follow-up to unship or standardize this
metric is tracked by https://crbug.com/webrtc/14586.

Bug: webrtc:14587
Change-Id: Ic3d45b0558d7caf4be2856a4cd95b88db312f85e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38444}
2022-10-19 17:02:18 +00:00
Philipp Hancke
8e7a105c51 stats: use absl::optional to represent value
which is a more modern way to represent something that either has a value or is not set

BUG=webrtc:14544

Change-Id: I0a06b30b1c7f802247eb1f60e69271594b94a6f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278421
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38443}
2022-10-19 15:57:30 +00:00
Henrik Boström
15166b2fa4 [ModernStats] Mark obsolete stats as [[deprecated]].
This includes the stats dictionaries that have been made obsolete in
the spec and whose IDs are prefixed "DEPRECATED_":
- RTCMediaStreamTrackStats
- RTCMediaStreamStats

There is an ongoing experiment to unship these stats dictionaries in
Chrome (https://crbug.com/1374215). Marking then as [[deprecated]] helps
alert other dependencies that these classes are deprecated.

In the meantime, the "DEPRECATED_RTCMediaStreamTrackStats" prefix makes
it possible to use the deprecated classes.

# Unrelated infra failures
NOTRY=True

Bug: webrtc:14175, webrtc:14419
Change-Id: I498d370294058a628278e1e5b027cd12e24ad31a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279700
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38439}
2022-10-19 09:58:37 +00:00
Jonas Oreland
4b2a106af2 Add optional init_send_encodings to AddTrack
This patch adds variant of PeerConnectionInterface::AddTrack
that takes an initial_send_encodings.

This allows for setting/modifying encoding parameters before sdp
negotiation is performed/complete (e.g requested_resolution).

This is already available if using RtpTransciverInit and AddTransceiver,
but was not added to AddTrack because of concerns that it complicated matching with existing transceivers. This CL sidesteps that by never matching to a preexisting transceiver if initial_send_encodings are specified.

Note:
1) The patch adds a new method rather than an extra (e.g optional)
argument to existing AddTrack. This is to avoid problems with downstream mocks.

2) chromium "problems" was fixed in https://chromium-review.googlesource.com/c/chromium/src/+/3952684 and https://chromium-review.googlesource.com/c/chromium/src/+/3956060

Bug: webrtc:14451
Change-Id: I19b5a03872730280fbf868ca5d3a2f46443359f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278783
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38437}
2022-10-19 09:13:08 +00:00
Byoungchan Lee
5a92577a94 Remove fields from remote candidates that could cause crashes in GetStats
Typically, remote candidates come from signalling and are deserialized
into C++ objects. The network_type field of these candidates is
always ADAPTER_TYPE_UNKNOWN.

However, in tests it is common to pass SDP and remote candidates as C++
objects. In this case, the network_type property of remote candidates
is preserved, so DCHECK might be triggered when GetStats is called.

Clearing fields that are not suitable as remote candidates fixes
this issue.

Bug: None
Change-Id: Ida01b0224bce5cf3e87bcad1ddaca35c9f4fffe7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279680
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38436}
2022-10-19 08:06:23 +00:00
Emil Lundmark
64a33f2453 Add tool for generating field trial registry header
The tool will generate a C++ header with all field trials in
REGISTERED_FIELD_TRIALS. This registry will later be used while looking
up field trials from native code to ensure they have been properly
registered in accordance with the policy.

Bug: webrtc:14154
Change-Id: I29bf880735121034585c541c46ef19f617d0afb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276268
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38426}
2022-10-18 07:25:43 +00:00
Rasmus Brandt
baf5c9fabd Revert "Add documentation, tests and simplify webrtc::SimulatedNetwork."
This reverts commit c1d5fda22c.

Reason for revert: This CL created thousands of metric alerts in the perf tests. It's possible that these are all expected, but since mbonadei@ is OOO right now, I think it's better to revert, and have him re-land when he is back.

Most alerts are here: https://bugs.chromium.org/p/webrtc/issues/detail?id=14549

Original change's description:
> Add documentation, tests and simplify webrtc::SimulatedNetwork.
>
> This CL increases the test coverage for webrtc::SimualtedNetwork, adds
> some more comments to the class and the interface it implements and
> simplify the logic around capacity and delay management in the
> simulated network.
>
> More CLs will follow to continue the refactoring but this is the
> ground work to make this more modular in the future.
>
> Bug: webrtc:14525, b/243202138
> Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38388}

Bug: webrtc:14525, b/243202138
Change-Id: I5bc56c954bb12e7c27cb859e838f0b7a89e006f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279522
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38415}
2022-10-17 13:11:34 +00:00
Philipp Hancke
95d880291f stats: make inbound-rtp frame assembly time standard
standardized in
  https://github.com/w3c/webrtc-stats/pull/694

BUG=webrtc:13986

Change-Id: Ia24e7fa64a48ad6c88882c90fd03bd1d89408ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278789
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38390}
2022-10-13 15:14:38 +00:00
Mirko Bonadei
c1d5fda22c Add documentation, tests and simplify webrtc::SimulatedNetwork.
This CL increases the test coverage for webrtc::SimualtedNetwork, adds
some more comments to the class and the interface it implements and
simplify the logic around capacity and delay management in the
simulated network.

More CLs will follow to continue the refactoring but this is the
ground work to make this more modular in the future.

Bug: webrtc:14525, b/243202138
Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38388}
2022-10-13 14:17:00 +00:00
Harald Alvestrand
47627626dd STUN: Avoid ICE message revalidation wherever possible.
Also call out the places where it happens explicitly - these are places
that need to be redesigned.

Bug: chromium:1177125
Change-Id: I3237d028dbb22380e8fbf7cedb03e965d1fcf2aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279022
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38384}
2022-10-13 10:55:31 +00:00
Evan Shrubsole
6c733eed8e Add exposure criteria to WebRTC stat members.
Recent WebRTC stats spec changes have added restrictions on what stats
are available to JavaScript. This is done to reduce that fingerprinting
surface of WebRTC getStats. For example, stats exposing hardware
capabilities have requirements that must be met by the browser. See [1]
for more details.

This CL adds the types and the enumerations. Stats with these
restrictions should not be added until Chromium has implemented
filtering based on the stat type.

[1] https://w3c.github.io/webrtc-stats/#limiting-exposure-of-hardware-capabilities

Bug: webrtc:14546
Change-Id: I6dae5d4921c7a2bc828a4fc8f7d68e0c59f3be82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279043
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38381}
2022-10-13 09:40:29 +00:00
Philipp Hancke
036b3fdea2 Reland "stats: migrate to Timestamp"
This is a reland of commit 2235776597

Original change's description:
> stats: migrate to Timestamp
>
> BUG=webrtc:13756
>
> Change-Id: I04ba57f9c2ca5a974a406814023911b4eb2d6d38
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273942
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38365}

Bug: webrtc:13756
Change-Id: Ib8dc208197ae5e90f67114e7b043a73ee35421ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279080
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38380}
2022-10-13 09:03:43 +00:00
Mirko Bonadei
c0794c23ff Revert "stats: migrate to Timestamp"
This reverts commit 2235776597.

Reason for revert: Breaks compile.

RTCStatsReport::Create(timestamp) needs default value.

Original change's description:
> stats: migrate to Timestamp
>
> BUG=webrtc:13756
>
> Change-Id: I04ba57f9c2ca5a974a406814023911b4eb2d6d38
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273942
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38365}

Bug: webrtc:13756
Change-Id: I7eba2bb510af73be50397bd92f730bc6de1ce676
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279044
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38369}
2022-10-12 14:23:40 +00:00
Artem Titov
2068d0daa7 [PCLF] Add ability to provide custom VideoFrameWriter
Bug: b/240540204
Change-Id: Ica85954ea61b7caf4e2d726895b6a439b47d7bbb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278800
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38368}
2022-10-12 14:08:00 +00:00
Philipp Hancke
2235776597 stats: migrate to Timestamp
BUG=webrtc:13756

Change-Id: I04ba57f9c2ca5a974a406814023911b4eb2d6d38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273942
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38365}
2022-10-12 11:43:39 +00:00
Per Kjellander
78d80f9be7 Add SmokeSendAndReceivePacketsOnOneThread
Only use the network thread for sending and receiving packets.
The one and only network thread is used as a worker thread in all
PeerConnections. Pacing when sending packets is done on the worker thread.

Bug: webrtc:14502
Change-Id: Ib373315688ae4d810ae1e4421101a859fca93b31
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278621
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38354}
2022-10-11 13:33:52 +00:00
Harald Alvestrand
ac7577854f Reland "Add test for StunMessage::ValidateMessageIntegrity"
This reverts commit 3d992bf47f.

Reason for revert: Added counter reset at the right place.

Original change's description:
> Revert "Add test for StunMessage::ValidateMessageIntegrity"
>
> This reverts commit 1f4f672687.
>
> Reason for revert: Breaks downstream test.
>
> Original change's description:
> > Add test for StunMessage::ValidateMessageIntegrity
> >
> > This also tests the UMA stats newly added to it.
> >
> > Bug: chromium:1177125
> > Change-Id: I89bb17c1897565cd91ea5bbd92062018317738ca
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278600
> > Reviewed-by: Johannes Kron <kron@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#38345}
>
> Bug: chromium:1177125
> Change-Id: I2490f2f740db8282ab293583013a50d03ead9141
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278801
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38349}

Bug: chromium:1177125
Change-Id: I38212aeff3a366d4b8beb9c822f709b9fcbb7146
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278802
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38353}
2022-10-11 13:15:40 +00:00
Sergio Garcia Murillo
15dfc5a567 Add GetContributionSources to TransformableIncomingAudioFrame
RTPHeader is not exported, so the TransformableIncomingAudioFrame can't be mocked in chrome tests, using a getter instead.

Bug: chromium:1247260
Change-Id: I2af4e6a88b3f4772b3bb50ee0ae9d5c80fed3ae4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278785
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38352}
2022-10-11 12:52:21 +00:00
Mirko Bonadei
3d992bf47f Revert "Add test for StunMessage::ValidateMessageIntegrity"
This reverts commit 1f4f672687.

Reason for revert: Breaks downstream test.

Original change's description:
> Add test for StunMessage::ValidateMessageIntegrity
>
> This also tests the UMA stats newly added to it.
>
> Bug: chromium:1177125
> Change-Id: I89bb17c1897565cd91ea5bbd92062018317738ca
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278600
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38345}

Bug: chromium:1177125
Change-Id: I2490f2f740db8282ab293583013a50d03ead9141
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278801
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38349}
2022-10-11 11:49:01 +00:00
Harald Alvestrand
1f4f672687 Add test for StunMessage::ValidateMessageIntegrity
This also tests the UMA stats newly added to it.

Bug: chromium:1177125
Change-Id: I89bb17c1897565cd91ea5bbd92062018317738ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278600
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38345}
2022-10-11 09:27:40 +00:00
Harald Alvestrand
4b255b1756 Deprecate non-message STUN integrity check functions
The one to use is StunMessage::ValidateMessageIntegrity(password).

Bug: chromium:1177125
Change-Id: I345f4d6b60090651bc23c3aa6358d4fb24723f9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278601
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38338}
2022-10-10 14:20:36 +00:00
Mirko Bonadei
5c9b7da038 Add missing dependencies.
Bug: b/251890128
Change-Id: Ia9312797a5552ad1ceb4a80968014b849121a1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278580
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38333}
2022-10-10 10:18:37 +00:00
Harald Alvestrand
38b3b5ef5f Add UMA logging for STUN verification outcomes
This will allow us to see if bad integrity ever occurs, and where integrity
is not applied.

Bug: chromium:1177125
Change-Id: I7abdaba93088e4eef8121205e7dd76b21204cae8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278400
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38330}
2022-10-10 05:49:18 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Jonas Oreland
43f0f29d30 RtpEncodingParameters::request_resolution patch 4
This patch

1) modifies VideoAdapter to use requested_resolution
instead on OnOutputFormatRequest, iff there are no active encoders
that is not using requested_resolution (i.e all "old" encoder(s) are
not active).

2) modifies VideoBroadcaster to not broadcast wants from
encoders that are not active (iff there is an active encoder
using requested_resolution).

3) fixes a bug in encoder_stream_factor in that the
requested_resolution was not propagated to return value
(must have been lost in merge?).

Bug: webrtc:14451
Change-Id: I00e0907f0fe9329141ed169576fa46cdc5384886
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278360
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38323}
2022-10-07 14:57:29 +00:00
Artem Titov
9b73159888 Add support for NV12 frame generator
Bug: b/240540204
Change-Id: Id2205e8bd0dfd59476dcd68c32c4981f98b51422
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278402
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38322}
2022-10-07 14:30:31 +00:00
Björn Terelius
dd4b8d4853 Improve backwards compatibility of metrics exporter
Bug: b/248979985
Change-Id: I7c472bfa9cde2f0dc7fc61599b836dd74cad70d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278240
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38317}
2022-10-07 12:42:20 +00:00
Henrik Boström
2fb83072db Move more non-standard metrics to inbound-rtp.
They may be non-standard, but they shouldn't be on a stats dictionary
that is deprecated (track is going away soon-ish). By moving them to
inbound-rtp they can continue to exist beyond track deprecation and
live in the right place in case we decide to standardize them later.

To help downstream projects transitions, the metrics are temporarily
available in both old and new locations. Delete of old location will
happen in a follow-up CL. TODOs added.

Bug: webrtc:14524
Change-Id: I2008060fa4ba76cde859d9144d2bb9648c7ff9af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38315}
2022-10-07 07:22:04 +00:00
Harald Alvestrand
8ad5e393c4 Rearrange api/OWNERS to show who's backup OWNERS
tkchin and deadbeef are not working on webrtc on a daily basis at the
moment, so non-urgent approvals should not go to them.

Not mentioning this has led to misunderstandings.

Bug: chromium:1371843
Change-Id: I91e99249d32e52d6083de9c2b1bfebfc4693acac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278201
Reviewed-by: Taylor Brandstetter <deadbeef@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38314}
2022-10-07 05:56:08 +00:00
Henrik Boström
c57a28c46b Move pause and freeze metrics to standardized location.
These metrics were recently standardized. Part of the standardization
effort was to move them from obsolete "track" stats (on track for
deprecation and removal: https://crbug.com/webrtc/14175) into the
"inbound-rtp" stats which are not deprecated.

To ease transition for downstream projects, the metrics are temporarily
duplicated in both the old and new locations. In a follow-up CL, they
will be deleted from "track".

Bug: webrtc:14521
Change-Id: I0d9036472607a8c717ec823a458a79a49ddb80c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38308}
2022-10-06 10:52:22 +00:00
Henrik Boström
a494e4b517 Move packetsDiscarded to inbound-rtp.
packetsDiscarded was previously moved to RTCInboundRtpStreamStats:
https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*

Bug: webrtc:14514
Change-Id: I322b64ede4e64cef1c8234e9626121d96d945355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277820
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38297}
2022-10-05 09:00:18 +00:00
Philipp Hancke
0e3cd63062 stats: add missing ice candidate stats
added in https://github.com/w3c/webrtc-stats/pull/611
* foundation
* relatedAddress
* relatedPort
* usernameFragment
* tcpType

BUG=webrtc:14480

Change-Id: I5f43373fbbc7c780b8dafb6e2ace2c27f5e22970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38292}
2022-10-04 18:02:28 +00:00
Harald Alvestrand
22d32f1a6c Remove the KeyProtocol metric
Now that SDES is (largely) removed, this is no longer useful.

Bug: chromium:1365484
Change-Id: I3e626a7d5d83130a70958851de3df0aa27616bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277781
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38278}
2022-10-03 14:20:17 +00:00