Commit graph

6956 commits

Author SHA1 Message Date
Danil Chapovalov
e052eee7a3 Deprecate rtc::TaskQueue variant of AudioProcessing::CreateAndAttachAecDump
Bug: webrtc:14169
Change-Id: I63f40ec18b72cba89eb0b9b298f448ce7f7c4634
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334201
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41528}
2024-01-15 13:36:35 +00:00
Philipp Hancke
edd804816c video capture test: use stock EXPECT_TRUE_WAIT
instead of a custom one.

BUG=None

Change-Id: I5c55acef6203a384748534c6c9701dcdd8dec211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332940
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41526}
2024-01-15 07:42:58 +00:00
Jeremy Leconte
634cb403e6 Revert "Fix 'Image will be cropped if WindowCapturerWinGdi used'"
This reverts commit 844225a76a.

Reason for revert: potential nullptr dereference

Original change's description:
> Fix 'Image will be cropped if WindowCapturerWinGdi used'
>
> Bug: webrtc:15719
> Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Alexander Cooper <alcooper@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#41503}

Bug: webrtc:15719
Change-Id: Ib38e1345c4c590b6a71bbea476a9d780a2f5e800
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334200
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Manashi Sarkar <manashi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41509}
2024-01-12 10:16:26 +00:00
memetao
844225a76a Fix 'Image will be cropped if WindowCapturerWinGdi used'
Bug: webrtc:15719
Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41503}
2024-01-10 19:52:44 +00:00
Philipp Hancke
bb0044eb90 add VP8/VP9 packetization fuzzers
and ensure consistent behavior on empty input.

BUG=webrtc:15755

Change-Id: Id70ab5d55251b4dd10eed8ab67ea8e75545a7a8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332740
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41502}
2024-01-10 14:36:46 +00:00
Danil Chapovalov
1ecf29c1ce Change AudioProcessing interface to allow not to require rtc::TaskQueue
rtc::TaskQueue is a wrapper of TaskQueueBase providing no extra functionality in this case

Bug: webrtc:14169
Change-Id: I5eb27a5dbb16f6097a9c71c2633c807808e50c05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333800
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41501}
2024-01-10 13:48:44 +00:00
Per K
187ca72ab7 Fix problem in PrioritizedPacketQueue when last old RTX packet is purged
Ensure top_active_prio_level_ is set to -1 in MaybeUpdateTopPrioLevel if
last packet is purged.

Bug: webrtc:15740
Change-Id: I81df9ee084de89f79b8ab79db8ce52fe1e20738a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333883
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41498}
2024-01-10 10:54:42 +00:00
Danil Chapovalov
dda037db07 Remove unused field trial DisablePacerEmergencyStop
This field trial was added 5 years ago in
https://webrtc-review.googlesource.com/c/src/+/111883
probably as a safe guard, but looks never used.

Bug: webrtc:11503
Change-Id: Ia9544b652b25fad4c614d66fe020f3d994c96505
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333380
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41490}
2024-01-09 15:03:34 +00:00
Philipp Hancke
5d091cec5d Add H264 packetizer fuzzer
BUG=webrtc:15755

Change-Id: I384fbdfa3a2aea8faaf53eb161cecc2c8639401d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41487}
2024-01-09 13:32:42 +00:00
Danil Chapovalov
1d6bf3156b Use propagated instead of global field trials in FecControllerDefault
Bug: webrtc:10335
Change-Id: Ia559ae2655b39e7093cfdb9ed669f3463ef90054
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333842
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41483}
2024-01-09 12:26:54 +00:00
Danil Chapovalov
b64eef1234 In AecDump take raw pointer to TaskQueueBase instead of legacy rtc::TaskQueue
Bug: webrtc:14169
Change-Id: I1e50a945a7637da07bec00ccd7b6b1847a7481cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333480
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41477}
2024-01-08 12:17:06 +00:00
Philipp Hancke
de17252e8e Reland "Unify access to SDP codec parameters"
This is a reland of commit 63d03f586b

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
2024-01-03 12:03:11 +00:00
Danil Chapovalov
8a74636d46 In ReceiveStatistics fix a signed integer overflow undefined behavior
Bug: b/318332290
Change-Id: I279dcaf8c9cb801482f0e29343304c854af78792
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333060
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41463}
2024-01-02 12:20:34 +00:00
Björn Terelius
51563cc36c Ensure that sequence numbers are initialized in DelayBasedBwe unittests
Bug: b/299667054
Change-Id: I6bcc4ec9e3588842e6da7d9265c145680de0c52b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332260
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41431}
2023-12-21 14:51:11 +00:00
Philipp Hancke
f698a39eec OpenH264: report error on unsupported pixel format
BUG=webrtc:15713

Change-Id: I32aa14aced59ed8f1a9a3a9b8f70182d704e3354
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Natalie Silvanovich <natashenka@google.com>
Cr-Commit-Position: refs/heads/main@{#41420}
2023-12-20 08:24:24 +00:00
Per K
b9ba02c025 Prioritize audio resend before video resend and implement TTL.
Adds separate priorities for audio and video retranmission.
Done by adding an original type to RtpPacketToSend.

Add possiblity to set TTL for audio nack, video nack and video packet separately.
Oldest packet for these types are dropped when a new packet of that type is pushed to the pacer, or when the pacer switch current priority type to that priority.

Effect is that:
   -pacer queue does not grow unlimited for these types if a TTL has been set.
   -an old packet is not sent.

Bug: webrtc:15740
Change-Id: I38718bc570aebca54eacbded69824905f3694f41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331823
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41414}
2023-12-19 13:52:11 +00:00
Tony Herre
3e801c3208 Allow RTP retransmission for cloned encoded Video Frames
Fix the unintended disabling of RTP retransmissions for cloned encoded
frames, caused by passing an infinite "expected_retransmission_time".
Instead use a constant 10ms for now. For frames encoded locally, this is
set from an estimate of the RTT, but we currently don't have access to
that here (TODO added to pipe it through)

If an integration is cloning and then sending frames it received, it's
almost certainly resending received media to other peers on a local
network, so 10ms is a fair upperbound.

Tested locally with Chrome on Mac, configuring packet drops & observing
on chrome://webrtc-internals that retransmission packets are now sent.

Bug: chromium:1512631
Change-Id: I2483415dc7e0079f8a7b66f6607f4907698514c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41405}
2023-12-18 17:50:14 +00:00
Danil Chapovalov
ca8353648d Rewrite tmmbr timeout check to avoid using negative Timestamp
Bug: chromium:1511139
Change-Id: I7f65fd07412a6c32c5633f8ef6655ba506fe5407
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331822
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41404}
2023-12-18 16:48:07 +00:00
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
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>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b Unify access to SDP codec parameters
which come from the a=fmtp:<pt> lines in the SDP and were used as either
  std::map<std::string, std:string>
with three aliases,
  cricket::CodecParameterMap
  SdpAudioFormat::Parameters
  SdpVideoFormat::Parameters

Use webrtc::CodecParameterMap in all places.

BUG=None

Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
2023-12-13 14:22:15 +00:00
Qiu Jianlin
ddf6084096 Apply QpParser for H.265 streams.
Video stream encoder now parses Qp for H.265 streams as well.

Bug: webrtc:13485
Change-Id: I0db4e0e34e70d189f8e99b4b182fd3ea14b8c734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330883
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41355}
2023-12-11 22:02:26 +00:00
Danil Chapovalov
7b4b39809f Remove DCHECK when transport feedback on request can't be produced
Bug: chromium:1507210
Change-Id: I840b91dd7143ce6a0d3c9a17df6c187e01a145f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330320
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41351}
2023-12-11 11:15:47 +00:00
Mirko Bonadei
a3d2c58e38 Skip LibaomAv1SvcTest.EncodeAndDecodeAllDecodeTargets/S3T3.
This is temporary while AV1 gets fixed.

Bug: webrtc:15715, b/315476578
Change-Id: I4fdadb97788c934b12b4a3a19dfec1f61a95a3a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330640
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41345}
2023-12-09 12:24:51 +00:00
Tony Herre
5f3ac43551 Ensure cloning and then sending audio encoded frames propagates CSRCs
Bug: chromium:1508337
Change-Id: I9f28fc0958d28bc97f9378a46fbec3e45148736f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330260
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41337}
2023-12-07 15:09:01 +00:00
Diep Bui
5b11df789f Ensure that acked rate is the lower bound of estimate and candidates.
After https://webrtc-review.googlesource.com/c/src/+/329141, best candidate can still be less than acked rate if not_increase_if_inherent_loss_less_than_average_loss, or the selected candidate is 95% of current estimate. This cl/ is ensure the previous cl works as intended. And add unit test.

Bug: webrtc:12707
Change-Id: Ie5683ca8ea51f6d80c4c59cbf08c22e8b24c0cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329441
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41298}
2023-12-01 20:04:14 +00:00
Diep Bui
3a530abb0e Use acked rate as lower bound of both HOLD rate and best candidate.
Bug: webrtc:12707
Change-Id: I1a5656aa6a49c53914d625c61cf114cd5897646c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329141
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41293}
2023-11-30 20:10:15 +00:00
Sergey Silkin
ee46340054 Move and extend frame decode failure logging
Move logging of decode failure from VCMGenericDecoder to VideoReceiveStream2 where remote SSRC is always known. Log frame details such as size and resolution which help to identify this frame in bitstream dump.

Bug: b/309132190
Change-Id: Ibe50799e448ffdc19f9857cc1625cfde0d7aa7a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328821
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41276}
2023-11-29 13:50:18 +00:00
Per K
fc60c7836f Add flag to reset LossBased BWE best candidate to instant upper bound
Bug: webrtc:12707
Change-Id: I4583e131ab9c5d81188191b23ebc227b4662bd7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329121
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41274}
2023-11-29 13:18:03 +00:00
Per K
2e3152654a Allow setting a different rampup factor if BWE < hold rate
Bug: webrtc:12707
Change-Id: Id674246d66d1b7f2a705934350e8a4f93564639f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329120
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41273}
2023-11-29 12:36:24 +00:00
Jakob Ivarsson
526187708d Refactor NetEq insert packet list.
Move some logic from PacketBuffer to NetEqImpl.

Bug: webrtc:13322
Change-Id: I88b1e55c0cd69700730d9ed41be04fcf1effa03f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328861
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41270}
2023-11-29 09:53:21 +00:00
Diep Bui
69d1d3ec40 Remove unused flags in loss based bwe v2.
These flags were never experimented or launched.

Bug: webrtc:12707
Change-Id: Iefedeade52fdcf7f978894c4bf837261810f41bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329080
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41265}
2023-11-28 22:48:34 +00:00
Per K
b202bc1db2 Per default set PacingController burst interval to 40ms
PacingController per default use a burst interval of 40ms. The behaviour can still be overriden by  using the method SetSendBurstInterval.

Bug: chromium:1354491
Change-Id: Ie3513109e88e9832dff47380c482ed6d943a2f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311102
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41254}
2023-11-28 07:53:50 +00:00
Per K
f1df16ceea Per default enable WebRTC-PaddingMode-RecentLargePacket
This means that RtpPacketHistory::PaddingMode::kRecentLargePacket is
used per default.

Bug: webrtc:15201, b/284281602
Change-Id: If8feb66105a9b1e13ae4cb28a44a74c8839b72e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41215}
2023-11-22 17:43:43 +00:00
Harald Alvestrand
572502c2ab Deprecate char* functions on ByteBufferReader
Bug: webrtc:15661, webrtc:15665
Change-Id: Ia35b0092c219a89b5eba08d2e1a91be6e47dc746
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328000
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41210}
2023-11-22 11:46:25 +00:00
Michael Olbrich
a9d497b52d Video capture PipeWire: fix thread and lock annotations
There are two threads involved here, the thread that calls the API
functions and the pipwire main loop. Using one race checker for both is
wrong and triggers aborts.

Use a different race checker for all variables that are used by the
pipewire main loop or guarded against concurrent access with the
thread_loop_lock.

In one case, two RTC_CHECK_RUNS_SERIALIZED() checks are needed, so
enhance the macro to generate unique variable names.

Bug: webrtc:15181
Change-Id: Ib41514eb7aa98fe85d830461aa0c71e42ba821bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326781
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41198}
2023-11-20 18:18:04 +00:00
Per K
f124572ec0 Per default enable WebRTC-Bwe-EstimateBoundedIncrease/c_upper:true
This ensure upper link capacity estimate upper limit an increase in
delay based estimate, but the delay based estimate is not decreased if
link capacity estimate decrease.

