Since `PostTaskToGlobalQueue` is somewhat different from
other TaskQueue APIs, there are concerns that it should not be
a public API.
Remove this from task_queue_gcd.h and make it a private static function
of AsyncResolver.
Bug: webrtc:13237
Change-Id: Ib4aff296f894a4f3b051969d176369e13a10088f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234900
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35236}
When using VideoEncoderSoftwareFallbackWrapper, releasing and
initialization of encoder_ (H/W) and fallback_encoder_(S/W) happen
repeatedly as reconfiguration procedure is called from higher layer.
Below problems would occur when our encoder_(H/W) fails to initialize
or encode.
Firstly, some encoders' SetFecControllerOverride() functions will fail
during repeated calls since they have checks like
RTC_DCHECK(!fec_controller_override_) to avoid repeated assignment of
fec_controller_override_.
(see : LibvpxVp8Encoder::SetFecControllerOverride())
Secondly, if main_ encoder fails to initialize at first attempt, FEC
setting (fec_controller_override) will not set until reconfiguration
procedure is called again.
This CL comes with two changes to fix above problems.
1. Sets fec_controller_override to both encoders when
SoftwareFallbackWrapper::SetFecController() is called.
2. Removes the current_encoder()->SetFecControllerOverride() in
PrimeEncoder() to avoid redundant calls which may involve fatal error.
Bug: webrtc:13184
Change-Id: I082c93de552bc9ec3141c6490d35acfcee2f8935
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234301
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35231}
This reverts commit 15a2159a350f57fb02a34b95e48236174fe4ca7f.
Reason for revert: Causing flakiness on video_engine_tests on Mac WebRTC builders. This is preventing WebRTC Rolls. The flakiness in occurred when b251145e38fdd08fe7320b0ddb3ca0f698473fa5 was merged as well. See https://ci.chromium.org/p/webrtc/builders/ci/Mac%20Asan and https://ci.chromium.org/p/webrtc/builders/ci/Mac64%20Release
Original change's description:
> Reland "Turn on WebRTC-TaskQueuePacer by defualt."
>
> This is a reland of b251145e38fdd08fe7320b0ddb3ca0f698473fa5
> Downstream test has been fixed.
>
> Original change's description:
> > Turn on WebRTC-TaskQueuePacer by defualt.
> >
> > Bug: webrtc:10809
> > Change-Id: If58ae3d9debc69ee68e6aeb6cecf010e60f6426f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233580
> > Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35145}
>
> Bug: webrtc:10809
> Change-Id: Iac960e9edc9a25a958af0b51adab830ad9430edb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235209
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35217}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:10809
Change-Id: Iadaefc05700490e20dbdc29f32f81e373e344683
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235379
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35229}
Also stop using ApplyConfig() and in [1] fix the build errors when
WEBRTC_EXCLUDE_AUDIO_PROCESSING_MODULE is defined.
[1] modules/audio_processing/test/audio_processing_builder_for_testing.cc
Bug: webrtc:5298
Change-Id: I50dc5668b952e7ca7fa83c7a5182c013e928c450
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235365
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35228}
The queued_send_data_ packet queue contains the actual data and has an
efficient byte_count() accessor. It removes the need to do some manual
accounting on the side.
Bug: webrtc:13288
Change-Id: Ie6bc39c344186160c630bcf337631614c6d9ee10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235372
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35227}
Benchmarks will spam a lot of annoying lines because of this.
Bug: webrtc:13288
Change-Id: I1321abafb91baefcaa626a561bee58ca3f321291
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235371
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35225}
Previous limits was only in a comment and users had no way to query it
from the API.
Bug: webrtc:13289
Change-Id: I6187dd9f9482bc3e457909c5e703ef1553d8ef15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235378
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35224}
This is a reland of b251145e38fdd08fe7320b0ddb3ca0f698473fa5
Downstream test has been fixed.
Original change's description:
> Turn on WebRTC-TaskQueuePacer by defualt.
>
> Bug: webrtc:10809
> Change-Id: If58ae3d9debc69ee68e6aeb6cecf010e60f6426f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233580
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35145}
Bug: webrtc:10809
Change-Id: Iac960e9edc9a25a958af0b51adab830ad9430edb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235209
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35217}
This is explained in RFC 4960, section 6.1, A.
... However, regardless of the value of rwnd (including if it
is 0), the data sender can always have one DATA chunk in flight to
the receiver if allowed by cwnd ... This rule
allows the sender to probe for a change in rwnd that the sender
missed due to the SACK's having been lost in transit from the data
receiver to the data sender.
Before this change, when a receiver has advertised a zero receiver
window size (a_rwnd=0) and a subsequent SACK advertising a non-zero
receiver window was lost, the sender was blocked from sending and since
SACKs are only sent when a DATA chunk is received, it would be
deadlocked. The retransmission timer would fire, but nothing would be
retransmitted (as it respected the zero receiver window).
With this change, when the retransmission timer fires (after RTO), it
would send a single packet with DATA chunk(s) and then SACKs would
eventually be received, with the non-zero receiver window and the socket
would recover.
Bug: chromium:1258225
Change-Id: I1ea62fb3c002150eeada28d3e703dbc09cfd038e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235280
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35215}
Not passing the sample rate to the `VoiceActivityDetectorWrapper` ctor
yet since that would require an unnecessary refactoring of `AdaptiveAgc`
which will soon be removed.
Instead, to ensure correct initialization until the child CL [1] lands,
`VoiceActivityDetectorWrapper::initialized_` is temporarily added.
Bit exactness verified with audioproc_f on a collection of AEC dumps
and Wav files (42 recordings in total).
[1] https://webrtc-review.googlesource.com/c/src/+/234583
Bug: webrtc:7494
Change-Id: I4b4be7b8106ba36c958d91bf263a7b30271a1ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234587
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35213}
DefaultVideoQualityAnalyzerFramesComparator::Stop() may not block until
all frames comparisons are processed in case when new comparison was
added after worker thread checked for available comparisons and Stop()
was invoked before worker thread checked the state_.
Bug: webrtc:13277, webrtc:13240
Change-Id: Ic16fdc01e43c04529cd83e5d9ef66d7573973cfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235205
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35212}
which can no longer happen since the end index and delta sizes are
checked in the surrounding condition.
Replace with a DCHECK to guard against potential errors.
BUG=None
Change-Id: I868d54c5923de773f248d10a40dbc6b2c563b0f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231957
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@nvidia.com>
Cr-Commit-Position: refs/heads/main@{#35210}
Internal refactoring of AGC2 to decouple the VAD, its wrapper and the
peak and RMS level measurements.
Bit exactness verified with audioproc_f on a collection of AEC dumps
and Wav files (42 recordings in total).
Bug: webrtc:7494
Change-Id: Ib560f1fcaa601557f4f30e47025c69e91b1b62e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234524
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35208}
When `AudioProcessingImpl::ApplyConfig()` is called, AGC2 is initialized
and then the new config is applied. That is error prone and for example
breaks bit exactness in [1].
Changes:
- `GainController2` must be created by passing configuration,
sample rate and number of channels
- `GainController2::ApplyConfig()` removed
Bit exactness verified with audioproc_f on a collection of AEC dumps
and Wav files (42 recordings in total).
[1] https://webrtc-review.googlesource.com/c/src/+/234587.
Bug: webrtc:7494
Change-Id: I251e03603394a4fc8769b9b5c197a157893676a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235060
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35206}
When sending a large amount of data, the sender will want to keep the
send buffer full so that the socket can quickly drain it as its able to
put more bytes on the wire.
When trying to send a message and when the send buffer is full, an error
will be returned and the OnError callback will be triggered. In these
situations, this is an expected and handled error and should not be
logged as an error, as it causes confusion.
Bug: chromium:1258225
Change-Id: I3e1feab03f60ba5c41cc524d8d8f066445030d18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235201
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35204}
This change
- adds new type VideoTrackSourceConstraints expressing min/max FPS
constraints.
- adds new method VideoTrackSourceInterface::ProcessConstraints.
- adds new method VideoSinkInterface<>::OnConstraintsChanged.
- updates AdaptedVideoTrackSource and VideoBroadcaster to forward
the constraints to sinks.
- adds several unit tests for the added functionality.
- and finally, implements OnConstraintsChanged in VideoStreamEncoder.
Chromium will be updated in coming CLs to supply constraints set
through the MediaStream module.
go/rtc-0hz-present
Bug: chromium:1255737
No-Try: true
Change-Id: Iffef239217269c332a1aaa902ddeae2440929e22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235040
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35197}