31 Commits

Author SHA1 Message Date
Henrik Boström
ed1d084d0a [Stats] Replace all uses of is_defined() with has_value().
Same method, different name. Unblocks replacing RTCStatsMember<T> with
absl::optional<T>.

Bug: webrtc:15164
Change-Id: I251dd44d3b0f9576b3b68915fe0406d1b3381e5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41573}
2024-01-19 12:26:56 +00:00
Tal Benesh
e126e45403 Fixing unspecified evaluation order of std:move(), to avoid future issues.
This will be done by splitting the use of variables values prior to performing std:move

Bug: webrtc:15771
Change-Id: Ia88e733c3a4edf729e440295ae271d3cd9926ec5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334461
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41532}
2024-01-16 08:53:28 +00:00
Marco Paniconi
52da14c44f Re-enable SvcTestAV1/SvcTest.ScalabilityModeSupported/L2T2_DD
Issue has been fixed in latest libaom code rolled into webrtc.

Bug: webrtc:15722
Change-Id: I5e00e202e929703a9af05422884cfb5d0829964b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331862
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41407}
2023-12-18 20:13:15 +00:00
Mirko Bonadei
ae86daf830 Skip SvcTestAV1/SvcTest.ScalabilityModeSupported/L2T2_DD.
This is temporary and should be re-enabled as soon as the test is
fixed.

Bug: webrtc:15722
Change-Id: I9d262c9931a19bc9c33f7f93e9e275d39fab403c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330561
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41348}
2023-12-11 07:56:25 +00:00
Per K
7dd6ea234d Disable AV1 L3 and S3 tests
Bug: webrtc:15666
Change-Id: I56d6f28b3e71dc6564cc35265ce2b0ca7e13c40d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328320
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41214}
2023-11-22 15:38:36 +00:00
Harald Alvestrand
a6544377bc Remove not-needed webrtc:: prefixes in pc/
This test drives the new tools_webrtc/remove_extra_namespace.py tool.

Bug: None
Change-Id: I9b590aa1213e4cace2d64d555f4dafd893f03606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327021
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41141}
2023-11-13 13:23:04 +00:00
Sergey Silkin
c252a40b47 Use layer/encode target resolution in DropDueToSize
It used input frame resolution before this change which caused unnecessary resolution adaptations when resolution scaling is used.

Found that initial frame dropping was always enabled for AV1 SVC. After fixing DropDueToSize the AV1 SVC tests [1] started to fail ("number of encoded temporal layers is less than expected") on bots. The tests encode 1850x1110 in L3T3 for 5s using the default 300kbps start bitrate. Before the fix the initial frame dropping kicked in and reduced the resolution to a level that let encoder to generate all temporal layers. After the fix the resolution stayed at 1850x1110 and encoder dropped all T1 and T2 layer frames. Mitigated this by increasing test duration from 5 to 10s. This gives enough time for BWE to ramp up and for encoder to generate (stop dropping) all temporal layers.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/pc/test/svc_e2e_tests.cc;l=460;bpv=1

Bug: chromium:1466809
Change-Id: I16802689e234f8fc16f891f024d5f644985de01c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315142
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40536}
2023-08-10 15:11:08 +00:00
Marco Paniconi
a6c76d0c29 svc-av1: Fix to svc_e2e_tests
Re-enable svc disabled test.
Passes with the latest code.

Bug: b/288825767
Change-Id: Ie022442ddbd95c8c8b56feecde873208ddec77b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310449
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/main@{#40487}
2023-07-28 14:10:19 +00:00
Mirko Bonadei
cde980fa46 Skip SvcTestAV1/SvcTest.ScalabilityModeSupported/L2T3_DD
The test fails with the new AV1 roll and it looks like it is a test
issue. Skipping the test to allow the roll to flow, the test will be
re-enabled later.

Bug: b/288825767
Change-Id: I1ae5aab6860b6b4ac82a3e1b37619551aa2fba53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310421
Reviewed-by: Jerome Jiang <jianj@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40348}
2023-06-26 17:42:43 +00:00
Philipp Hancke
1f98b466b8 stats: rename RTCInboundRTPStreamStats and RTCOutboundRTPStreamStats
to RTCInboundRtpStreamStats and RTCOutboundRtpStreamStats respectively
which follows the camel-casing convention used elsewhere.

The old name is kept around as an alias for a limited amount of time
to allow upgrading dependencies.

BUG=webrtc:14973