Bug: webrtc:10498, b/300868877
Change-Id: I87e76e2a869e6f721cc8fe9d422e0194371d4e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327801
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41196}
2023-11-20 14:40:15 +00:00
Sergey Silkin
2d86b258e0 Reland "Added an encode/decode test parameterizable via command line"
This is a reland of commit 496893e89e

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> 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@{#41179}

Bug: webrtc:14852
Change-Id: Iccb9af8bf6a6c37704bc58b6e57238b55761b079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41194}
2023-11-20 11:51:43 +00:00
Tony Herre
6e956053b7 Support shortcircuiting encoded transforms
Add a StartShortCircuiting() callback to allow clients which have
configured Encoded Transforms when creating a PeerConnection to have
all frames skip the transform. This offers a zero cost path for streams
which don't need transforms.

This is preferable to uninstalling/not installing the transform to allow
implementing the behaviour in
https://w3c.github.io/webrtc-encoded-transform/#stream-creation -
giving web apps a chance to configure transforms within a short window
(before the next JS event loop run, so usually sub-millisecond) after stream creation, without any untransformed frames passing.

Usage in Chromium: crrev.com/c/5040731

Bug: chromium:1502781
Change-Id: I803477db1df51e80bdedf6c84d2d3695b088de83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41184}
2023-11-17 13:03:27 +00:00
Christoffer Jansson
20724ae1b7 Revert "Added an encode/decode test parameterizable via command line"
This reverts commit 496893e89e.

Reason for revert: Breaks https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/16103/overview

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> 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@{#41179}

Bug: webrtc:14852
Change-Id: Ifdce738058c3e3fc7c76886939add2813405cae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327722
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41183}
2023-11-17 12:53:00 +00:00
Sergey Silkin
496893e89e Added an encode/decode test parameterizable via command line
This enables testing different settings without updating code and rebuilding the test binary. Example of command:

video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv

Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.

Bug: webrtc:14852
Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
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@{#41179}
2023-11-17 10:21:51 +00:00
Yosef Twaik
75a3ba216e Reverse the kbits logic according to RFC
The updated Flexfec RFC states that a kbit of "0" means this is the last block of the mask, whereas in the 03 draft, "0" meant there's another block.
Reversing the logic in the updated RFC parser to fix.


Bug: webrtc:15002
Change-Id: I40e4c950b09ddf2db9da6c01908737282161bf1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327580
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41174}
2023-11-16 18:33:13 +00:00
Jan Grulich
12c502428d Video capture PipeWire: clear notifier after use and upon destruction
Make sure the notifier is reset when tearing down the camera portal and also when we already called it. Destruction of camera portal will be mostly invoked by an object holding it and serving as an implementation of the notifier interface and in such case we have to make sure it will
not get called at this moment.

Bug: webrtc:15407
Change-Id: If0c1fb1493d64d5e1f0228ed71813abbb9280083
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41167}
2023-11-15 13:59:24 +00:00
Jan Grulich
8b54e37cac DeviceInfoPipeWire: move include for PipeWireSession out of the header
Moving the header file and definitions for PipeWireSession to the source
file allows DeviceInfoPipeWire to be reimplemented or used in wrappers
without the consumer needing to add PipeWire includes and definitions.

Bug: webrtc:15654
Change-Id: I895059d50bdf9e6ed152eca729c618261701457a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327381
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41163}
2023-11-15 10:49:56 +00:00
Jan Grulich
eb6106e9d0 DeviceInfoPipeWire: Add RTC_CHECKS for non-initialized PipeWire session
Adds sanity checks for non-initialized PipeWire session in case caller
forgets to initialize VideoCaptureOptions.

Bug: webrtc:15654
Change-Id: Ic7afd2a9f7cd6ffdede612798544ad8826c96f74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327380
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41162}
2023-11-15 10:48:53 +00:00
Jakob Ivarsson
9305b108bd Fix integer overflow.
Bug: chromium:1501500
Change-Id: Ie13edbc90926c70cd37059a99cd539b15d0fb3a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327320
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41146}
2023-11-13 17:10:55 +00:00
Sergey Silkin
d431156c0e Move codecs handling from test to tester
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.

* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.

* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.

Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.

Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
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@{#41144}
2023-11-13 16:48:49 +00:00
henrika
b0cc68e612 Reduces rate at which TryGetNextFrame returns NULL for WGC
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.

The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.

This CL does two different things to improve the situation:

1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.

2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.

Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.

Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.

Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.

[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability

(cherry picked from commit 4be5927dc7)

Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#41079}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326960
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/branch-heads/6099@{#1}
Cr-Branched-From: 507f1cc3270d0577f79882acbd78e63e66008f3d-refs/heads/main@{#41042}
2023-11-10 10:06:20 +00:00
Jakob Ivarsson
7d62fe5702 Default enable NetEq experiments.
- Stable delay mode: this results in a very large reduction in the amount of time stretching and fewer underruns.
- More closely align PLC and CNG logic.
- Stop playing comfort noise after a timeout when no packets are received.

Several tests needed to be updated to match the new behavior.
Note that I should also refactor GetDecision to be easier to test in the future (remove internal state).

Bug: webrtc:13322
Change-Id: I1724a74b3b583d05a4bb8feb4f9a8c4a8b2b7c5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326780
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41125}
2023-11-10 09:09:22 +00:00
Stephan Hartmann
fa4d7c92b7 libstdc++: replace deprecated std::is_pod<T>
std::is_pod is deprecated since C++20. Replace with std::trivial and
std::is_standard_layout. Avoids a lot of warnings.

Bug: chromium:957519
Change-Id: Idb4bde7401c14c0896a84c357ec668b9916f613e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325484
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41117}
2023-11-09 15:16:00 +00:00
qwu16
bd396fdffa Add rtp packetizer for H265
Bug: webrtc:13485
Change-Id: I4e7e29a7661d51e12bb2ee12e319f6cef49482d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318005
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41107}
2023-11-08 15:49:37 +00:00
inaqui-signal
fa4fd71354 Merge branch 'm118' 2023-11-07 15:00:28 -06:00
Jakob Ivarsson
e925db88c1 Make stats member of packet buffer.
Bug: none
Change-Id: Ide88e895ea27fdfe5c68aa45295df45bf72bc292
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325532
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41095}
2023-11-07 10:19:25 +00:00
Jakob Ivarsson
0873faae00 Remove smart flushing experiment.
It did not result in big quality improvements.

Bug: webrtc:12201
Change-Id: I9728469a388ee179d6069af8521bfc5571870bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325533
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41087}
2023-11-06 15:38:04 +00:00
henrika
4be5927dc7 Reduces rate at which TryGetNextFrame returns NULL for WGC
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.

The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.

This CL does two different things to improve the situation:

1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.

2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.

Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.

Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.

Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.

[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability

Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41079}
2023-11-03 18:05:17 +00:00
Harald Alvestrand
23cecc1d43 Move scoped_refptr from rtc:: to webrtc::
leaving a compatible alias.

Bug: webrtc:15622
Change-Id: Ie25d87fa372cc71eaf52882454f4dd24c7c33789
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325462
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41072}
2023-11-03 07:36:07 +00:00
Harald Alvestrand
78f905e5cc Move some users to use webrtc::RefCountInterface
Bug: webrtc:15622
Change-Id: I2d4c20c726af1a052e161b7689a73d1e5e3eb191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325526
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41067}
2023-11-02 14:45:57 +00:00
Björn Terelius
efeeba0864 Try removing RTC_PUSH_IGNORING_WUNDEF() around proto includes
Bug: webrtc:15623
Change-Id: Ia184993769f74d51e68a5a536d5fdde26890bcfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325481
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41058}
2023-11-01 08:21:05 +00:00
Diep Bui
7d1693f1c5 Do not allow estimate to increase above the estimate when HOLD started.
To ensure padding, we increase 1 bit instead of 1kbps to avoid that 1kbps adds up over time.
Not have unit test for this, but did manual/hamrit tests many times.

Bug: webrtc:12707
Change-Id: I9b3160ab1808cb3a21ff0609446359a4ec3a4949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325520
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41056}
2023-11-01 01:30:32 +00:00
Jim Gustafson
62d543d814
Add low bitrate redundancy support 2023-10-31 13:14:36 -07:00
Diep Bui
cf2fe18daa Use acked bitrate as a candidate if padding is sent.
Bug: webrtc:12707
Change-Id: Ie824bdef09e685d0a4810177cbe5af57e699ad84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325480
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41052}
2023-10-31 16:11:43 +00:00
Diep Bui
9682f4be7d Reset loss based BWE on route change.
The change is under field trial use_in_start_phase.

Bug: webrtc:12707
Change-Id: I2ba8245c5d126b3c8a2e54b826853d98aad6e4f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325184
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41047}
2023-10-31 11:50:07 +00:00
Diep Bui
e920073a68 Ensure that loss based BWE can switch to kIncreasing state when it wants to increase.
Increasing BWE by 1kbps should be safe/no-op in practice, and it ensures that padding in kIncreasing state will be triggered.

Bug: webrtc:12707
Change-Id: I82493d07a80abd60c93d9cff74baf0a55e77f2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325286
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41046}
2023-10-31 11:46:43 +00:00
Diep Bui
4d7e722e9d Add 1minute as max hold duration to make sure that loss based BWE always tries to increase estimate.
Bug: webrtc:12707
Change-Id: I94689431726a37e2bfec52992046305705c6bb8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324741
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41025}
2023-10-27 13:02:04 +00:00
Danil Chapovalov
6634c91194 Refactor AbsoluteCaptureTimeSender and AbsoluteCaptureTimeInterpolator
Removed thread safety: for a low level helper it adds overhead that users may not need. In particular RtpSenderVideo doesn't need it because calls to SendVideo are already synchronized.

Added a feature to force producing extension as requested by downstream.

Cleanup and document api:
Changed rtp_frequency type to int as it has no reason to use uint32_t per style guide
Changed absolute_capture_time to NtpTime to clarify both units and offset of the time. NtpTime has trivial conversion to/from uint64_t
Documented all the parameters.

Cleanup tests.

Bug: b/307553606
Change-Id: I0922ca4d3c89f124eeb561742dca79ed5c2327fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325022
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/main@{#41023}
2023-10-27 12:50:08 +00:00
Diep Bui
e43edec62d Add 1s as padding duration limit in loss based BWE.
If we have been sending padding for 1s and estimate still is unchanged, then stop padding by transitioning to decrease state.

Bug: webrtc:12707
Change-Id: I0dca2e5cd98263fc7fae9882c23c21634413c7a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324740
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41018}
2023-10-27 12:36:05 +00:00
Sam Zackrisson
2e1f16d55c Make AEC3 json parsing code testonly
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library

Additionally, this CL removes the rtc_json "poisonous" attribute: the scheme is incompatible and redundant with testonly.

Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2023-10-26 12:03:02 +00:00
Diep Bui
1f2f5dc951 Compute loss rate based on byte count rather than packet count in loss based BWE.
2 main reasons:
1. Packet sizes are much different thus a lost audio packet should not be treated similar to a lost video packet. In low bandwidth/traffic policing scenario, the number of send packet is few, thus the computed loss can be imprecise.

2. Given a candidate bandwidth estimate, the objective function (how good the candidate is) is computed by recomputing loss rate = send rate/estimate bandwith + inherent loss. It means the objective function is byte based rather than packet based.

Potential risk: the current algorithm params are tuned based on packet count, thus it might not work with byte count, which is much higher than packet count.

The change is under field trial and disabled by default.

Bug: webrtc:12707
Change-Id: I8b832e7920d2b4cadcd4a072b3a4d4f26a213a20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325065
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41013}
2023-10-26 09:32:27 +00:00
Philipp Hancke
0bace22a0b Expose video mimeType for insertable streams
which allows determining what codec (data format) is used.
Chromium CL:
  https://chromium-review.googlesource.com/c/chromium/src/+/4941907

Split from
  https://webrtc-review.googlesource.com/c/src/+/318283
to reduce CL size and avoid audio woes.

BUG=webrtc:15579

Change-Id: I404107af526df3009c16d2a6148784fe87dfa807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323721
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41007}
2023-10-25 16:01:32 +00:00
Guy Hershenbaum
a1714f3e92 Fix usages of RTC_DCHECK to GTEST macros to ensure tests pass in release builds as well
Using RTC_DCHECK for test validation is wrong to begin with (gets
compiled out in non-debug builds, which measn we may miss validations),
but becomes extra problematic when we include code with side-effects
inside the DCHECK, which results in release-build tests having a
different flow than intended

Bug: webrtc:15572
Change-Id: I89d5b55f903b9d93fe4a929548d1b9fcde8941be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323182
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41005}
2023-10-25 09:32:28 +00:00
henrika
992d708e8e Improves comments for ShouldBeCapturable
Bug: webrtc:1314868
Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40994}
2023-10-23 17:07:49 +00:00
Sergey Silkin
50e2054c5b Move setting single spatial layer bitrates to GetVp9SvcConfig
Before this change bitrate limits for VP9 single spatial layer case were set in VideoCodecInitializer. Move this logic to GetVp9SvcConfig. This simplifies replication of WebRTC behaviour in codec level tests. The similar AV1 logic sits in SetAv1SvcConfig, not VideoCodecInitializer.

