Commit graph

6312 commits

Author SHA1 Message Date
Danil Chapovalov
1821faaa6c Cleanup AimdRateControl interface and unittests
Pass FieldTrialsView by const& to note it can't be null and doesn't need to outlive the constructor
In unittests use AimdRateControl object directly instead of through helpers
Use unit types (TimeDelta, DataRate) directly, reducing their conversion to plain numbers
Replace SimulatedClock with a single Timestamp now variable or constant

Bug: None
Change-Id: I147f85e629b4d8923aa19896ea211a6f9dca1e68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299260
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39707}
2023-03-28 16:43:24 +00:00
Jesús de Vicente Peña
d93b7b91e0 Unifying the handling of the events in NetEqInput.
Bug: webrtc:14763
Change-Id: I9615a9ce41c9b577c4ebd4cdcc9885bfbc5dac48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293040
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39706}
2023-03-28 15:53:09 +00:00
Jakob Ivarsson
d6c4b1641d Remove decoded timestamp extrapolation from NackTracker.
UpdateLastDecodedPacket is anyway only called when a new packet is
decoded.

Bug: webrtc:10178
Change-Id: I8cfcc5791e71079034a2d0806c44b3b071ac2ffb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299180
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39703}
2023-03-28 12:33:42 +00:00
Danil Chapovalov
48476d84d5 Fix generating transport feedback RTCP packet
when there are lot of missing packets to report before next received packet

Bug: chromium:1426582
Change-Id: I6746294152d13e18120cdb173b11b245e5c803f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39698}
2023-03-28 09:24:49 +00:00
henrika
9204210718 Clarifies selection of screen capture API on Windows
This change makes it more clear that there are three different
capture API combinations for screen sharing on Windows.

No option => GDI without fallback.

DirectX option => DirectX with GDI as fallback

Magnifier option => Magnifier API with GDI as fallback

Previously, if both DirectX and Magnifier were enabled, the end
result was Magnifier for unknown reasons.

With this change in place, we can remove usage of the Magnifier API
in Chrome and switch  between DirectX and GDI simply by allowing
DirectX or not.

Bug: None
Change-Id: Ice915d6721fa84a25d275f22246df73fc61f64b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299061
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39692}
2023-03-27 20:22:33 +00:00
Danil Chapovalov
7bb9322e9e Drop RtpRtcp unittest dependency on global field trial string
FieldTrialBasedConfig reads config from the global field trial string
ScopedKeyValueConfig adjust the global field trial string
test::ExplicitKeyValueConfig doesnt touch the global field trial string

Bug: webrtc:11926
Change-Id: I8883634fdc7e1bdb63eec9bf38114a3031103839
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299062
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39683}
2023-03-27 09:53:19 +00:00
Danil Chapovalov
0e5501f0ff Cleanup OveruseDetector from tracers of old experimentation
experiment was cleaned up in
https://webrtc-review.googlesource.com/c/src/+/284922

Bug: webrtc:4711
Change-Id: I19e1ba9716a5b0375fa4c5cf8c69e6bb2b03de6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299041
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39671}
2023-03-24 17:13:45 +00:00
Danil Chapovalov
7f60e5f753 Cleanup IncludeCaptureClockOffset field trial
Bug: webrtc:10739
Change-Id: I642cdf7574277c4c1b4ceb62b9e8a6905325dcfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299004
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39669}
2023-03-24 14:03:07 +00:00
Jakob Ivarsson
94b51210f8 Include packet waiting time in concealment decision.
This is to be more robust to packet loss during DTX and paused streams.

Without it, we can wait to decode an available packet when in CNG or
PLC mode until more packets arrive, which for DTX and paused streams
can take a long time.

We already include the waiting time if the last packet in the buffer
is a DTX packet.

Bug: webrtc:13322
Change-Id: Iaf5b3894500140d6f83377ba2cd65b44e0cdac05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299009
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39667}
2023-03-24 13:18:58 +00:00
Jakob Ivarsson
096563e9d2 Combine concealment decision logic in NetEq.
Decisions should be the same (almost) regardless of PLC or CNG mode.

The new logic is submitted behind a flag to avoid changing the default
behavior. This results in messy code, but can be simplified once the
flag is removed.

Bug: webrtc:13322
Change-Id: I959d63e069ad7970b75205c4c4173d774b0e4cac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298625
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39657}
2023-03-23 15:02:53 +00:00
Henrik Boström
4baea5b07f Make VP9 simulcast behave like singlecast for single active layer cases.
Various "if streams == 1" cases are updated to "if
IsSinglecastOrAllNonFirstLayersInactive()" in order not to cause subtle
differences between VP9 {active} and VP9 {active,inactive,inactive}.