Change-Id: Ibf4e65933fd6cc2e7e89955042f6f8fb0f6c7853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296261
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@{#39497}
2023-03-07 14:27:47 +00:00
Danil Chapovalov
a76487ffd2 Relax string parameters in pclf api to absl::string_view
Bug: webrtc:13579
Change-Id: I53c133bcbba6a074f3be6b996a3991a71190b1fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295865
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39459}
2023-03-02 16:17:41 +00:00
Ilya Nikolaevskiy
68a7c415c5 Revert "Enforce stream id uniqueness in RtpSender::set_stream_ids"
This reverts commit 315b95ca11161bdea715d5316f92828edd41f0d5.

Reason for revert: Breaks internal bots.

Original change's description:
> Enforce stream id uniqueness in RtpSender::set_stream_ids
>
> https://w3c.github.io/webrtc-pc/#dfn-create-an-rtcrtpsender
> has a step saying
>   For each stream in streams, add stream.id to
>   [[AssociatedMediaStreamIds]] if it's not already there
>
> This applies to addTrack and setStreams and the set of streams in
> addTransceiver.
>
> BUG=webrtc:14769
>
> Change-Id: If6be813396a1987dfe49fd73f976f96c71459eaf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287864
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38937}

Bug: webrtc:14769
Change-Id: I6fd22ff0550c0894057fb1dc15f1b95819fa6df2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288744
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38940}
2022-12-21 13:56:05 +00:00
Philipp Hancke
315b95ca11 Enforce stream id uniqueness in RtpSender::set_stream_ids
https://w3c.github.io/webrtc-pc/#dfn-create-an-rtcrtpsender
has a step saying
  For each stream in streams, add stream.id to
  [[AssociatedMediaStreamIds]] if it's not already there

This applies to addTrack and setStreams and the set of streams in
addTransceiver.

BUG=webrtc:14769

Change-Id: If6be813396a1987dfe49fd73f976f96c71459eaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287864
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38937}
2022-12-21 11:28:49 +00:00
Evan Shrubsole
9b235cd93b Add scalability mode to RTCOutboundRtpStreamStats stats
This is in the webrtc-stats spec at
https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-scalabilitymode.

This adds the scalability mode to CodecSpecificInfo which is used to
plumb the modes for each simulcast layer.

TBR=orphis@webrtc.org

Tested: Compiled into Chrome and confirmed the scalability mode set for AV1, VP9, VP8 and H264 software encoders in chrome://webrtc-internals.
Bug: webrtc:14730
Change-Id: I71ceba8f6485a4f4a73e0856031b8d5f16f913f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285085
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38847}
2022-12-08 11:46:06 +00:00
Jeremy Leconte
a3e51df5f3 Add a new PeerConnectionE2EQualityTestFixture::AddPeer method.
Change-Id: Ic5879613db51a00e3e958931f5eda19fda1ae94a
Bug: webrtc:14627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282640
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38608}
2022-11-10 16:54:19 +00:00
Byoungchan Lee
e2f2cae3fb Cleanup: Deduplicate static functions that create network links
Bug: None
Change-Id: I8ac401ed594bf2af724f1478c9a86f8f41d632f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275900
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38212}
2022-09-26 16:45:30 +00:00
Florent Castelli
4c7d3f82f9 PCLF: Ignore discarded frames in the DefaultVideoQualityAnalyzer
Bug: webrtc:14453, webrtc:11607
Change-Id: Iad0da2d85d9db74026205591e8b2ced399988998
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276420
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38204}
2022-09-26 13:42:01 +00:00
Artem Titov
c45f4e4a3d [PCLF] Fully switch to new metrics export API
Bug: b/246095034
Change-Id: I9d588d53320e4eb19cb569db2b97dddc013c22bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38188}
2022-09-24 18:49:29 +00:00
Florent Castelli
bfdb9577ff PCLF: Separate SFU functionality configuration into a new struct
Creates the EmulatedSFUConfig that will receive the parameters for
controlling the virtual SFU used in the call.
Its current only field is the previous target_spatial_index from
VideoSimulcastConfig.
This allow to filter out the bottom layers for SVC S mode tests
and enable them.

Bug: webrtc:11607
Change-Id: Id4f3a96b3a03b9be7155796c3bafefce01f32b7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274162
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38182}
2022-09-23 15:08:37 +00:00
Byoungchan Lee
bc4796af94 Add the dependency descriptor for H.264 temporal scalability
And validate it using svc_e2e_tests.