Bug: webrtc:14852
Change-Id: Ie7202ec880d0e4b903e7265721eeef9b3920f21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324286
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40992}
2023-10-23 14:10:21 +00:00
Diep Bui
75a131f39c Introduce hold duration in loss based BWE.
The initial hold duration is 300ms.

Whenever it enters kDecreasing state, it will double the current hold duration. The hold duration will be reset as soon as the delay based estimate works, e.g. the state is kDelayBased to avoid getting stuck at low bitrate.

Bug: webrtc:12707
Change-Id: I3906ff80b071ba3eb6274b012fb31922f4cbc7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324304
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40991}
2023-10-23 14:09:17 +00:00
Per K
32f6c6e8b9 Use instant upper bound as LossBased candidate in ALR
Addes field trial UpperBoundCandidateInAlr to LossBasedBweV2. If an
instant upper bound exist in ALR that are lower than current estimate,
use it as a candidate.

Bug: webrtc:12707
Change-Id: I55595c7225c4289e1bc4edde9d9576e0443d3dce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324220
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40986}
2023-10-23 08:21:59 +00:00
Per K
adeda8214c Add field trial to LossbasedBwe2 to use padding when increasing BWE
UsePadding - signals to GoogCC that padding should be used to fill up to
BWE while BWE is ramping up.

Bug: webrtc:12707
Change-Id: I7b4922dff3a83da370c50c567050bfa748190b40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324160
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40979}
2023-10-20 15:29:26 +00:00
Per K
af7b785f02 Ensure LossBased BWE do not decrease due to acked bitrate
Ensure acked bitrate is not used for lower loss based estimate if
estimate improve.

Ensure LossBasedBweV2 is in state DelayBased if reached max rate.

Bug: webrtc:12707
Change-Id: I20230b99e0c2b530570e2f2de8ea88179f795c50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324140
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40977}
2023-10-20 10:43:10 +00:00
Per K
ef4c71c204 Change expectation of GoogCCNetworkController::OnNetworkAvailability
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly  notifed after creation that network is not writable.

Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
2023-10-19 17:34:42 +00:00
Byoungchan Lee
11376fb992 Reset H.264 SVC Controller on key frame
Sometimes OpenH264 returns a key frame even though we have not
requested one. However, SVC controller does not know about this
and will not reset its state. Since we are comparing expected tid
from SVC controller with actual tid from OpenH264, and drop frames
if they do not match, that causes a missing frame.

This CL resets the SVC controller state on key frames, ensuring
that it accurately maintains its state and does not drop frames.
Also, changes the message of the error log to be more descriptive.
Now, it will print the expected tid and actual tid.

Bug: webrtc:14877
Change-Id: I6c9e7532b2478773f03e5707bf7a1ca56e4f7b99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40972}
2023-10-19 09:51:14 +00:00
henrika
2bf3620e13 Avoids spamming WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult with FrameDropped
Without this change a FrameDropped sample will be added to
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult at the
current capture rate as long as a captured window is minimized.

Bug: webrtc:1314868
Change-Id: I9b68675486642e7ca25674df689c207ac94a206e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323882
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40969}
2023-10-18 17:29:04 +00:00
Diep Bui
fe02681809 Remove unused loss based param.
Bug: webrtc:12707
Change-Id: Ie6f8eac23a4fb2fbd648b2a213319af508c40230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324045
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40967}
2023-10-18 15:48:33 +00:00
Diep Bui
4f25aa7963 Fix loss based BWE state.
The state should be computed from the actual estimate rather than the best estimate candidate. The fix is NOT under field trial.

And some other cleanup:
1. Loss based result will be computed in UpdateBandwidthEstimate method. Currently it is re-computed in GetLossBasedResult.
2. Rename current_estimate to current_best_estimate to avoid misunderstanding that current_estimate is the `final estimate`. The final estimate is computed by applying lower and upper bound on current_best_estimate
3. Remove current_state_. The state is stored directly in loss_based_result_.


Bug: webrtc:12707
Change-Id: Ie612845f907b9e6333fbd8249ddc9b93ad9f8042
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324022
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40964}
2023-10-18 14:38:25 +00:00
Per K
1a22983098 Allow GoogCC to send padding if BWE is loss limited
This will be used in an experiment to ramp up BWE when BWE is reduced
due to loss.

Bug: webrtc:12707
Change-Id: I3b78f9dd3fe8ef9f94a9616640ffb8b2225e161e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324042
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40961}
2023-10-18 12:21:23 +00:00
Diep Bui
8ef094f66a Use acked bitrate as lower bound of loss based BWE.
This cl/ makes sure that the estimate cannot go lower than a factor of acked bitrate. The current flag LowerBoundByAckedRateFactor is set to 0, means we dont use it.


Bug: webrtc:12707
Change-Id: I75d5881f0b85a374af3f7039b82c71aee97fb7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323881
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40958}
2023-10-18 09:20:29 +00:00
Per K
8e18e2e085 Default enable WebRTC-Bwe-LimitProbesLowerThanThroughputEstimate
This ensure probe results can not be lower than 85%  percentage of the
acked bitrate.

Bug: webrtc:11498
Change-Id: I501eeb84f7a049140c45c89e7de7e8080c13f94d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324040
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40957}
2023-10-18 09:19:26 +00:00
Diep Bui
f1d417eee5 Clean up loss_based_bwe_v2_unittest and add flag MinNumObservations.
MinNumObservations is set to 3 per default as loss based BWE should not be ready if it has few feedbacks. We use a flag, rather than a const since we want to customize it for our unit tests, which often have 1-2 packet feedbacks only, and customize it later in prod if necessary.

Bug: webrtc:12707
Change-Id: Id1cd21aaf6137996de2e51cb5e33fc2a4bb07d8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40952}
2023-10-17 14:04:43 +00:00
Danil Chapovalov
c2994790a1 Throttle 'Very high pacing rate' log message
By producing new message only when new max is 10% larger than the previous max.

Bug: b/305042040
Change-Id: Id85784939f944de8115b881471b02214c34b3043
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323841
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40950}
2023-10-17 13:01:18 +00:00
Per K
7c612c3074 Default dont probe when BWE estimators detects a limit
Cleanup field trials for not probing when BWE limited due to high RTT,
loss.

Bug: webrtc:14754, webrtc:12707
Change-Id: Ib664784e321d9284d842ea42a0dd1d8361000f20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323640
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40949}
2023-10-17 11:48:32 +00:00
Per Kjellander
89fab060e7 Reland "Remove Probe and Trendline integration from LossbasedBwe"
This reverts commit be511490b7.

Reason for revert: Test reland to investigate if this was actually causing AudioMixer tests to fail

Original change's description:
> Revert "Remove Probe and Trendline integration from LossbasedBwe"
>
> This reverts commit 9b3eea8b7c.
>
> Reason for revert: might cause upstream breakages
>
> Original change's description:
> > Remove Probe and Trendline integration from LossbasedBwe
> >
> > These features are not in use.
> >
> > Bug: webrtc:12707
> > Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Reviewed-by: Diep Bui <diepbp@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40938}
>
> Bug: webrtc:12707
> Change-Id: I040b25ea8b4e4bf4cbc7cc91c1cd19d6fcfb5ebb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323680
> Owners-Override: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40945}

Bug: webrtc:12707
Change-Id: I4f47c141eafc85a519f12f6504cf5b444f9aa6ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323760
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40948}
2023-10-17 10:45:35 +00:00
Fredrik Hernqvist
5574afc095 Fix AudioMixer histogram test
If the tests are run in a different order, the test might fail.
We fix this by resetting the histogram data at the start of the test.

Change-Id: I6fb349609842b55f416cf2ec8cd93d0b4328960e
Bug: chromium:1430806
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323801
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Fredrik Hernqvist <fhernqvist@google.com>
Cr-Commit-Position: refs/heads/main@{#40946}
2023-10-17 10:13:54 +00:00
Jeremy Leconte
be511490b7 Revert "Remove Probe and Trendline integration from LossbasedBwe"
This reverts commit 9b3eea8b7c.

Reason for revert: might cause upstream breakages

Original change's description:
> Remove Probe and Trendline integration from LossbasedBwe
>
> These features are not in use.
>
> Bug: webrtc:12707
> Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40938}

Bug: webrtc:12707
Change-Id: I040b25ea8b4e4bf4cbc7cc91c1cd19d6fcfb5ebb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323680
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40945}
2023-10-17 07:20:43 +00:00
Per K
9b3eea8b7c Remove Probe and Trendline integration from LossbasedBwe
These features are not in use.

Bug: webrtc:12707
Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40938}
2023-10-16 13:11:20 +00:00
Diep Bui
9f9b8e0b88 Default enable NotUseAckedBitrateInAlr in loss basd bwe.
Its finch/chrome experiment got approved in May.

Bug: webrtc:12707
Change-Id: I843dece38f32e844285b71575f6a04b63865f1b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323600
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40937}
2023-10-16 11:25:06 +00:00
Dor Hen
6113e199ff Replace RTC_DCHECK with EXPECT_TRUE in time estimator UT code
Replacing RTC_DCHECK code with EXPECT_TRUE in the remote ntp time estimator unittest code.
This to prevent test failures when building and testing in non-debug mode.

Bug: webrtc:15572
Change-Id: I372fcd6ee29a4ddc07d6b27ddd492dcea13d399f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323181
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40936}
2023-10-16 09:42:19 +00:00
henrika
5f78ed6eaf Minor change in comment for use of an IGraphicsCaptureSession3 API
Makes it more clear that a certain API is only supported in Windows 11.

Bug: webrtc:15451
Change-Id: Ic3abfb2cbf0e30f9cb722ac843876f41279bf200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323161
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40931}
2023-10-14 15:20:11 +00:00
Per K
0b554e7004 Upper limit pacer send bursts to about 63Kbyte
The purpose is to ensure send socket buffers are not overfilled at high
pacing rates.

Bug: chromium:1354491
Change-Id: Ic6f473080292f84a2a099b85fb5817f7e14e7355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323000
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40911}
2023-10-11 14:22:44 +00:00
Philipp Hancke
dde1cb6212 Add note about two-byte extension to VLA docs
since the extension can be too large to fit the 16 bytes available
to one-byte extensions
  https://www.rfc-editor.org/rfc/rfc8285#section-4.2
when including the width and height fields.
Also document when those fields are sent.

BUG=webrtc:12000

Change-Id: If17f57d40c0bde9b060f223c548e407d6c124b82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40910}
2023-10-11 11:20:19 +00:00
Jeremy Leconte
1a8d5292c2 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 19/inf
Convert most field trials used in PCLF tests.

Change-Id: I26c0c4b1164bb0870aae1a488942cde888cb459d
Bug: webrtc:10335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322703
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40909}
2023-10-11 11:09:35 +00:00
Danil Chapovalov
f2443a7971 Replace WebRTC-QuickPerfTest field trial with a flag
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.

Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
2023-10-10 08:59:10 +00:00
Jan Grulich
01932ebaec PipeWire capturer: make restore tokens re-usable more than one time
Do not automatically remove all tokens once we attempt to use them. This
mitigates an issue with Google Meet where an additional instance of a
DesktopCapturer is created and destroyed right away, taking away the
token we would use otherwise. Also save the token under same SourceId
once we get a new (but could be same) token from the restored session.

Bug: webrtc:15544
Change-Id: I565b22f5bf6a4d8a3b7d6d757f9c1046c7a0557d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322621
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40892}
2023-10-09 19:08:41 +00:00
Sergey Silkin
a4b2b95f99 Restrict ARM-specific VP8/VP9/AV1 settings to mobile platforms
ARM-specific settings were intended to be used on mobile ARM devices which may not be powerful enough. But the settings were also applied to ARM-based Macs. This changes restricts ARM-specific settings to Android and iOS platforms.

Bug: none
Change-Id: I68764b4c0679db07399bba5923f4a6be89c5ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321861
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40884}
2023-10-06 15:10:04 +00:00
Erik Språng
d7703d9505 Reland "Add mitigation for very long frame drop gaps with vp8"
This is a reland of commit 0d4b350006

Patchset 1 is the original CL. Patchset 2 contains a small tweak of the target bitrate in the unit test, in order to make in less susceptible to flakiness on runtime environments running a slightly different libvpx.

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I096b7d952286f7f53852d1ca70aea398b2747784
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322540
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40874}
2023-10-05 13:29:23 +00:00
Erik Språng
bada9dd30c Revert "Add mitigation for very long frame drop gaps with vp8"
This reverts commit 0d4b350006.