This CL also affects a line that conditionally sets
`simulcastStream[0].active = codec_active` so it seemed fitting to
improve the test coverage of "if all streams are inactive, don't send".

Bug: webrtc:15028
Change-Id: I8872dc8be0f2dfc1d8914bdba5e6433f9ba8cbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298881
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39656}
2023-03-23 14:49:22 +00:00
Henrik Boström
80850ca477 Fix crash happening when changing from legacy to standard VP9.
Attempting to ship "WebRTC-AllowDisablingLegacyScalability" revealed a
DCHECK that happens when negotiating 3 VP9 streams prior to the
setParameters() call:
1. By default, `scalability_mode` is missing, so those 3 streams
   defaulted to legacy SVC, meaning only a single stream is used.
2. Then, setParameters() was called to make
   `encodings[0].scalability_mode = "L2T2_KEY"` and
   `encodings[1-2].active = false`. The inactive streams were just
   dummies and never expected to exist.

Without simulcast support this is OK, because both 1) and 2) are
interpreted to have a single stream. But with simulcast support, 1) is
interpreted as single stream and 2) as three streams (1 active, 2
inactive). This should be roughly the same setup, but our code treats
them differently.

The DCHECK crash was a mismatch in number of streams in one of the
layers.

The fix is to re-create the streams when the number of streams change
for this reason. The new test revealed other issues and fixes too:
- Support for multiple spatial layers (e.g. "L2T2_KEY") when multiple
  encodings exist but only one encoding is active.
- Allow inactive layers not to have a scalability mode set.

A laundry list (https://crbug.com/webrtc/15028) has been created to
update known places doing "if streams == 1" that need to do "if
active streams == 1" instead.

Credit:
  The RecreateWebRtcStream() fix is based on eshr@'s POC from
  https://webrtc-review.googlesource.com/c/src/+/298565.

Bug: webrtc:15016
Change-Id: I909a3f83a4ef53562894549ade0a870b208cec7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298443
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#39651}
2023-03-23 10:46:17 +00:00
Jan Grulich
4bfc4ac4b0 PipeWire capturer: drop old DmaBuf support
Drop support for old compositors that don't use DmaBufs the way they are
supposed to be used now. There is now a whole negotiation process that
includes DmaBuf modifiers and there is also support for renegotiation in
case we fail to import DmaBufs with certain modifier. This is something
that didn't exist before and in such case, failing to import DmaBufs we
would just end up with broken screen sharing. For that reason it would
be better to use MemFD instead to make sure old compositors will work
just fine

Bug: webrtc:15029
Change-Id: Icc303504e510adc829c12feff7178ae01578a6da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298700
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#39649}
2023-03-23 07:01:20 +00:00
henrika
6bdb285e21 Adds WebRTC.DesktopCapture.Win.DirectXCursorEmbedded UMA
Logs if the mouse cursor has moved and if so if it is embedded in the
captured DXGI frame or not.

Bug: chromium:1421656
Change-Id: Ic8fa8a5a3c020ec28b04064c765b1c204accec1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298564
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39644}
2023-03-22 17:19:06 +00:00
Evan Shrubsole
a7b691499b Always post RemovePacketsForSsrc
If during shutdown the pacer has packets enqueued during pause these
packets will be posted to the pacer after the worker thread is free -
after the ssrcs should have been cleared. This fixes flakes in
picutre_id_tests.

Bug: webrtc:14985
Change-Id: Ib5547a501670fc145543df32fdc43bbc6596375f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297401
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39640}
2023-03-22 14:24:50 +00:00
Danil Chapovalov
bbc926d62c Cleanup construction parameters for remote bitrate estimator helpers
Values of these parameters are always the same and thus can be hardcoded

Bug: None
Change-Id: Ie19a1c6305d503ad2c92af503006a72b7981e178
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298622
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39637}
2023-03-22 11:42:19 +00:00
Sergey Silkin
ebb5383fd8 Dump codec input
Add functionality for dumping encoder and decoder input to file in video codec test.

Bug: b/261160916, webrtc:14852
Change-Id: I49a84a886d87903c601cf5c35bd723b6393c2a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298051
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39626}
2023-03-21 16:54:19 +00:00
Danil Chapovalov
198d0d7fd5 Remove mutexes from remote bitrate estimators
They are called only by ReceivedSideCongestionController that already
ensures all access is synchronized.

