BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed
Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
This removes the field trial WebRTC-Pacer-UsePrioritizedPacketQueue.
Bug: webrtc:11340
Change-Id: I9a7ee64ff5ae3ad1fee6ed5d552ec681e3b4b534
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272240
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37852}
This CL introduces PacketQueue::SizeInPacketsPerRtpPacketMediaType
keeping track of the number of packets in the queue per
RtpPacketMediaType.
The TaskQueuePacedSender is updated not to apply slack if the queue
contains any kRetransmission or kAudio packets. The hope is that not
slacking retransmissions will make the NACK/retransmission regression
of the SlackedPacer experiment go away. Wanting to not slack audio
packets is unrelated to the regression but a sensible thing to due
since audio is highest priority.
This CL does not change anything when the SlackedPacer experiment is
not running, since if its not running then none of the packets are
slacked.
Bug: webrtc:14161
Change-Id: I1e588599b6b64ebfd7d890706b6afd0b84fd746d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265160
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37139}
The new TaskQueuePacedSender has been default-on in code since M97, and
there are no further usages of it that I can find. Let's clean this up!
The PacingController and associated tests will be cleaned up in a
follow-up cl.
Bug: webrtc:10809
Change-Id: I0cb888602939add953415977ee79ff0b3878fea5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258025
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36890}
This queue is a more strict round robing queue, unlike the class
named RoundRobinPacketQueue. That is, we don't have the same logic to
prioritize lower-bitrate streams.
The queue time mechanism is essentially directly copied from the
previous implementation however.
Bug: webrtc:11340
Change-Id: Ie38ba8ce27c985f5f1e907cec068d6a365089bcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260562
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36737}
This is a reland of commit 43a69b3f46
Original change's description:
> Experimentally reduce TaskQueuePacedSender's delayed task precision.
>
> This CL reduces the delayed task precision of non-probes in accordance
> with DD go/slacked-task-queue-paced-sender. The precision is only
> deduced if field trial "WebRTC-SlackedTaskQueuePacedSender" is enabled
> though.
>
> Bug: webrtc:13824
> Change-Id: I37e53b24e343f4f08059be08a3cda74f5484cc05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255341
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36214}
Bug: webrtc:13824
Change-Id: I86cace6f4f6bf23d51c75b3d18f8d24fff0f5b74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255826
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36221}
This CL reduces the delayed task precision of non-probes in accordance
with DD go/slacked-task-queue-paced-sender. The precision is only
deduced if field trial "WebRTC-SlackedTaskQueuePacedSender" is enabled
though.
Bug: webrtc:13824
Change-Id: I37e53b24e343f4f08059be08a3cda74f5484cc05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255341
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36214}
This CL also removes dependency on the legacy field trial methods.
Bug: webrtc:11926
Change-Id: I53feeee86b92878cf0f2b8ebdce3d101f9e04014
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255381
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36205}
Holdback window can be specified as absolute time and in terms of packet
send times. Example:
WebRTC-TaskQueuePacer/Enabled,holdback_window:20ms,holdback_packet:3/
If current conditions have us running with 2000kbps pacing rate and
1250byte (10kbit) packets, each packet send time is 5ms.
The holdback window would then be min(20ms, 3*5ms) = 15ms.
The default is like before 1ms and packets no take into account when
TQ pacer is used, parameters have no effect with legacy process thread
pacer.
Bug: webrtc:10809
Change-Id: I800de05107e2d4df461eabaaf1ca04fb4c5de51e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233421
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35266}
The time precision of delayed tasks is one millisecond, so the
TaskQueuePacedSender makes sure that is the minimum sleep time, and
then allows sending prior data as if it was on time.
Furthermore, if there already exists a pending task within 1ms of a
new desired process time - we don't schedule a new one with the same
motivation as above.
These two facts clashes somewhat with how BitrateProber works, and
especially if they coincide it can result in scheduled ProcessPackets()
that is 2ms late. The default timeout set in BitrateProber is 3ms, so
there is a higher risk of probes timing out.
This CL changes the TaskQueuePacedSender to allow scheduling a
ProcesPackets() call as soon as possible if we are probing - even if
that means executing up to 1ms earlier than expected (the BitrateProber
will compensate for that). The PacingController is updated in order to
allow early execution in this one case.
Bug: webrtc:10809
Change-Id: Ia5097ddc39aa80c05ebfe56369310c94ef0e0baf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178901
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31778}
This CL adds a parameter to the BirateProber field trial config, which
allows the prober to actually discard probe cluster is pacer scheduling
is too delayed. Today it just keeps going at a too low rate.
Some refactoring was needed anyway, so also switch to using unit types
in more places.
Initially keeps legacy behavior default, to verify no perf regressions.
Bug: webrtc:11780
Change-Id: I9edd114773b10a8d86b54a1a0398a4052aab9dd5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179090
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31756}
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).
Source sets always pass all the object files to the linker.
On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.
See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set
Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
Corresponding mock class is deleted rather than updated,
since it appears unused.
Bug: webrtc:8422
Change-Id: If1c6c5ed73abff0d2545e8666c4bb8b63ee5b53f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/13862
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29505}
Also adding code in preparation of hiding the Module
implementation in PacedSender. The implementation details of
how the PacedSender+ProcessThread interaction works, has now
been moved into PacedSender (and out of RtpTransportControllerSend).
Instead of adding a "GetModuleImplementationForTesting" method
to the PacedSender class (which would have been the lazy way
out), I incorporated MockedProcessThread in the PacedSender tests.
This means more boilerplate code but the Module functionality
can be tested separately from the PacedSender and down the line
I think it would be a good idea to start using a separate thread
in the test, which is how the class under test is really used
in production.
Bug: none
Change-Id: Iec1b7c97cb0b363b331143ca70545e6ebafe2cd4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149176
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29011}
The Pacer now just handles interaction with Module/ProcessThread and
forwarding packets to PacketRouter.
All other logic is moved to PacedSendingController, including tests.
PacedSender unittest are now just some basic sanity tests.
Bug: webrtc:10809
Change-Id: I69223cd9d8300997375b03706d2e99c88e46241c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149041
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28886}
The PacedSender is being reworked and will need an interface so we can
inject different implementations of it.
This CL introduces a new RtpPacketPacer interface inside the pacing
module. This interface handles the details of _how_ packets should be
paced, such as pacing rates/account for audio/max queue length etc.
The RtpPacketSender interface exposed from the rtp_rtcp module handles
only the actual sending of packets.
Some minor cleanups are included here.
Bug: webrtc:10809
Change-Id: I150b1a6262306d99e3f9d5f0b4afdb16a50e5ad8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145212
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28699}
This CL makes the new code path for paced sending functionally complete.
By default, the field trial WebRTC-Pacer-ReferencePackets is Enabled,
meaning that there is no behavior change unless the field trial is
forced to Disabled. This is done in tests, and can be done on the
command line for manual testing.
Bug: webrtc:10633
Change-Id: I0d66c94ef83b5847dee437a785018f09ba3f828d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144050
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28497}
This CL builds on https://webrtc-review.googlesource.com/c/src/+/142165
It adds the parts within the paced sender that uses those send methods.
A follow-up will add the pre-pacer RTP sender parts. That CL will also
add proper integration testing. Here, I mostly add coverage for the new
send methods. When the old code-path is removed, all tests need to be
converted to exclusively use the owned path.
Bug: webrtc:10633
Change-Id: I870d9a2285f07a7b7b0ef6758aa310808f210f28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142179
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28308}
This CL adds a handful of histograms that track how many probes we send, and some details about
them.
We'll track the total number of requested probe clusters and how many of them timed out, recorded
when we destroy the prober. For the successful clusters we'll also track how many bytes it took,
how many packets we sent and how long it took to send.
Bug: webrtc:10413
Change-Id: I4a223caa6d3c2829a36788d4fa615a41286b183f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127884
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27270}
Replaces use of field trials in PacedSender with injectable WebRtcKeyValueConfig.
Implementation still defaults to field trials.
BUG: webrtc:10335
Change-Id: Ie8870d93d51e996e762f2c2de7545bad261b6bb7
Reviewed-on: https://webrtc-review.googlesource.com/c/123521
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26818}
Originally RtcEventProbeClusterCreated was logged in bitrate prober. This means that anyone who was using GoogCcNetworkControl wasn't logging it, and the NetworkControl wasn't self-contained.
This changes moves the responsibility for logging ProbeClusterCreated to ProbeController (where the probe is created), it also moves the responsibility for assigning probe ids to the probe controller.
Bug: None
Change-Id: If0433cc6d311b5483ea3980749b03ddbcd2bf041
Reviewed-on: https://webrtc-review.googlesource.com/c/122927
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26713}
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.
Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}