Reason for revert: Temporary revert to adjust thresholds for internal test

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I920661835f0e59c0543794222e42b5643017db24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322443
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40871}
2023-10-05 11:00:47 +00:00
Erik Språng
0d4b350006 Add mitigation for very long frame drop gaps with vp8
Bug: webrtc:15530
Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40866}
2023-10-04 14:22:31 +00:00
Sergey Sukhanov
4b84f01fe2 Change the type of PacedPacketInfo::send_bitrate_bps from int to strongly-typed DataRate.
Bug: webrtc:15532
Change-Id: I84a6b9860d582d68beccdcfde4a12923b2cdbe8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322181
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40865}
2023-10-04 14:20:22 +00:00
Danil Chapovalov
34ec5c3f20 Clear PacketBuffer on large negative jumps at the start of the video stream
PacketBuffer is not designed to store wide range of the rtp sequence numbers

Bug: webrtc:15508
Change-Id: I62b19ba2896a667d795a41c38a60f55ee3f60566
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321845
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@google.com>
Cr-Commit-Position: refs/heads/main@{#40839}
2023-09-29 08:56:15 +00:00
Björn Terelius
98e71f57ea Subtract an additional 5kbps of the bitrate when backing off.
Traditionally, we'd back off to 85% of the measured throughput in response to an overuse. However, this backoff doesn't appear to be sufficient to drain the queues in some low-bitrate scenarios, and the problem has gotten a bit worse with the RobustThroughputEstimator. (The new estimate looks more stable. The old estimator had more variation, the lowest points were lower, causing backoffs to lower rates.)

With this change, we back off to 0.85*thoughput-5kbps. The difference is negligible except at low bitrates.

Bug: webrtc:13402,b/298636540
Change-Id: I53328953c056b8ad77f6c7561d6017f171b2dfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321701
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40827}
2023-09-28 09:36:36 +00:00
Danil Chapovalov
2d508f10d3 Deprecate old names for EncodedImage::RtpTimestamp accessor and setter
Replace remaining webrtc usage of the deprecated names.

Bug: webrtc:9378
Change-Id: Ie5bd2d3eaf68316e7c827fc35c7c7d8e2eadeb9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321584
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40824}
2023-09-28 07:29:22 +00:00
Rashad Sookram
6504b2a0f9
Add Rust_setIncomingAudioMuted 2023-09-27 12:16:54 -04:00
Ying Wang
78c119cbb3 Remove check on last_packet_received_time_ as it's no longer used.
Bug: webrtc:15377
Change-Id: Ia8181ae5d546e6d6c0e97ef1daf5ab90d1b6a0aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40807}
2023-09-26 03:21:34 +00:00
Diep Bui
29d4a013bc Reland: use loss based bwe v2 in the start phase.
Original CL: https://webrtc-review.googlesource.com/c/src/+/320840

Bug: webrtc:12707
Change-Id: Iff3a0c76c26aeb7cb0ac24c1f7aab3529c4a1659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321420
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40799}
2023-09-25 13:26:34 +00:00
Artem Titov
ba97eec127 Add string_view overload for Wrap method
FileWrapper API is WebRTC private, so exposing absl::string_view overload for thrid-party users.

Bug: b/301228802
Change-Id: Id81775c8078e61eafe9bee53a4cba6ac476b11d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321460
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40798}
2023-09-25 10:55:05 +00:00
Björn Terelius
b4d4bbcebd Revert "Clean up last_packet_received_time_ as it's no longer used."
This reverts commit 2f4bc64166.

Reason for revert: Breaks downstream test

Original change's description:
> Clean up last_packet_received_time_ as it's no longer used.
>
> Bug: webrtc:15377
> Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Ying Wang <yinwa@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40792}

Bug: webrtc:15377
Change-Id: Ifa57671cc479cdd86f543c4edc236221beb76f90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321340
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40797}
2023-09-25 08:49:53 +00:00
Danil Chapovalov
9c58483b5a Rename EncodedImage property Timetamp to RtpTimestamp
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp

Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
2023-09-24 20:06:48 +00:00
Johannes Kron
bbf27e0081 Remove NSApplicationActivateIgnoringOtherApps
NSApplicationActivateIgnoringOtherApps is about to be deprecated.
The default behavior is good enough.

Tested on Chrome using https://wicg.github.io/conditional-focus/demo/

Bug: webrtc:15511
Change-Id: I1f59aea3d4e7c4942d17ee5c4f1b6c2d398016ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321080
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40795}
2023-09-24 13:55:12 +00:00
Ying Wang
2f4bc64166 Clean up last_packet_received_time_ as it's no longer used.
Bug: webrtc:15377
Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40792}
2023-09-23 00:03:11 +00:00
Diep Bui
4aa2b40ffe Revert "Use loss based bwe v2 in the start phase."
This reverts commit b6c7ddd6a1.

Reason for revert: broken unit test

Original change's description:
> Use loss based bwe v2 in the start phase.
>
> TESTED=manual before:screen/ANtkMApoYczA2V5; after:screen/9kBoSvYKzKZR4sK
>
> Bug: webrtc:12707
> Change-Id: Ic156e363625c4b7476011059f3cd95641972091c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320840
> Commit-Queue: Diep Bui <diepbp@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40789}

Bug: webrtc:12707
Change-Id: Ibde45436934707b8e0084aa496dc249bc1c78ab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321180
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40790}
2023-09-22 22:51:53 +00:00
Diep Bui
b6c7ddd6a1 Use loss based bwe v2 in the start phase.
TESTED=manual before:screen/ANtkMApoYczA2V5; after:screen/9kBoSvYKzKZR4sK

Bug: webrtc:12707
Change-Id: Ic156e363625c4b7476011059f3cd95641972091c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320840
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40789}
2023-09-22 10:53:34 +00:00
Diep Bui
1db39801d3 Remove upper_link_capacity from loss_based_bwe_v2.
Bug: webrtc:12707
Change-Id: I7909c4ef47239978eb26ad5b9644595e4a415a81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321121
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40787}
2023-09-22 10:33:14 +00:00
Harald Alvestrand
863427e2c3 [Merge to 116] CHECK against overwrites in send_modules_map_
(cherry picked from commit 9d8fb97b3c)

No-try: true
Bug: chromium:1477075
Change-Id: Ia05a868bfab9e99ef66704e8d6bce516a7a43b0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318440
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Original-Commit-Position: refs/heads/main@{#40673}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319320
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#7}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-09-21 10:48:34 -04:00
Diep Bui
7ee64bd9dc Remove the upper link capacity usage in the loss based bwe.
A follow up cl/ is to remove passing upper link capacity from goog_cc to loss_based_bwe_v2.

Bug: webrtc:12707
Change-Id: I45af8ca6e8ba185700d0b7eb57004d2b61edeb9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40780}
2023-09-21 07:43:49 +00:00
Avi Drissman
46da472f82 Revert "mac: Work around an inccorect availability annotation in the 13.3 SDK"
This reverts commit 0f87b38535.

This is not needed with the macOS 14 SDK, which has the fix, and which
was landed in https://crrev.com/c/4875713.

Bug: chromium:1484363, chromium:1431897
Change-Id: I1e019ce71b90333d5d1333a3cf8bb510a3dbd212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320820
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40777}
2023-09-20 12:50:43 +00:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
Youfa
f8c70c9c34 fix: Handle out-of-range device index after GetDevicesInfo
When the specified device was not found in GetDevicesInfo,
SetPlayoutDevice/SetRecordingDevice will never return a (-1) error.

Bug: None
Change-Id: I9ac71cf72f7876c1c54ee593f184aa4007dba22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320500
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40768}
2023-09-19 12:13:39 +00:00
Michael Froman
3e1484e280 Check ConvertToI420 result for all errors in VideoCaptureImpl::IncomingFrame
Bug: webrtc:15415
Change-Id: Ia303e1803d8238c4db68c7dc8d207b0ccfccadba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316343
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40762}
2023-09-18 15:15:34 +00:00
Danil Chapovalov
3aa951a7c6 Delete SendDelayObserver interface
send delay is now measured through  SendPacketObserver interface

Bug: None
Change-Id: I0dc3de1522e2824d9431d7e3a3dc524588687dda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319500
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40755}
2023-09-15 14:59:23 +00:00
Per K
e0083d4804 lower limit cap of probe to max of current estimate and link capacity
The purpose is to not allow an initial low link capacity estimate to reduce the current estimate.
Only delay overuse detection , low probe results or  a loss event can
reduce the estimate.

Bug: webrtc:14392
Change-Id: Ib1618347f2c7681e3bd65d85ee687dec3cd67c97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320380
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40751}
2023-09-15 08:20:12 +00:00
Björn Terelius
4f8ccc3c60 Ensure the sequence number is initialized in DelayBasedBweTest
The sequence number is generally not used for the estimation,
but may be used as a tie-breaker when ordering packet feedbacks.

Bug: b/299667054
Change-Id: I52a5145c889c8f6924838667cc267b1cd9565f7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320240
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40749}
2023-09-14 12:58:58 +00:00
Olov Brändström
0efb8323d5 Method for converting q32 to TimeDelta in capture clock offset updater
In change https://webrtc-review.googlesource.com/c/src/+/319961, I changed a error. Also the same code will be added for video to enable Glass 2 Glass metric for Android. To me it make sense to add this method, and then change the audio code and video code to use it.

Bug: None
Change-Id: Id5d38c3bb8266213a93e67ceb82e88d65f29de53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#40745}
2023-09-13 18:37:22 +00:00
philipel
31718d7ce2 Reland "Add option to disable quality scaling for AV1."
This reverts commit 83102d3907.

Reason for revert: reland with fix

Original change's description:
> Revert "Add option to disable quality scaling for AV1."
>
> This reverts commit 446dbc66fd.
>
> Reason for revert: downstream break
>
> Original change's description:
> > Add option to disable quality scaling for AV1.
> >
> > The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40709}
>
> Bug: b/295129711
> Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40742}

Bug: b/295129711
Change-Id: Iab4846c2cd6074f50a3ebe9551432d449243b5d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40743}
2023-09-13 15:19:36 +00:00
Philip Eliasson
83102d3907 Revert "Add option to disable quality scaling for AV1."
This reverts commit 446dbc66fd.

Reason for revert: downstream break

Original change's description:
> Add option to disable quality scaling for AV1.
>
> The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40709}

Bug: b/295129711
Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40742}
2023-09-13 12:21:31 +00:00
Danil Chapovalov
10e5724fe9 Delete deprecated variants of RTPSenderAudio::SendAudio
Bug: webrtc:13757
Change-Id: I402a31c847ca7ffe0ef20a0046959ec50c60e3ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319582
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40740}
2023-09-12 15:30:36 +00:00
philipel
19ff1ad237 Reland "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit 030c6ff43f.

Reason for revert: reland with fix

Original change's description:
> Revert "Always use AV1 specific bitrate limits when spatial layers are used."
>
> This reverts commit d2d165d47c.
>
> Reason for revert: All the regressions!
>
> Original change's description:
> > Always use AV1 specific bitrate limits when spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> > Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40719}
>
> Bug: b/295129711
> Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40730}

Bug: b/295129711
Change-Id: I5fe84184d3f3780fdc4e9c1d43c4989d333d44a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319881
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40739}
2023-09-12 13:00:19 +00:00
Joachim Reiersen
ab9535c098 Use single packet limit when all fragments end up in one H.264 packet
Update RtpPacketizerH264::PacketizeStapA to use
single_packet_reduction_len when all fragments end up in one H.264
packet.

Previous code was using first_packet_reduction_len +
last_packet_reduction_len for this case, which can cause an occasional
RTC_CHECK crash in RtpPacketizerH264::NextAggregatePacket due to
exceeding the available payload capacity of an RTP packet.

Bug: webrtc:15477
Change-Id: Iba1564a6a29618bef22f19d82aba938420994b23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319645
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40737}
2023-09-12 11:53:34 +00:00
Michael Froman
90fb11e806 Fix improper buffer size in call to rtc::strcpyn
rtc::strcpyn second param should be the size of the destination buffer,
not the size of the source string.  The result is that the final character
(usually a trailing directory path separator) is lost during the copy.
This has been masked because FormFileName helpfully adds a trailing path
separator if one is missing.

BUG=webrtc:15441

Change-Id: I992e69cad86a7e8bc2057ec629063f34c75fe75f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317502
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40736}
2023-09-12 11:40:07 +00:00
Danil Chapovalov
378fb28621 Propagate OnSendPacket even if transport sequence number is not registered
To allow to calculate send delay with that callback

Bug: None
Change-Id: I0fe1ffd42b62c99bd01670e583584511c34277db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319563
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40731}
2023-09-11 13:16:30 +00:00
Philip Eliasson
030c6ff43f Revert "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit d2d165d47c.

Reason for revert: All the regressions!