Bug: None
Change-Id: I0f87e24e3fbb0bd8f6ff679fb949d2373c554fba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269300
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39622}
2023-03-21 14:17:37 +00:00
Åsa Persson
014b244fa0 Keep SVC max bitrate if number of spatial layers are reduced.
Bug: chromium:1423361
Change-Id: I02bcb11f2ac456db79ed835dd38d4d7621a49608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298446
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39614}
2023-03-21 12:00:17 +00:00
Sergey Silkin
aa17f2f0a9 Add Initialize() to Encoder/Decoder API in video codec tester
Initialization of Android HW codecs takes hundreds milliseconds. Exclude this time from frame processing time of first frame by initializing codecs before starting encoding/decoding.

Bug: b/261160916, webrtc:14852
Change-Id: I9ec84c6b12c1d9821b59965cf521170224066563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39613}
2023-03-21 08:04:48 +00:00
Diep Bui
980c6bc09f Update loss based bwe - probe integration.
Instead of use probe_bitrate as the bandwidth estimate, the change uses probe bitrate as the bandwidth limit.

The experiment is not started, so it does not affect production.

Bug: webrtc:12707
Change-Id: Iefd8cdfe87983057489e551816bf5d4cb38f7c9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296040
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39603}
2023-03-20 11:14:46 +00:00
Sergey Silkin
12669513d2 Use internal codec factories directly
BuiltinVideoEncoderFactory, which was used before, has been started to use SEA since https://webrtc-review.googlesource.com/c/src/+/297740. SEA requires factory lifetime to be ~same as created codec lifetime. Codec test doesn't guarantee this currently.

Bug: b/261160916, webrtc:14852
Change-Id: I75ef99f1c9fe0d7823f31fd07c05a3ca52f7212d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298201
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39600}
2023-03-20 10:33:40 +00:00
Jan Grulich
d9faa73cbb PipeWire capturer: import DMABufs directly into desktop frame
Originally DMABufs were imported into a temporary buffer followed by a
copy operation into the desktop frame itself. This is not needed as we
can import them directly into desktop frames and avoid this overhead.

Also drop support for MemPtr buffers as both Mutter and KWin don't seem
to support them and they are going to be too slow anyway.

Testing with latest Chromium, I could see two processes with usage around 20% and 40% without this change going down to 10% and 20% with
this change applied.

Bug: webrtc:13429
Bug: chrome:1378258
Change-Id: Ice3292528ff56300931c8638f8e03d4883d5e331
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297501
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#39594}
2023-03-17 17:31:55 +00:00
Erik Språng
e94dcefbd4 Fix bug in SvcRateAllocator capping to VideoCodec.maxBitrate
When allocating bitrate, some parts of the coded directly uses the bitrate parameter, while others lets it be capped by VideoCodec.maxBitrate. This may result in an inconsistency between expected and actual number of temporal layers, causing a crash.

Even better would be to update VideoCodecInitializer to not create
VideoCodec instances where there's not enough maxBitrate to activate
all spatial layers - but that's a much more complex issue.

Bug: chromium:1423365
Change-Id: Ic74b68261ea6043f1795accdd9864319ab535435
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298041
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39593}
2023-03-17 17:08:53 +00:00
Sergey Silkin
0af2bc639a Add H265 to VideoCodecMimeType
This enables testing HW H265 codecs on devices where the support is available.

Bug: b/261160916, webrtc:14852
Change-Id: I32d102fcf483ea4ba46d6f5161342dbb584e7cc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298040
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39591}
2023-03-17 15:28:11 +00:00
Jakob Ivarsson
63643357b4 Remove CNG state tracking from NetEq decision logic.
It seems like this is legacy and not useful. A comment mentions
transitioning between CNG and DTMF modes, but there is no way this can
happen currently.

Bug: webrtc:13322
Change-Id: I9e4706cb6ee145ee37a9e11e7cab6ea4ff697dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297980
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39590}
2023-03-17 15:00:17 +00:00
Tony Herre
5dc09587fa Ensure frame type is copied over for cloned sender frames
Previously cloned frames ended up with the metadata saying it was a
delta frame, even for keyframes.

Bug: chromium:1425362
Change-Id: I7a9438f124b75f6be9a5705d20fa65b2f7179a22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298020
Commit-Queue: Tony Herre <herre@google.com>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39588}
2023-03-17 14:32:19 +00:00
Wan-Teh Chang
ad192a8c5e Remove extraneous opening parenthesis in comment
Bug: None
Change-Id: I8f1939caa43a7eb48dc5a6276520b39429062b30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298000
Auto-Submit: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39587}
2023-03-17 14:31:15 +00:00
Sergey Silkin
82e8a7fdca Fix frame rate scaling in video codec tests
Swap numerator and denominator values.

