This CL also removes the existing non-standard implementation of the metric.
Bug: webrtc:14147, webrtc:11789
Change-Id: I70fd1c451dfd59380fe5ce959086f37b31697c16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265360
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37441}
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}
This CL removes the last "nogncheck" comment that was related to a
known build cycle. The remaining ones are because of conditional
dependencies.
Bug: webrtc:8733
Change-Id: Ie6862ae1cc613b9c2740a34c3167e1741ed31ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265981
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37302}
Extract NamesCollection into separate file and add ability to
remove peer after it was added. In such case we need to preserve
old indexes, because DVQA still may request removed name from
collection due to async processing.
Bug: b/231397778
Change-Id: I87bdfb4653e7eca50d311482553d2353b1d9974e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265394
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37181}
Removes all remaining usage of SetType and marks the method as
deprecated.
Bug: none
Change-Id: I98dc613978ffe7ad8a4ffd951dd974d56ed92983
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265100
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37137}
APM has historically allowed sample rates not divisible by 100, but there is also code that explicitly states that such rates are not supported.
It is unclear how well rates like 22050 are handled in practice.
This CL adds support for fuzzing more sample rates, to help find issues.
We usually preserve fuzzer data reads to avoid invalidating unresolved fuzzer-found issues, but to make the code a little more readable this CL removes the discarded reads. This renders the only currently open bug non-reproducible, crbug.com/1299393.
Bug: webrtc:9413, chromium:1299393
Change-Id: I98ac1c653627c20adc73b8edede02f1526d80d9d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264504
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37114}
This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.
Bug: webrtc:13145
Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37048}
Step one in making it a separate type, that will be done as a
followup, after downstream code is updated to use the new name.
Bug: webrtc:11607
Change-Id: I6fa664a0729b1cfd71b7f02b6441880beee0e741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262806
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36946}
To make it usable in tests without depending on all of CallTest.
Bug: None
Change-Id: Ie3102ab71bcfe3862dd6c35d3285098e961e54df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262807
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36932}
This reverts commit 181ea6e414.
Reason for revert: Breaks downstream project. Kári will help to land it next week.
Original change's description:
> Add a prefix for objc category.
>
> According to the Google Objective-C style [1], category names should
> start with an appropriate prefix. WebRTC has some category definitions
> for system interfaces, but it doesn't use prefixes.
>
> $ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
> 0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
> 0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
> 0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
> 0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
>
> To avoid conflicts, prefix the names and methods of those categories.
> Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
> it is not used by any other files.
>
> [1] https://google.github.io/styleguide/objcguide.html#category-naming
>
> Bug: webrtc:13884
> Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36880}
Bug: webrtc:13884
Change-Id: I85257088e4a3a62e01ff925ab5e77af83b078ef3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262420
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36885}
According to the Google Objective-C style [1], category names should
start with an appropriate prefix. WebRTC has some category definitions
for system interfaces, but it doesn't use prefixes.
$ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
To avoid conflicts, prefix the names and methods of those categories.
Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
it is not used by any other files.
[1] https://google.github.io/styleguide/objcguide.html#category-naming
Bug: webrtc:13884
Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36880}
When Apple introduced Swift, they renamed all the AppKit Objective-C
constants to have a shared prefix for ease of bridging, and deprecated
all the old names. These new names were introduced in the macOS 10.12
and 10.14 SDKs, but compile down to the same constant values so they
can be deployed all the way back to 10.0.
Bug: chromium:1322548
Change-Id: Ib3cacbe493e97ca43dd180047eacbd2866d70016
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262180
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36874}
VideoSimulcastConfig::encoding_params and VideoConfig::min/max_encode_bitrate_bps
were replaced by VideoConfig::encoding_params.
All usage of the previous options has been updated to the new option.
Bug: webrtc:11607
Change-Id: I52cd9efa6e640929485da7aa1e61d15a1a693b1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261949
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36865}
By calling release() the ref counter is not decremented and when the
observer is later wrapped in a scoped_refprt its counter will be 2
instead of 1, leading to a memory leak.
Bug: b/231912631
Change-Id: I466e5c29ba4f4aee43e8cf23f2e04fa4b6351b4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261954
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36862}
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.
Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36814}
* Paramaterize VideoReceiveStream2Test to have variations that run with
and without a metronome.
* Migrate over tests to ensure frame timing is used.
Bug: webrtc:14003
Change-Id: Icccc2f0d548aaa64c50e010056e1e651174e02fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260942
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36812}
* Structs with user-declared constructors are no longer considered
aggregates, so remove the declarations when possible
* Types of both arguments to "==" must match to avoid "ambiguous
function call" warning
* Various types of math involving enums are deprecated, so replace with
constexprs where necessary
* ABSL_CONST_INIT must be used on definition as well as declaration
* volatile memory may no longer be read from and written to by the same
operator, so replace e.g. "n++" with "n = n + 1"
* Replace an outdated check for no_unique_address support with
__has_cpp_attribute
* std::result_of(f(x)) has been removed, replace with
std::invoke_result(f, x)
Bug: chromium:1284275
Change-Id: I77b366ab1da7eb2c1e4c825b2714417c31ee5903
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261221
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36786}
The webrtc::VideoStreamDecoderInterface was basically created as a public version of FrameBuffer2, but to hide the complexity of FrameBuffer2 it was also combined with decoding so that the public API could be reasonably simple to use. FrameBuffer3 has a simple API with a clear purpose, so its API can be exposed directly.
Bug: webrtc:14026
Change-Id: I81dc84b869e4d16c5e02feb5c876fbcede3d4a25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261181
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36781}
Metrics for calculating sent/recv key frame rate:
num_encoded_frames -- number of encoded frames
num_decoded_frames -- number of decoded frames
num_send_key_frames -- number of sent keyframes
num_recv_key_frames -- number of received keyframes
Metrics for frame size (in bytes) distribution:
recv_key_frame_size_bytes -- key frame size
recv_delta_frame_size_bytes -- delta frame size
The stats are only reported if the user so requests. This is
because the stats may not be useful for regression tracking,
but mainly for adhoc analysis.
Tested:
```
~/s/w/src (frame_stats↑1|✚1) $ autoninja -C out/Debug && out/Debug/test_support_unittests --gtest_filter="PeerConnectionE2EQualityTestSmokeTest.Smoke" 2>/dev/null
Note: Google Test filter = PeerConnectionE2EQualityTestSmokeTest.Smoke
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from PeerConnectionE2EQualityTestSmokeTest
[ RUN ] PeerConnectionE2EQualityTestSmokeTest.Smoke
...
RESULT num_encoded_frames: Smoke/alice-video= 31 count_biggerIsBetter
RESULT num_decoded_frames: Smoke/alice-video= 31 count_biggerIsBetter
RESULT num_send_key_frames: Smoke/alice-video= 2 count_biggerIsBetter
RESULT num_recv_key_frames: Smoke/alice-video= 2 count_biggerIsBetter
RESULT recv_key_frame_size_bytes: Smoke/alice-video= {1847,126} count_biggerIsBetter
RESULT recv_delta_frame_size_bytes: Smoke/alice-video= {1150.1034,393.66329} count_biggerIsBetter
...
RESULT num_encoded_frames: Smoke/charlie-video= 31 count_biggerIsBetter
RESULT num_decoded_frames: Smoke/charlie-video= 31 count_biggerIsBetter
RESULT num_send_key_frames: Smoke/charlie-video= 2 count_biggerIsBetter
RESULT num_recv_key_frames: Smoke/charlie-video= 2 count_biggerIsBetter
RESULT recv_key_frame_size_bytes: Smoke/charlie-video= {1847,126} count_biggerIsBetter
RESULT recv_delta_frame_size_bytes: Smoke/charlie-video= {1150.1034,393.66329} count_biggerIsBetter
...
[----------] 1 test from PeerConnectionE2EQualityTestSmokeTest (2196 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (2196 ms total)
[ PASSED ] 1 test.
```
Bug: webrtc:14019
Change-Id: I3d5ea0cf659a6299c6d94f5004cbf0c763b267e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260924
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36759}
With the encoding parameters in the SimulcastConfig objects, it wasn't
possible to configure explicit encoding parameters when using singlecast,
required for example to use the spec standard SVC API.
Bug: webrtc:11607
Change-Id: I92b1446e772e2ecec93379dc91a3da159b8bc209
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260002
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36731}
This is an implementation API, user classes should in principle
only use the channel_interface.h
Bug: webrtc:13931
Change-Id: I85c285217858dc087c90a50792e980f731f4439f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260185
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36674}
This is the first step in the next refactoring:
1. Make general peer params immutable and accessible only via const ref.
2. Extract params which can be changed during the call
3. Expose mutators for mutable params protecting them with proper
locking.
Bug: b/213863770
Change-Id: Ie3ac17918f1fed3b8ec84992f8b0afc402bce7f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260003
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36647}
Return a copy of the frames counters to be able to get DVQA stats while
it is running.
Bug: b/213863770
Change-Id: I04755117cf363e1f160caa11dbe52fb30324fdf5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259867
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36638}
media_kind is the old name (that is kept around since we can't deprecate)
BUG=None
Change-Id: I445441a54bb4ff408502d1aba6834cdac874324b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259766
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36625}
While the target has a restricted visibility, since it was in rtc_base_approved
public deps, a lot of targets were able to bypass the visibility check.
So we remove the visibility restrictions and use the dependency explicitely
everywhere instead.
Bug: webrtc:8603
Change-Id: I94a03fdf7f94c54ab72081a58dd648e2cca73d17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36566}
Now that FieldTrialsView is (almost) a supported object,
let downstream tests use the ScopedKeyValueConfig for
testing.
Bug: webrtc:10335
Change-Id: I7bf7577387f1123b473275990ca32b80a8ddf9bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36519}
There doesn't seem to be any tests currently running with
VideoToolbox H.264 codec.
Add a minimal test to make sure there are no regressions.
Bug: webrtc:13934
Change-Id: I664833d06e9b4f919b0662781891f5448e6057c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257922
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36511}
The features have two safety fallbacks:
- multichannel config has a killswitch WebRTC-Aec3SetupSpecificDefaultConfigDefaultsKillSwitch
- stereo detection has a killswitch WebRTC-Aec3StereoContentDetectionKillSwitch
Both features are enabled by default in the AEC3 config.
Tested: Bitexact on a large number of aecdumps.
Bug: chromium:1295710
Change-Id: I340cdc9140dacd4ca22d0911eb9f732b6cf8b226
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258129
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36482}