Original change's description:
> Always use AV1 specific bitrate limits when spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40719}

Bug: b/295129711
Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40730}
2023-09-11 11:57:39 +00:00
henrika
66b7275561 Disables yellow frame of captured object for WGC.
Only has an effect on Windows versions higher than 2104 (10.0.20348.0).

Bug: webrtc:15451
Change-Id: I3ca48c88a6c2b9b87d43805fcb2ade444cd90480
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318060
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40721}
2023-09-08 10:07:18 +00:00
philipel
d2d165d47c Always use AV1 specific bitrate limits when spatial layers are used.
Bug: b/295129711
Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40719}
2023-09-08 09:02:11 +00:00
Philipp Hancke
8602f604e0 Reland "rtp sender: don't send BYE on deactivating streams"
This is a reland of commit a22c2a0c58
after systems depending on this have been fixed.

Original change's description:
> rtp sender: don't send BYE on deactivating streams
>
> as this breaks RTCP assumptions about SSRCs being no longer
> active as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.6
>
> This should not be sent in reaction to temporarily disabling
> a stream via RTCRtpParameters.active as this does not mean that
> the participant is leaving the session as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
> and does not indicate end of participation as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.1
> which stipulates BYE should be the last packet sent from this SSRC.
>
> BUG=webrtc:11082
>
> Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38059}

Bug: webrtc:11082
Change-Id: Iad8b503b3101d1e684a4da2d1547b879e77b85dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40716}
2023-09-07 13:25:25 +00:00
philipel
8fd09016e6 Reduce number of spatial layers depending on input resolution for AV1
Bug: b/295129711
Change-Id: If54562d6e453209da9f358bbdb2909662e4ab873
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319380
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40713}
2023-09-07 10:29:47 +00:00
Johannes Kron
0e4a9bcd6d Export GetWindowList(...)
These two functions contain complicated logic that will be used as
a fallback in Chromium if the new macOS picker code does not work
as intended.

Bug: chromium:1478172
Change-Id: I5f2878c5a8da38d59aa42ec1358398e3c921b65c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319260
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40711}
2023-09-06 21:31:45 +00:00
Björn Terelius
c4a205c7fa Clean up includes in goog_cc/
Bug: None
Change-Id: I5388bc018d7ddd285d154436b5fc52a15469a97d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40710}
2023-09-06 12:40:36 +00:00
philipel
446dbc66fd Add option to disable quality scaling for AV1.
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.

Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
2023-09-06 12:37:22 +00:00
Robert Mader
dc4c019c62 Video Capture PipeWire: Implement camera rotation support
Support the Pipewire videotransform meta via the already existing shared
infrastructure. This is needed for mobile devices which often have a 90
degree rotated camera - which is likely the reason there is already
support in the shared code paths.

Bug: webrtc:15464
Change-Id: I15223055d8675502ae326d270ebd2debbcfbfa50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318641
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40708}
2023-09-06 11:55:58 +00:00
Robert Mader
a717c7ada8 Video Capture PipeWire: Filter out non-camera nodes
This can be helpful in various situations, such as debugging with an
unrestricted Pipewire socket or for downstream projects like
B2G/Capyloon. Additionally it will help once we move from the camera
portal to the more generic device portal.

Original patch by Fabrice Desré <fabrice@desre.org>

Bug: webrtc:15464
Change-Id: Iae6802f242d68244bca85947cb15ef3eee923ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318642
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40706}
2023-09-06 10:55:36 +00:00
Danil Chapovalov
85c05a8a17 Update RemoteBitreateEstimatorAbsSendTime to use BitrateTracker
BitrateTracker uses same implementation as RateStatistics, but provides api using Timestamp and DataRate types instead of plain numbers

Bug: webrtc:13756
Change-Id: Ie37fa58ede7590f870ec4376a64e7cf2c94431d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318841
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40697}
2023-09-05 09:50:38 +00:00
Danil Chapovalov
4c556219e5 Cleanup RTPSenderAudio::SendAudio
Combine all parameters into single struct so that it is easier to add and remove optional parameters
Use Timestamp type instad of plain int to represent capture time
Use rtc::ArrayView instead of pointer+size to represent payload
Merge passing audio level into send function.

Bug: webrtc:13757, webrtc:14870
Change-Id: I0386b710eb99b864334d61235add9abcde9bc69d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317442
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40688}
2023-09-04 11:27:42 +00:00
Danil Chapovalov
4c420f96dd Cleanup RemoteBitreateEstimatorSingleStream to use unit types
Use Timestamp,TimeDelta, and DataRate types instead of plain integer types.

Bug: webrtc:13756
Change-Id: I2a12f4abeeaa653dbd9534c297dbb72db63b012b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314502
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40684}
2023-09-04 00:40:20 +00:00
Mirko Bonadei
aa48369679 Remove excessive logs from ADM's GetPlayoutUnderrunCount.
Bug: b/298579155
Change-Id: If98a27934feba58c32dfa9a965f99fe27a11361e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318621
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40680}
2023-09-01 14:34:05 +00:00
Harald Alvestrand
9d8fb97b3c CHECK against overwrites in send_modules_map_
No-try: true
Bug: chromium:1477075
Change-Id: Ia05a868bfab9e99ef66704e8d6bce516a7a43b0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318440
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40673}
2023-08-31 14:00:04 +00:00
Michael Klingbeil
9a9b462e16 Add Opus FEC options to rtp_encode tool
Bug: None
Change-Id: I7be70951c20069207963b0fa43564c4008eda870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40668}
2023-08-31 06:11:46 +00:00
Per Kjellander
0fa90c3878 Reland "Per default enable RobustThroughputEstimator"
This reverts commit 4ef01d41b7.

Reason for revert: Downstream projects fixed

Original change's description:
> Revert "Per default enable RobustThroughputEstimator"
>
> This reverts commit d017b1e306.
>
> Reason for revert: Breaks downstream test.
>
> Original change's description:
> > Per default enable RobustThroughputEstimator
> >
> > Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.
> >
> >
> > Bug: webrtc:13402 chromium:1411666
> > Change-Id: I38c309f74e8e1322602196354545b3a465866263
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318040
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40653}
>
> Bug: webrtc:13402 chromium:1411666 b/298001595
> Change-Id: Ic68ef954f462021e991f3183b94d85eb6a44fac0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318141
> 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@{#40658}

Bug: webrtc:13402 chromium:1411666 b/298001595
Change-Id: I73f0e9b0e2f209b3833b38241e96ef8f7b3f1e5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318282
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40664}
2023-08-30 14:30:44 +00:00
Tony Herre
55b593fb6b Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.

Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
2023-08-30 10:38:35 +00:00
Johannes Kron
d23d450a50 Make DesktopFrame::CreateFromCGImage() accessible for external targets
The build target that CreateFromCGImage() belongs to, desktop_capture_obj
is not visible externally. A utility header is created to make it accessible.

Bug: chromium:1471931
Change-Id: Ie40f39114d277dc4b62fe2ce95a6b0c7b61a3943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318123
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40659}
2023-08-30 08:09:46 +00:00
Mirko Bonadei
4ef01d41b7 Revert "Per default enable RobustThroughputEstimator"
This reverts commit d017b1e306.

Reason for revert: Breaks downstream test.

Original change's description:
> Per default enable RobustThroughputEstimator
>
> Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.
>
>
> Bug: webrtc:13402 chromium:1411666
> Change-Id: I38c309f74e8e1322602196354545b3a465866263
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318040
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40653}

Bug: webrtc:13402 chromium:1411666 b/298001595
Change-Id: Ic68ef954f462021e991f3183b94d85eb6a44fac0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318141
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@{#40658}
2023-08-29 18:34:36 +00:00
Per K
d017b1e306 Per default enable RobustThroughputEstimator
Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.


Bug: webrtc:13402 chromium:1411666
Change-Id: I38c309f74e8e1322602196354545b3a465866263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318040
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40653}
2023-08-29 11:44:20 +00:00
Danil Chapovalov
f53597140f In RtpSource represent time with Timestamp type instead of int64_t
Bug: webrtc:13757
Change-Id: I5d7da9c9aee489e4b57d361de174c59713cb2b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40650}
2023-08-29 10:05:03 +00:00
Per K
a041a97f63 Reset RobustThroughputEstimator if recv timestamp jump backwards
Start using RobustThoughputEstimator in DelayBasedBwe test in preparation for making it default.
Experiments has not showed significant metric changes. However, simulations has showed that RobustThroughputEstimator better follow the actually receive rate better. Especially during bursts of sent packets. Code is also simpler.

Bug: webrtc:13402 chromium:1411666
Change-Id: I83cfa1fc15486982b18cc22fbd0752ff59c1c1b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317600
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40644}
2023-08-28 17:40:30 +00:00
Tony Herre
5f14f9e6ed Remove VCMEncodedFrame from webrtc::EncodedFrame inheritance
Remove VCMEncodedFrame from the inheritance chain of EncodedFrames by
- moving getters for EncodedImage fields up to EncodedImage
- copying other non-deprecated fields & Methods from VCMEncodedFrame over to EncodedFrame
- Removing EncodedFrame's inheritance of VCMEncodedFrame

We leave VCMEncodedFrame as part of the (near) deprecated
VideoCodingModule code. The only place which needs to accept either is
in the generic decoder.

Bug: webrtc:9378, b:296992877
Change-Id: I60706aebbb6eacc7fd4b35ec90cc903efdbe14c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317160
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40639}
2023-08-28 11:46:48 +00:00
Per K
b5dedfc856 In AimdRateControl, add trial to use current bitrate as min upper limit
This is to ensure that a bad NetworkState estimate can not decrease BWE
unless an delay BW overuse has been detected.

Bug: webrtc:10489
Change-Id: Ic3a516345999eeba814200c2e295a19b347b2eb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317800
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@google.com>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40628}
2023-08-25 15:29:11 +00:00
Jordan Rose
706b3469c6 Update the hardcoded PulseAudio device name to "Signal Calling" 2023-08-23 12:32:13 -07:00
Jim Gustafson
7da0a87124
Add more audio control and safe defaults 2023-08-23 10:42:30 -07:00
Danil Chapovalov
7084e1b6d9 In VideoPlayoutDelay delete access to integer representation of min/max values
Bug: webrtc:13756
Change-Id: I1a81c25e5e3fab68a44e94a5ab93e8184c824683
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316864
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40612}
2023-08-23 16:14:26 +00:00
Danil Chapovalov
093a939572 Fix includes in rtp_header_extensions.cc
Remove unused includes, including a TODO that is now irrelevant
Add missing includes
Remove definitinon for constexpr class constants as not needed since c++17 to avoid adding include for RTPExtensionType

Bug: webrtc:10198
Change-Id: I5f0ed15c5a9020d8b2e58bdfa213bb38eb59a840
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317443
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40611}
2023-08-23 15:46:06 +00:00
Joachim Reiersen
c08df4bdca Remove DCHECK when processing StapA in h264_sps_pps_tracker.cc
When GenericFrameDescriptor or DependencyDescriptor RTP extensions are used, we may receive multiple consecutive StapA packets where only the first packet has is_first_packet_in_frame set. The previous code assumed that all StapA had is_first_packet_in_frame = true. Per discussion on the attached bug, removing the DCHECK is OK.

Bug: webrtc:15155
Change-Id: I6348740eac7d70bca2b7541721aaa7e2b5e5a970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316941
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40608}
2023-08-23 12:44:06 +00:00
Jesús de Vicente Peña
1a4cf30047 Avoiding to increase an iterator when the result can be larger than their container end.
Bug: webrtc:15438
Change-Id: I0d75436bc845590c76466bde7007e921f842a9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317320
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40605}
2023-08-23 08:11:33 +00:00
Markus Handell
411639ede8 Introduce a frame dumping encoder wrapper.
Expose new function MaybeCreateFrameDumpingEncoderWrapper that
wraps another passed encoder and dumps its encoded frames out
into a unique IVF file into the directory specified by the
"WebRTC-EncoderDataDumpDirectory" field trial. If the passed
encoder is nullptr, or the field trial is not setup, the function
just returns the passed encoder. The directory specified by the
field trial parameter should be delimited by ';'.

The new function is wired up in VideoStreamEncoder.

Bug: b/296242528
Change-Id: I6143adf899f78fcc03d4239a86c68dcbab483f1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317200
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40600}
2023-08-22 15:45:32 +00:00
henrika
6b7bbe2e33 Adding new WebRTC.Video.GenericDecoder histograms
Goal is to be able to get an improved overview of the distribution
of the total delay.

Bug: None
Change-Id: I0dced53eafd1fb09941590f3706480066c52419b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40597}
2023-08-22 13:24:07 +00:00
Arthur Sonzogni
47faf32287 Add rtc_common_public_deps
When built for chromium, some webrtc implementations are overridden and
are implemented by chrome's "//base". For instance webrtc::Location is
implemented by base::Location. So far so good, the affected targets are
correctly defined in GN to depend on base.