Bug: b/261160916, webrtc:14852
Change-Id: Id1fa81ac8e13513005a53b7034f1d38bb1602c2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297960
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39581}
2023-03-16 17:13:59 +00:00
Jakob Ivarsson
766adcdeb8 Simplify NetEq CNG decision logic.
This is in preparation of merging the PLC and CNG decision logic.

Bug: webrtc:13322
Change-Id: Ica782440b0d5c43c92ad5c33631b0cb708b51b0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297861
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39580}
2023-03-16 15:35:01 +00:00
Philipp Hancke
b3e5969658 stats: use uint64_t for RTCSentRtpStreamStats.packetsSent
spec update from https://github.com/w3c/webrtc-stats/pull/744

BUG=webrtc:14989

Change-Id: I9d0adcf951501bc281054c77bb6bc03e47192523
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295505
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@{#39575}
2023-03-16 06:46:19 +00:00
Wan-Teh Chang
8f29b42670 Validate encoder_settings_.qpMax
libaom uses the quantizer as an index for an array of size 64, so
encoder_settings_.qpMax must be <= 63.

Add a comment to LibaomAv1Encoder::SetSvcParams() to explain why the
method doesn't initialize svc_params.layer_target_bitrate.

Bug: None
Change-Id: I26be80de005752214365abbe8b9b32dc976cee0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293680
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39572}
2023-03-16 02:57:44 +00:00
Salman Malik
db9be7f194 x_server_pixel_buffer: Use CopyPixelsFrom instead of memcpy
`CopyPixelsFrom` uses libyuv underneath and has handrolled
implementation for copying with AVX.

Bug: chromium:1424776
Change-Id: I4fafeba97fcc1d2200a10070837672175a1dfc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297800
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Salman Malik <salmanmalik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39567}
2023-03-15 17:15:54 +00:00
Per K
54199f9b4b Ensure a second probe can be sent immediately
Ensure a second probe can be sent, after the first probe has been sent, even though no large
media packets have been sent.
This fixes a bug in https://webrtc-review.googlesource.com/c/src/+/294521

This cl also refactor and simplify a bit. Remove the unecessary state kSuspended.

Bug: webrtc:14928
Change-Id: Ia561441ea3d8b648b025eedd0618c82cca03b418
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296882
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39547}
2023-03-13 14:48:02 +00:00
henrika
210b8b2325 Adds 0Hz support to WGC behind a flag
Also requires changes in Chrome, see https://chromium-review.googlesource.com/c/chromium/src/+/4315678

NOTRY=True
NOPRESUBMIT=True

Bug: chromium:1421242
Change-Id: Id1e6675e4ab4d1d82b011b85b799dc4e5b757c12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296501
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39542}
2023-03-13 11:59:53 +00:00
henrika
bedb69f26d Adds SetFrameDataToBlack() and FrameDataIsBlack() to DesktopFrame
Bug: None
Change-Id: I558b2398de409b0b44f331520e3d4692e45b9315
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296884
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39537}
2023-03-10 21:48:11 +00:00
Rasmus Brandt
eec4fd1f66 Move deprecated EventWrapper to modules/video_coding/deprecated/
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.

No functional changes are intended.

Bug: webrtc:14876
Change-Id: Ieb6effd55f0ecba17cefc2f07f5eda1e85dbd016
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296441
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39535}
2023-03-10 15:46:58 +00:00
Danil Chapovalov
1391f821fa Cleanup ReceiveSideCongestionController internal dependency on RTPHeader
Bug: webrtc:14859
Change-Id: Ic7d1c904cfd0a68b3ec45e5cee6eace95667b239
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296824
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39532}
2023-03-10 14:50:45 +00:00
Danil Chapovalov
1362c8ddcf In ReceiveSideCongestionController unittest use modern version of OnReceivedPacket
Bug: webrtc:14859
Change-Id: I8fd93272b0292947c93b5faaec2579a9c5ed3c5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296761
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39529}
2023-03-10 13:14:09 +00:00
Henrik Boström
89e140ccf7 VideoCodecInitializer: Only update width/height in VP9 SVC path.
The width/height need to be updated in the VP9 SVC case since resolution
alignment may be applied inside GetSvcConfig(). This is not needed in
the VP9 simulcast case since we don't support simulcast + SVC combo and
resolution alignment is not needed for non-SVC.