Bug: webrtc:13961
Change-Id: Ie7edcf5a0684f46e4d26155b77cebbebbd46d21f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269541
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38153}
2022-09-21 12:18:23 +00:00
Byoungchan Lee
f22c6b4a07 Simplify creation of SvcTestParameters in pc/test/svc_e2e_tests.cc
No functional changes are intended.

Bug: None
Change-Id: I361b04da5ed22e12951d8bcc1d16e4e4d00985d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275901
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38139}
2022-09-21 01:13:10 +00:00
Florent Castelli
a163ea4515 Add tests for H264 SVC support
The tests require H264 to be enabled using the proprietary_codecs
GN args.gn option.

Bug: webrtc:11607, webrtc:13961
Change-Id: I22dc3d94c844873ac12b9dce8e88a97f4fcf7657
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276046
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38133}
2022-09-20 17:27:12 +00:00
Florent Castelli
33155d763c svc: Remove references to bogus modes
Those never existed, were likely a copy-paste error in the spec
that we somehow inherited.

Bug: webrtc:11607
Change-Id: Ib4a038f061123e879f1099656273f6392f092213
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273485
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37953}
2022-08-30 14:03:21 +00:00
Florent Castelli
38de6bc0b8 svc: Remove use of the VideoFrameTrackingIdAdvertised trial
AV1 tests seem to be running fine now that we have the dependency
descriptor enabled, so remove the need for the RTP header extension
as it doesn't allow discarding frames.

Bug: webrtc:11607
Change-Id: Ifd0670ab61a5b69d0570f65ba30c352a31376992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273488
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37952}
2022-08-30 14:00:11 +00:00
Åsa Persson
319531efa6 Add support for more scalability modes (1.5:1 resolution ratio).
Added modes:
- L2T2h
- L2T3h
- L3T1h
- L3T2h
- L3T3h

Bug: webrtc:13960
Change-Id: I046a9a1f90629f6d4a5a82d4434e7cc0fa983263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273345
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37951}
2022-08-30 12:33:41 +00:00
Åsa Persson
46f4de5722 Add support for scalability modes L3T1_KEY, L3T2, L3T2_KEY.
Bug: webrtc:13960
Change-Id: Ib5c8309271d83a0fcfdecf7a93fdd61483c7d3e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273105
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37927}
2022-08-29 11:55:52 +00:00
Florent Castelli
f992510ce9 svc: Add E2E tests for all codecs with the dependency descriptor
This tests all existing codecs (VP8, VP9) with the depdendency
descriptor and adds the AV1 tests that requires it as well.

Placeholders for missing modes have been added for both VP9 and AV1.

Bug: webrtc:11607
Change-Id: Ie900bddc54ccbf4dcc466f3a7a6c8241906a243a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272807
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37906}
2022-08-25 15:54:09 +00:00
Artem Titov
92159dc3ad [PCLF] Remove references to the old location of VideoQualityAnalyzerInterface
Bug: None
Change-Id: Ie14e6c279f268f76061fbc3ead1ae7b5febd3b9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267824
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37463}
2022-07-06 12:41:15 +00:00
Niels Möller
3c24c096ef Add support for scalability modes L2T3 and S2T3
Bug: webrtc:11607
Change-Id: I1d0bd171564d2852f2f6ee2bbee26c7a1c0e1c3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267103
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37389}
2022-07-01 08:17:04 +00:00
Florent Castelli
c61d53584b Add a descriptive name to parametrized E2E tests
This changes names from "SvcTestVP9/SvcTest.ScalabilityModeSupported/11"
to "SvcTestVP9/SvcTest.ScalabilityModeSupported/L3T3"

Bug: webrtc:11607
Change-Id: I1425f7541e1ea7533dff06be9ef9926e5ace3f70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267005
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37343}
2022-06-27 20:06:02 +00:00
Florent Castelli
90b74389a2 SVC: Add end to end tests for VP8 and VP9
The tests check that the various scalability mode are supported
and the frames are marked properly by the encoder with their
spatial and temporal index.
The same information is then checked on the receiving side.

A new member is added on EncodedImage to store the temporal index,
and is filled by the encoders and retreived by the ref finder
objects on the decoding side.

Bug: webrtc:11607
Change-Id: I7522f6a6fc5402244cab0c4c64b544ce09bc5204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260189
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37303}
2022-06-22 11:07:01 +00:00