The problem: Most targets in webrtc do not declare correctly their
public_deps. When a public header of a target includes one from its
dependency, the dependency must be a public_deps. The public_deps
instruct GN to forward the capability to use code from the dependency
toward the dependent.

Unfortunately, it is not possible to fix the `public_deps` in webrtc,
because its is disallowed via a presubmit. See:
https://webrtc-review.googlesource.com/c/src/+/30262

WebRTC developers decided not to use `public_deps`, because GN config
are "translated" toward different kind of downstream build system who do
not really support the `public` dependencies concept. Instead WebRTC is
using some "common" configuration applied to all of its targets.

This patch add `rtc_common_public_deps` argument, to let embedders
add the dependencies WebRTC depends on.

Bug: chromium:1467773
Change-Id: I7de43372414a09886fcb07905451e6339c8ecc64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316660
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40595}
2023-08-22 11:32:06 +00:00
Danil Chapovalov
5f3b3db105 Cleanup flexfec03 TODOs and logs to indicate there is no intent to implement additional features there
Bug: None
Change-Id: I774c2356439ee52e73cd70802f28fa5e5b560b8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316925
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40594}
2023-08-22 09:36:43 +00:00
Danil Chapovalov
06717773a5 Move EncodedImage::playout_delay_ to private section of the class
Remove code where integer -1 as delay is used to represent unset value.

Bug: webrtc:13756
Change-Id: I16a01e12c25a09ce21a971c9edabf47af5936662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316923
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40592}
2023-08-22 08:24:37 +00:00
Danil Chapovalov
233165b239 Replace all RTPSender::SendToNetwork with EnqueuePackets
Bug: None
Change-Id: I1bcfbd9c16b329f3aa3f95d8ed61b82131e0da1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316922
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40591}
2023-08-22 06:32:26 +00:00
Danil Chapovalov
c146b5f77b Represent unset VideoPlayoutDelay with nullopt rather than special value
Remove support for setting one limit without another limit
because related rtp header extension doesn't support such values.

Start morphing VideoPlayouDelay into a class and stricter type: add accessors returning TimeDelta

Bug: webrtc:13756
Change-Id: If0dd02620528dc870b015beeff3a8103e04022ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40570}
2023-08-18 13:17:50 +00:00
Danil Chapovalov
31251fa817 Delete deprecated RTPSender::SetCsrcs
Bug: None
Change-Id: I0ce16dc51fa8aa9dcb1f3e96e62f05be11e3cba2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315941
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40566}
2023-08-18 11:50:02 +00:00
Johannes Kron
e5af52e1f2 Make DesktopFrameCGImage::CreateFromCGImage() public
CreateFromCGImage() is needed to be called directly when we move away
from using the deprecated API that is used in CreateForWindow().

Bug: chromium:1471931
Change-Id: I28a2972a2a995103829fd9aff4bc1137a8b424b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315324
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40563}
2023-08-18 01:12:17 +00:00
Philipp Hancke
1e42d83db4 Make VCMReceiveCallback::FrameToRender pure virtual again
after the downstream tests have been updated.

BUG=webrtc:14728

Change-Id: I9cf7eb607f8b26acf985d90625e55bac257a2606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316220
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40557}
2023-08-16 10:44:28 +00:00
Tony Herre
392e4714e7 Remove deprecated TransformableAudioFrameInterface::getHeader() method
Fixed: chromium:1456628
Change-Id: I12ea08070578de846f042c64f2808b55de1603a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315960
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40555}
2023-08-15 16:31:02 +00:00
Harald Alvestrand
d43af9172b Remove internal overrides using old SendRtp and SendRtcp interfaces.
This CL takes away all usages except for Android code.

Low-Coverage-Reason: Refactoring old code
Bug: webrtc:15410
Change-Id: I66bed6a4a2787b4177a82e599b48623ca67cd235
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315940
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40554}
2023-08-15 13:20:21 +00:00
Philipp Hancke
5165743926 Reland "Fix definition of keyframes decoded statistics"
This is a reland of commit 0e37f5ebd4
with backward compability added to allow downstream tests to migrate to the new signature.

Original change's description:
> Fix definition of keyframes decoded statistics
>
> which are defined to be measured after decoding, not before:
>   https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded
>
> BUG=webrtc:14728
>
> Change-Id: I0a83dde278e1ebe8acf787bdac729af369a1ecf8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315520
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40545}

BUG=webrtc:14728

Change-Id: I4cf52bb22ba8244155b4fa8c367b9c0306a77590
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316120
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40553}
2023-08-15 12:09:46 +00:00
Mirko Bonadei
2dbf6e09c1 Revert "Fix definition of keyframes decoded statistics"
This reverts commit 0e37f5ebd4.

Reason for revert: Breaks downstream tests (non backwards compatible change)

Original change's description:
> Fix definition of keyframes decoded statistics
>
> which are defined to be measured after decoding, not before:
>   https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded
>
> BUG=webrtc:14728
>
> Change-Id: I0a83dde278e1ebe8acf787bdac729af369a1ecf8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315520
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40545}

BUG=webrtc:14728
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: Idd31fbe6b7173e4bcdfaabfc1704ec6513e80ebe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315961
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40550}
2023-08-14 17:12:56 +00:00
Markus Handell
ed2ce81f27 RtpSenderEgress: make potential crash more explicit.
Fixed: chromium:1472676
Change-Id: I1701b65e05c13c95392da90e6642e4eb6fe133ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315920
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40548}
2023-08-14 14:54:53 +00:00
Danil Chapovalov
4c17e2dbce Refactor csrcs managment in RtpSender
contributing sources are usually decided per packet, and thus having persistent member for csrcs makes them less natural to use.

Bug: None
Change-Id: I804d58ace574368f8cdd4356a15471110e530744
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291334
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40547}
2023-08-14 13:30:33 +00:00
Andrey Volykhin
6b51e728e6 fec: Skip traversal the list of recovered packets if possible
Do not traverse the list of recovered media packets
if none of them was recovered through FEC recovery procedure.

Bug: None
Change-Id: Ib3aa59c946919fab08f0e20fcf279b1b8032d0e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315320
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Andrei Volykhin <andrey.volykhin@lge.com>
Cr-Commit-Position: refs/heads/main@{#40546}
2023-08-14 13:21:14 +00:00
Philipp Hancke
0e37f5ebd4 Fix definition of keyframes decoded statistics
which are defined to be measured after decoding, not before:
  https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded

BUG=webrtc:14728

Change-Id: I0a83dde278e1ebe8acf787bdac729af369a1ecf8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315520
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40545}
2023-08-14 12:13:38 +00:00
Danil Chapovalov
24e704f148 Cleanup calculating time between RTCP reports
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.

Reland of https://webrtc-review.googlesource.com/c/src/+/315143

Bug: None
Change-Id: I41ce383a2f19d489e4cae0b1bf1f720e0ffdd17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315460
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40538}
2023-08-10 20:40:15 +00:00
Danil Chapovalov
3b75c39d59 Revert "Cleanup calculating time between RTCP reports"
This reverts commit 762f193ca4.

Reason for revert: breaks downstream test

Original change's description:
> Cleanup calculating time between RTCP reports
>
> Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
> Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
> Use more strict types for the calculation to make it clearer.
> Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.
>
> Bug: None
> Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40529}

Bug: None
Change-Id: I8c83013523120a84f236e8efa0d122363e7a228b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315381
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40535}
2023-08-10 14:18:52 +00:00
Danil Chapovalov
490f0b82d7 Cleanup usage of csrcs in RtpSenderVideoFrameTransform
CSRCs are decided on a per frame bases, thus keeping a constant copy of
csrcs inside the rtp sender transform delegate is confusing: when transform delegate is created, csrcs list is always empty.

Bug: None
Change-Id: Id94acc76857a47ad9a1dd8254648ab9cb5d6d31d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311840
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40533}
2023-08-10 10:30:29 +00:00
inaqui-signal
c570368abc Merge branch 'm116' into 5845 2023-08-09 14:40:20 -05:00
Palak Agarwal
86162d94d5 Implement setMetadata for receiver encoded video frames
This change adds a new function to RTPFrameObject to allow setting the
RTPVideoHeader from VideoFrameMetadata.

The setMetadata function in TransformableVideoReceiverFrame disallows
changing anything other than frameID and dependencies.

Change-Id: I74e55ffbe1f426b660c2e243b20358c6a6cc2ffd
Bug: chromium:1464853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314963
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40530}
2023-08-09 10:01:58 +00:00
Danil Chapovalov
762f193ca4 Cleanup calculating time between RTCP reports
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.

Bug: None
Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40529}
2023-08-09 09:14:41 +00:00
Philipp Hancke
240e783d7f Stop using invalid payload type 200 in audio/red unit test
and fix the follow-up mistake in the test

BUG=None

Change-Id: Id7a20769cc1d03dd8154564f948e8138ff8c4e74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40528}
2023-08-09 08:13:52 +00:00
Danil Chapovalov
277fb3cd0e Cleanup RtpSender unittest to use Timestamp instead of plain int
Bug: webrtc:13757
Change-Id: I0893805a8e4bc66c0c6cff232576387c2ee60b8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315182
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@{#40525}
2023-08-08 14:07:45 +00:00
Philipp Hancke
82e5f91a2b audio: fix handling of RED packets where the primary encoding is too large
by falling back to the primary encoding. This can happen with
opus stereo packets at the maximum bitrate which results in
1276 encoded bytes.

BUG=chromium:1470261

Change-Id: I3fd9bb30773963a519bbb5da44fe71db5dec2bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315141
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40524}
2023-08-08 13:40:26 +00:00
Harald Alvestrand
34d82df2ba Use ArrayView versions of SendRtp and SendRtcp
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.

Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
2023-08-07 08:28:48 +00:00
Danil Chapovalov
ebb2bfd239 Delete deprecated member CodecSpecificInfoVP9::end_of_picture
This field is unused. It was deprecated in
https://webrtc-review.googlesource.com/c/src/+/192542

Bug: None
Change-Id: Iba264c03e16fc240893595075b525d44efa8ab96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314720
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40504}
2023-08-02 14:05:31 +00:00
Sergey Silkin
86a7969a6d Synchronize access to callbacks map
Bug: webrtc:14852
Change-Id: I65a608976056865849f4175411febc8093402de1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40500}
2023-08-02 11:38:25 +00:00
Danil Chapovalov
9a09ed73c5 Cleanup RemoteBitrateEstimatorSingleStream
Store Detectos in a map by value instead of by unccessary pointer

Bug: None
Change-Id: Iab9904aafca02d9f9ae6633c87de860a5bd62ac7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313621
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40499}
2023-08-02 10:11:38 +00:00
Danil Chapovalov
4f4e989436 In remote bitrate estimator pass packet using RtpPacketReceived class
Bug: webrtc:15054
Change-Id: I23c9008e1979a56bba9421a00e4f0f8ff937d122
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313261
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40485}
2023-07-28 10:22:16 +00:00
Danil Chapovalov
920abcc9bc In RtpSenderVideo::UpdateConditionalRetransmit use typed time and framerate instead of plain ints
Bug: webrtc:13757
Change-Id: If2df5418dacd2b95387fa74a9bc226426b207aee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313041
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40483}
2023-07-27 14:35:42 +00:00
Danil Chapovalov
ac412a4ee3 In RTPSenderVideo delete deprecated variants of functions to send video frame
Bug: webrtc:13757
Change-Id: I0bef9cc17e599382cc2265d61a2a538f2534356f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312860
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40472}
2023-07-25 10:47:47 +00:00
Danil Chapovalov
7b42f35bcc Remove artifical extra RTP packet capacity
Instead allow RtpPacket to exceed configured capacity when setting payload

Bug: None
Change-Id: I02fc080ffa3127ffbe0dade1f200dd7456a6a128
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312880
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40471}
2023-07-25 06:33:09 +00:00
Harald Alvestrand
7dbf55437f Ensure payload type frequency does not cause divide-by-zero
This CL does 2 things:
- Change the DCHECK for payload_type_frequency to a CHECK (so that
this error will be a crash not a divide-by-zero)
- Change the replay helper that was used by the fuzzer to set the
frequency of the packets to the video value (90K).

Bug: chromium:1466826
Change-Id: I39941f250b1782b36a3bcddfd347a016591466ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312700
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40468}
2023-07-24 16:06:08 +00:00
Danil Chapovalov
950e231b63 In RtpRtcp use BitrateTracker instead of RateStatistics to measure bitrate
BitrateTracker uses RateStatistics underneath, thus algorithm is the same,
but it provides Timestamp/TimeDelta friendly interface