This CL gates the "resolution update" behind
"numberOfSimulcastStreams == 1".

Bug: webrtc:14884
Change-Id: Ic3551721dcf6775fea6ff0c85fba48e88069fa5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296766
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39524}
2023-03-10 11:23:15 +00:00
Rasmus Brandt
bc3a41e0d7 Move deprecated VCMDecodingState to modules/video_coding/deprecated/
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.

No functional changes are intended.

Bug: webrtc:14876
Change-Id: Ie6820a820f22635fe7a970db70b9c28d37499848
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296443
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39518}
2023-03-09 19:44:00 +00:00
Danil Chapovalov
b40aedf911 Delete RTPHeader::payload_type_frequency as unused
payload type frequency is not communicated inside an RTP packet and
thus do not belong to the RTPHeader

Bug: None
Change-Id: Ic3e48f1b0507a96ddc697503145f7c8785962926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296763
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39515}
2023-03-09 16:32:22 +00:00
Henrik Boström
f8bc1169a8 Test that VideoCodecInitializer propagates VP9 resolution alignment.
The GetSvcConfig() call here[1] can result in resolution alignment due
to [2], which gets propagated to the output VideoCodec due to [3].

This CL adds test coverage for this part.
It also removes some comments that are no longer true and updates
VideoCodecInitializerTest's SetUpFor() to make number of simulcast
streams explicit.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=251;drc=e4a304ed4da869ab6131a06b3e8b7e985f50229d
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/codecs/vp9/svc_config.cc;l=112;drc=31acc7339cf658ce82c7ec490ba38d67170920ed
[3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=285;drc=e4a304ed4da869ab6131a06b3e8b7e985f50229d

Bug: webrtc:14884
Change-Id: Id22e36aebab573f53d15dca688642d32c8c4be7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296762
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39514}
2023-03-09 13:40:12 +00:00
Rasmus Brandt
5a54800957 Move deprecated VCMFrameBuffer to modules/video_coding/deprecated/
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.

No functional changes are intended.

Bug: webrtc:14876
Change-Id: Id1c7fbb969a63eee96fd88c376371aa7eafd0919
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296440
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39512}
2023-03-09 11:05:20 +00:00
Danil Chapovalov
6a0997de01 Skip calling rtcp callback on packets containing invalid rtcp message
Low-Coverage-Reason: added code handles invalid rtcp packet scenarios which are covered by rtcp_receiver_fuzzer
Bug: webrtc:5260
Change-Id: Ia6ba0b736f5732fa6516edb2a5ed1b96079eb4ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296580
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39503}
2023-03-08 14:19:54 +00:00
Per K
ffdecdce2c Add possibility to start probe without waiting for media packet
Bug: webrtc:14928
Change-Id: If3c7fe39979e7a4d45b01dd59debd8ac69de3d01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294521
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39496}
2023-03-07 14:21:32 +00:00
Sergey Silkin
a5f32e445c Set frame capture timestamp
Unlike SW encoder wrappers, Android HW encoder wrapper uses frame capture timestamp instead of RTP timestamp: https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/sdk/android/src/jni/video_frame.cc;rcl=514125748;l=309

Bug: b/261160916, webrtc:14852
Change-Id: Ief76abae659f7ba890371901cc9b505526ac4f97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296500
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39495}
2023-03-07 13:56:14 +00:00
Sergey Silkin
1c1382be0f Dump codec output to ivf/y4m
Bug: b/261160916, webrtc:14852
Change-Id: I19de2210aa03b56752db5ce8b6fd94498123d6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39490}
2023-03-07 08:33:39 +00:00
Sergey Silkin
9259b5f72c Add rate adaptation tests
Bug: b/261160916, webrtc:14852
Change-Id: I58b3647218c961dcf0305c3902f79adb448b73e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295866
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39489}
2023-03-06 18:33:16 +00:00
Danil Chapovalov
812186d060 Unassign personal TODOs in modules/rtp_rtcp
1st TODO is removed because there are no plans to use RtcpSender for multiple media streams, RtcpTransceiver designed for that instead
2nd TODO is removed because benefits of not producing same report blocks is unclear, while there is risk to break RTT calculation for remote receivers

TODOs in RtcpTransceiver are reassigned to general bug about it instead, in particular to note low priority, same as that issues has.

No-Try: true
Bug: webrtc:10198
Change-Id: Ibcc3691265459c0732019ceba7903e27d57d543a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296360
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39488}
2023-03-06 17:24:50 +00:00