Bug: webrtc:13757
Change-Id: I9f2fcb3d498b2a137b531b94b660d15aa273c4bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40465}
2023-07-24 14:57:29 +00:00
Jan Grulich
666d707450 Video capture PipeWire: guard callback to avoid concurrent access
Make sure the callback is reset when tearing down the PipeWireSession
and that there is no concurrent access to it, which can potentially lead
to a crash.

Bug: webrtc:15386
Change-Id: I0b09002fe0479dc1cd946c80684bcc5d8754d54a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311546
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40464}
2023-07-24 14:48:33 +00:00
Harald Alvestrand
00f11224fd Remove extra usage of video-content-type header extension
This extension is documented to carry one bit: Screenshare.
It's been used for carrying simulcast layers and experiment IDs.
This CL removes that usage.

Bug: webrtc:15383
Change-Id: I048b283cde59bf1f607d8abdd53ced07a7add6f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312420
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40457}
2023-07-22 21:47:08 +00:00
Caroline Liu
0689cfc6ce Reland "[fuchsia] remove Scenic/UseFlatland dependency in DesktopCapturer"
This reverts commit 726992d7a4.

Reason for revert: Relanding with original errors fixed (tested by building the patch locally against Chromium)

This change no longer attempts to migrate the display size protocol from fuchsia.ui.scenic.Scenic/GetDisplayInfo to fuchsia.ui.display.singleton.Info/GetMetrics because the latter API was introduced in Fuchsia API 12, which is not yet supported in Chrome (hence some of the build errors causing the revert).

Original change's description:
> Revert "[fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer"
>
> This reverts commit fe5be2eb4f.
>
> Reason for revert: This breaks the WebRTC roll into Chromium:
>
> - https://chromium-review.googlesource.com/c/chromium/src/+/4688561
> - https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/399140/overview
>
> Error:
>
> [4273/4389] CXX obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
> FAILED: obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
> ../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewra...(too long)
> ../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:59:10: error: use of undeclared identifier 'capturer'
> 59 |   return capturer(new ScreenCapturerFuchsia());
> |          ^
> ../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:199:36: error: no type named 'InfoSyncPtr' in namespace 'fuchsia::ui::display::singleton'
>
> Original change's description:
> > [fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer
> >
> > We previously used:
> > - fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
> >   Flatland; from now on it should always be the case, so this check is
> >   no longer necessary.
> > - fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
> >   fuchsia.ui.gfx.DisplayInfo. This has been migrated to
> >   fuchsia.ui.display.singleton.Info/GetMetrics and
> >   fuchsia.ui.display.singleton.Metrics.
> >
> > Bug: fuchsia:100303
> > Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
> > Reviewed-by: Emircan Uysaler <emircan@google.com>
> > Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> > Commit-Queue: Caroline Liu <carolineliu@google.com>
> > Cr-Commit-Position: refs/heads/main@{#40432}
>
> Bug: fuchsia:100303, b/291393959
> Change-Id: Iae70e568a8c9819e40e48069af8cea0d4ef2b6c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311801
> 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@{#40436}

Bug: fuchsia:100303, b/291393959
Change-Id: Icb7074ac86c1804ab2bdf809ea1496539ee2bf80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312000
Commit-Queue: Caroline Liu <carolineliu@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40452}
2023-07-21 16:47:17 +00:00
Danil Chapovalov
630c40d716 Update RtpSenderVideo::SendVideo/SendEncodedImage to take Timestamp/TimeDelta types
Bug: webrtc:13757
Change-Id: I2f21b14ecf003c5cb0c4c92d0c6b9b6f11c35f71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311945
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40450}
2023-07-21 10:36:49 +00:00
Philipp Hancke
44bc8e96ed [M116] Bail out early if the RTP send module for a SSRC was not found
since it might have been deregistered previously.

BUG=chromium:1454860,chromium:1459124

(cherry picked from commit c0ed83eac2)

Change-Id: I70ba43265361d040e568f83b6400ff8f3c2a8e98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Original-Commit-Position: refs/heads/main@{#40431}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312120
Cr-Commit-Position: refs/branch-heads/5845@{#6}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-07-19 17:20:16 +00:00
henrika
e66a85c278 kDummyAudio now also creates Dummy ADM on Android
The old Android ADM was removed in https://webrtc-review.googlesource.com/c/src/+/271841.

This change resulted in a NULL as result when asking for a
kDummyAudio ADM on Android.

The small change below should ensure that a dummy ADM can be
created on Android as well.

Bug: webrtc:7452, b/291275589
Change-Id: I2c995ce6ba9a4117e3e39596546b133fe1c49204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311946
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40440}
2023-07-17 15:22:22 +00:00
Björn Terelius
fd5bdca28c Revert "Disable VideoCaptureTest due to flakyness"
This reverts commit 4ee5e5f294.

Reason for revert: HW fixed (hopefully)

Original change's description:
> Disable VideoCaptureTest due to flakyness
>
> Bug: webrtc:15229
> Change-Id: I3303b13be74d9eae5c52ecb2b920c23ac7d063d4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308220
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40244}

Bug: webrtc:15229
Change-Id: I30ad37236ffcb56d7ffe4d3efa3d03705be25c47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311804
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40437}
2023-07-17 09:02:44 +00:00
Mirko Bonadei
726992d7a4 Revert "[fuchsia] remove Scenic and GFX dependencies in DesktopCapturer"
This reverts commit fe5be2eb4f.

Reason for revert: This breaks the WebRTC roll into Chromium:

- https://chromium-review.googlesource.com/c/chromium/src/+/4688561
- https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/399140/overview

Error:

[4273/4389] CXX obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
FAILED: obj/third_party/webrtc/modules/desktop_capture/desktop_capture/screen_capturer_fuchsia.o
../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewra...(too long)
../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:59:10: error: use of undeclared identifier 'capturer'
59 |   return capturer(new ScreenCapturerFuchsia());
|          ^
../../third_party/webrtc/modules/desktop_capture/screen_capturer_fuchsia.cc:199:36: error: no type named 'InfoSyncPtr' in namespace 'fuchsia::ui::display::singleton'

Original change's description:
> [fuchsia] remove Scenic and GFX  dependencies in DesktopCapturer
>
> We previously used:
> - fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
>   Flatland; from now on it should always be the case, so this check is
>   no longer necessary.
> - fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
>   fuchsia.ui.gfx.DisplayInfo. This has been migrated to
>   fuchsia.ui.display.singleton.Info/GetMetrics and
>   fuchsia.ui.display.singleton.Metrics.
>
> Bug: fuchsia:100303
> Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
> Reviewed-by: Emircan Uysaler <emircan@google.com>
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Caroline Liu <carolineliu@google.com>
> Cr-Commit-Position: refs/heads/main@{#40432}

Bug: fuchsia:100303, b/291393959
Change-Id: Iae70e568a8c9819e40e48069af8cea0d4ef2b6c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311801
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@{#40436}
2023-07-17 08:12:48 +00:00
Caroline Liu
fe5be2eb4f [fuchsia] remove Scenic and GFX dependencies in DesktopCapturer
We previously used:
- fuchsia.ui.scenic.Scenic/UsesFlatland to determine whether to use
  Flatland; from now on it should always be the case, so this check is
  no longer necessary.
- fuchsia.ui.scenic.Scenic/GetDisplayInfo to get
  fuchsia.ui.gfx.DisplayInfo. This has been migrated to
  fuchsia.ui.display.singleton.Info/GetMetrics and
  fuchsia.ui.display.singleton.Metrics.

Bug: fuchsia:100303
Change-Id: I147da9ffdf0ca49e1c5bde5d188e434fc660becc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311860
Reviewed-by: Emircan Uysaler <emircan@google.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Caroline Liu <carolineliu@google.com>
Cr-Commit-Position: refs/heads/main@{#40432}
2023-07-14 21:05:29 +00:00
Philipp Hancke
c0ed83eac2 Bail out early if the RTP send module for a SSRC was not found
since it might have been deregistered previously.

BUG=chromium:1454860,chromium:1459124

Change-Id: I70ba43265361d040e568f83b6400ff8f3c2a8e98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40431}
2023-07-14 10:45:36 +00:00
Danil Chapovalov
aa8faa6423 Update RtcpReceiver to use Timesetamp/TimeDelta types instead of raw ints
Bug: webrtc:13757
Change-Id: Ie0317a584406bec3c34403a7bc8059e4272b339f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311674
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40429}
2023-07-13 12:08:10 +00:00
Jan Grulich
0e9556a90c Desktop capture: introduce capturer requesting both screen and windows
When PipeWire and xdg-desktop-portals are used, we can actually combine
both source types into one request. Make this part of the API for those
who want to use it this way, e.g. Firefox or Electron, otherwise they
will end up making two simultaneous requests, resulting into two dialogs
at the same time asking, while they can be combined into just one.

Bug: webrtc:15363
Change-Id: Ib6e1e47f66cb01d5c65096aec378b44c3af5f387
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311549
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40425}
2023-07-12 18:59:24 +00:00
Tony Herre
aa6c910f47 [116] Set surrogate receive times for transformed sender frames
Without this, 'Sender' frames inserted into the writer of an encoded
transform have an invalid receive time (0), which breaks all later
heuristics which build on the receive time, eg the VCMTiming estimators
used for controlling the playback delay.

(cherry picked from commit 9d677f4cdc)

Bug: chromium:1463451
Change-Id: I413c884e08986148d4a854cd275212b21d093ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311544
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#40416}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311662
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#4}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-07-12 14:29:52 +00:00
Anne Redulla
73d51f8e84 [ssci] Added Shipped field to READMEs
This CL adds the Shipped field (and may update the
License File field) in Chromium READMEs. Changes were
automatically created, so if you disagree with any of
them (e.g. a package is used only for testing purposes
and is not shipped), comment the suggested change and
why.

See the LSC doc at go/lsc-chrome-metadata.

Bug: b:285450740
Change-Id: If4955c6f6e7b58e0c99469fc45ed5b9e8f30a32b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311720
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Anne Redulla <aredulla@google.com>
Cr-Commit-Position: refs/heads/main@{#40424}
2023-07-12 07:31:06 +00:00
Jianhui Dai
32a8169a65 Use common VideoFrameTypeToString helper
This CL cleans up all local conversions, in favor of the common helper
function.

Bug: webrtc:15210
Change-Id: Id77e1c6b1151a2542d92e220e91d5b11285479b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311060
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianhui J Dai <jianhui.j.dai@intel.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40420}
2023-07-12 00:28:47 +00:00
Alfred E. Heggestad
6a4f409241 pacing_controller: add millisecond units to warning message
Bug: None
Change-Id: I8a5c5ca6a641a74213116a734f3c19c6972e5916
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311400
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40418}
2023-07-11 17:00:06 +00:00
Tony Herre
9d677f4cdc Set surrogate receive times for transformed sender frames
Without this, 'Sender' frames inserted into the writer of an encoded
transform have an invalid receive time (0), which breaks all later
heuristics which build on the receive time, eg the VCMTiming estimators
used for controlling the playback delay.

Bug: chromium:1463451
Change-Id: I413c884e08986148d4a854cd275212b21d093ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311544
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40416}
2023-07-11 14:30:18 +00:00
Andreas Pehrson
04ee24493d [M116] In VideoCaptureDS::{Start|Stop}Capture do not lock
Sequence- and RaceCheckers ensure thread safety, and show that these
locks protect nothing.

(cherry picked from commit dcf600d7a5)

Bug: webrtc:15181, chromium:1457919
Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Original-Commit-Position: refs/heads/main@{#40345}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310520
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#3}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-07-11 08:58:09 +00:00
Andreas Pehrson
279a05475d [M116] In VideoCaptureImpl and subclasses add thread and lock annotations
This annotates all unannotated members in VideoCaptureImpl and its
subclasses with either of:
- api_checker_: access on the api thread only
- capture_checker_: access in callbacks/on the capture thread while
                    capture is active, on the api thread otherwise
- a Mutex if it is already protected by it

(cherry picked from commit eee10391ca)

Bug: webrtc:15181
Change-Id: I5084e7752a4716c29b85a9b403a88696f66d811f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305647
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Original-Commit-Position: refs/heads/main@{#40335}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310500
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#2}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-07-11 07:31:11 +00:00
Jan Grulich
8fcc6df79d PipeWire capturer: increase buffer size to avoid buffer overflow
Recently added framerate option can cause a buffer overflow and make
PipeWire to fail on negotiation, which effectively makes screen sharing
not to work.

Bug: webrtc:15346
Change-Id: I4a68e26c8f85ca287b06a25da500b6a7009e075f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311541
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40413}
2023-07-10 17:32:30 +00:00
Artem Titov
599367595d Allow StartRecording if capturer is null in test ADM
Bug: b/272350185
Change-Id: I3aca6d8b3eb4fd39a6d39f1fea272858e18193bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311463
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40407}
2023-07-07 14:01:38 +00:00
Alfred E. Heggestad
e9ae738c7c rtcp_sender: uppercase protocol names (RTCP) in log messages
Bug: None
Change-Id: Ie6683897fca469a15c1aa054eeb1b2d378b22bcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311461
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40405}
2023-07-06 13:34:31 +00:00
Philipp Hancke
3f10b4917e Log SSRC for video decode errors
which makes it possible to grep the logs for all decode errors
on a particular SSRC.

BUG=None

Change-Id: I4aa54434f0b85932313adaf39e099729991a4700
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308823
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40404}
2023-07-06 11:24:16 +00:00
Artem Titov
1a8c1aedbc Add raw file audio capturer/renderer for test ADM
Bug: b/272350185
Change-Id: Ie8c7f7be30d06b238240086eee172332287c77ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311280
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40399}
2023-07-04 11:03:25 +00:00
Li-Yu Yu
758f26852d Fix downstream review comments for C++20
This CL addresses the review comments for
https://webrtc-review.googlesource.com/c/src/+/261221
in the downstream cherry-pick: https://crrev.com/c/4660950.

*   Always use size_t{} for casting.
*   Remove unneeded size_t casts.
*   Avoid using __x as it is reserved for the compiler.

Bug: b:217226507
Change-Id: I13c57cb69d7db066ac9a6dbd15b7f6de54abb613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311360
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Li-Yu Yu <aaronyu@google.com>
Cr-Commit-Position: refs/heads/main@{#40395}
2023-07-04 09:06:07 +00:00
Jan Grulich
e21745a78b Video Capture PipeWire: initialize pw_stream raw pointer member
We will not always initialize PipeWire stream when we fail early and in
such case we will end up cleaning VideoCaptureModulePipeWire instance
where we will attempt to free it even when it is not initialized.

Bug: chromium:1457131
Change-Id: Id78310485aa5ae5d72c2d0d753dd5318b1b673ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311261
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40390}
2023-07-03 12:47:42 +00:00
Artem Titov
2cf8eb9f78 Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
This CL will add AudioDeviceBuffer into the SUT increasing test coverage
for audio quality regression detection.

This reverts commit b035dcc0a2.

Reason for revert: reland with a fix

Original change's description:
> Revert "Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl""
>
> This reverts commit eeae962997.
>
> Reason for revert: breaks WebRTC Chromium FYI ios-device
> https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/14896/overview
>
> Original change's description:
> > Reland "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
> >
> > This reverts commit 69c8d3c843.
> >
> > Reason for revert: Reland with a fix
> >
> > Original change's description:
> > > Revert "Migrate TestAudioDeviceModule on AudioDeviceModuleImpl"
> > >
> > > This reverts commit e42bf81486.
> > >
> > > Reason for revert: Breaks iOS simulator bots and thus blocks chromium roll, https://chromium-review.googlesource.com/c/chromium/src/+/4433814
> > >
> > > Original change's description:
> > > > Migrate TestAudioDeviceModule on AudioDeviceModuleImpl
> > > >
> > > > Bug: b/272350185
> > > > Change-Id: Ia3d85d6fa3b0d4809e987a39d60d3eb022687132
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300363
> > > > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#39877}
> > >
> > > Bug: b/272350185
> > > Change-Id: I1e3b542fc1278797f283afedeae01cbb7412d353
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301701
> > > Commit-Queue: Jeremy Leconte <jleconte@google.com>
> > > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > > Reviewed-by: Jeremy Leconte <jleconte@google.com>
> > > Auto-Submit: Christoffer Jansson <jansson@google.com>
> > > Owners-Override: Christoffer Jansson <jansson@google.com>
> > > Cr-Commit-Position: refs/heads/main@{#39881}
> >
> > Bug: b/272350185
> > Change-Id: I809466306b2e1fd54c44b90311059c98a53ef8ee
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301704
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39936}
>
> Bug: b/272350185
> Change-Id: If0a10717bf14a0a618e52728fc3a61b9c55f3bd2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303460
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Owners-Override: Jeremy Leconte <jleconte@google.com>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#39947}

Bug: b/272350185
Change-Id: I7cf7c6bc25561f4eb722957f318c2af9ce20726d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311101
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@{#40387}
2023-06-30 16:15:06 +00:00
Yaowen Guo
6fc700ec3d Rland "Revert "Reland "Reland "Delete old Android ADM.""""
This reverts commit 7534ebd2bf.

Reason for revert: Downstream projects have been updated, try it again.

R=perkj@webrtc.org

Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
2023-06-30 13:10:12 +00:00
Artem Titov
415e30fdbb Extract some test code out from audio_device_impl into own targets
Bug: b/272350185, webrtc:15081
Change-Id: Ic7a0c8b335bb60d7975a490896da92aa95575ca5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310784
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40384}
2023-06-30 10:33:31 +00:00
Tony Herre
b4062e5611 Add a setter for RTPTimestamp on TransformableFrameInterface
Move the SetRTPTimestamp method from TransformableAudioFrameInterface
to the base class, so that RTPTimestamps can also be modified on encoded
video frames.

Bug: webrtc:14709
Change-Id: I355be527c2be201c9201e04c431394c962237140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310781
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40378}
2023-06-29 13:42:15 +00:00
Alfred E. Heggestad
be90237a0a rtp_rtcp/source: fix some minor typos
Bug: None
Change-Id: Iedc6e3b7e0cb92256255afc4cd76c66b01099c1e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40362}
2023-06-27 21:32:46 +00:00
Emil Lundmark
365a5717ae Use absl::optional instead of std::optional
We haven't switched to the std spelling in WebRTC yet.

Change-Id: If21a6ee9ac19be8ce959b3192eb8de044048f157
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310501
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40356}
2023-06-27 10:41:33 +00:00
Jakob Ivarsson
269a3d415e Mix audio from all sources.
Removes the top 3 filtering based on frame energy. This behaviour is
unexpected for many application developers and the platform should not
have such arbitrary limitations. Developers can still implement top-N
filtering using WebAudio or an SFU (recommended to increase
scalability).

Performance is not really a concern in this case since decoders on all
receive streams are called regardless if they are mixed or not
(assuming packets are received).

This also fixes glitches caused by the current implementation since
sources are not ramped out.

Bug: chromium:1446655,webrtc:13818
Change-Id: I179a6d68d2517b94ff2d99ec269031a54e5099e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310180
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40349}
2023-06-26 17:48:50 +00:00
Andreas Pehrson
dcf600d7a5 In VideoCaptureDS::{Start|Stop}Capture do not lock
Sequence- and RaceCheckers ensure thread safety, and show that these
locks protect nothing.

Bug: webrtc:15181
Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40345}
2023-06-26 10:13:33 +00:00
Olov Brändström
7bf1cd341a Prevent warnings from timestamp aligner used in AudioDeviceBuffer
The logcat is spammed with warnings from timestamp aligner.
This CL make a workaround to use the timestamp aligner to get capture times,
without generating the warnings.

Bug: webrtc:14970
Change-Id: Idab4b298e0484a57841a214db9440f9ac6faaa4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296324
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#39486}
2023-06-23 12:06:37 -04:00
Danil Chapovalov
8beb6314ef Pass and process capture time through SendPacketObserver with Timestamp type
Bug: webrtc:13757
Change-Id: Icc9f650590640f402ca9004171bbddaf918c78d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308682
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40339}
2023-06-22 17:16:41 +00:00
henrika
58e97b8600 Removes AllowWgcDesktopCapturer feature flag
This flag is no longer used in Chrome and can now be removed.

Bug: chromium:1314868
Change-Id: Id91b3352dc7ec0543d54894cc206a6e0c7667e9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309960
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40337}
2023-06-22 16:07:51 +00:00
Andreas Pehrson
eee10391ca In VideoCaptureImpl and subclasses add thread and lock annotations
This annotates all unannotated members in VideoCaptureImpl and its
subclasses with either of:
- api_checker_: access on the api thread only
- capture_checker_: access in callbacks/on the capture thread while
                    capture is active, on the api thread otherwise
- a Mutex if it is already protected by it

Bug: webrtc:15181
Change-Id: I5084e7752a4716c29b85a9b403a88696f66d811f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305647
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40335}
2023-06-22 13:34:40 +00:00
henrika
c3a74024bf Splits AllowWgcDesktopCapturer into AllowWgc[Window/Screen]Capturer flags
This CL allows the users to now enable/disable WGC capturing support
for Window and Screen sharing independently.

Bug: chromium:1314868
Change-Id: Ieeb15539434dac2caf29c515aa7c5dbb7abcc5df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309560
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40330}
2023-06-21 19:25:23 +00:00
Sergey Silkin
d7c7b07c5d Account for codec type when accessing codec specific settings
Bug: none
Change-Id: Ic60414d7a8cd2e40f8c3855fd4ceed09ea4d7c07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305784
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40324}
2023-06-21 11:26:04 +00:00
Jesús de Vicente Peña
f80cf81435 Changing the pre echo configuration default.
Bug: webrtc:14205
Change-Id: I17add3bf19c599f170ffe98d0da0a561794591c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309481
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40319}
2023-06-20 14:46:44 +00:00
Philipp Hancke
64d384ff29 Fix logging of unsupported video type
BUG=webrtc:15257

Change-Id: I9b51ed39d6010f49f307a40b20eec801eaf088bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308881
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40317}
2023-06-20 13:12:27 +00:00
henrika
bb917acb10 Fixes crash in WgcCaptureSession::ProcessFrame
This change fixes a minor issue where we previosuly assumed that the
following was true:

RTC_DCHECK_EQ(map_info.RowPitch, current_frame->stride())

It turns out that this is not always the case when sharing a window
where the stride can sometimes be a few bytes smaller than the
rowpitch.

The code is behind a command-line flag and no tests are affected.
Given limited review resources I therefore plan to bypass the CQ.
I know that it is not recommended but the change has been tested
locally on two different Windows platforms and it does avoid an
existing crash.

Code-Review: alcooper@chromium.org
No-Try: true
Bug: chromium:1421242
Change-Id: I01e7105a6f9fca7ce1349a57635dd373c28d160b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309342
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40308}
2023-06-19 14:39:39 +00:00
Danil Chapovalov
b4969d0036 Remove unused dependencies in rtp_rtcp
Bug: None
Change-Id: If0a14f54e55550f38b178bb6412198559677d217
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309320
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40307}
2023-06-19 11:51:27 +00:00
Danil Chapovalov
4d2a219436 Change RTCPReceiver::GetAndResetXrRrRtt to return TimeDelta
Bug: webrtc:13757
Change-Id: Iaf3a540fbab51990fb6b983912e3b8c1bb1aaa81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308940
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40302}
2023-06-16 17:09:00 +00:00
henrika
6c453b7d59 Light-weight detection of static content when using WGC
This CL adds a light-weight detection of "frame content has changed
since last frame" to an existing pass where bytes are copied from a
texture to a DesktopFrame. The resulting boolean can then later be
used to bypass a full detection of if the content is static or not.
As a result, we only check for static content for a small fraction of
all captured WGC frames and this reduces the total load when 0Hz
is enabled for WGC.

Both WGC and 0Hz support for WGC is still behind a flag.

Bug: chromium:1421242
Change-Id: If9e3721c60a244a3919758fe861d56d4b54cb039
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308821
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40299}
2023-06-16 11:00:34 +00:00
Alfred E. Heggestad
b37f864e22 Flexfec: add logging of received length.
Co-authored-by: Sun Shin <sushin@nvidia.com>
Bug: None
Change-Id: I676c6e6ed52c7ddcd42bfe3d6cfb1a377b2e7dbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307820
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40291}
2023-06-15 14:22:27 +00:00
Andreas Pehrson
823c70209e In VideoCaptureV4L2 use requested/configured capability
VideoCaptureV4L2 has some members that are set in StartCapture during
configuration of the device, but later accessed both on the capture
thread and on the api thread (same as StartCapture) in
CaptureSettings(), which can be called at any time. This is safe because
they are written only on the api thread when the capture thread is not
running. However, there is no helper class that separates the read and
write modes to allow annotations and static analysis of the thread
access of these members.

This commit allows annotations to be added by making VideoCaptureV4L2
use:
- VideoCaptureImpl::_requestedCapability for storing those members
  requested through StartCapture(), to allow access on the api thread
  through CaptureSettings().
- A new member configured_capability_ to replace those members mentioned
  in the first paragraph above. Writes to it happen only in
  StartCapture() and StopCapture(), while reads happen exclusively on
  the capture thread in between.

Bug: webrtc:15181
Change-Id: I27e0f578e6ac2a2e6b0e34fbabfe4f743b296321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306122
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40290}
2023-06-15 14:16:59 +00:00