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 adds a (default off) flag which makes retransmissions be processed
immediately, just like audio packets normally are.
This might increase send rates and thus losses in some cases, but will
also reduce retranmission delays especially when timer slack or bursting
is used. Usefuleness TBD via experiment.
Bug: chromium:1354491
Change-Id: Icaa83125bfb30826ce72e6e786963d411e05ea57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272483
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37926}
And add a unit test that verifies that next probe time is set at is
the expected if the recommended probe size is used.
Bug: webrtc:14392
Change-Id: I239bb3a1c8eefc85509aacc82037c64e3ce49ed7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272648
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37901}
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 experiment will tell if we still see the performance gains that we
saw with the "bursty slacked pacer" even if we don't apply slack (since
the "slack without burst" showed little impact at Stable).
The hope is that without slack all quality regressions will go away but
that bursting will still provide the desired performance benefits.
Bug: chromium:1354491
Change-Id: I95f05d040713addaaa1856c8e374a01c27311612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272366
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37845}
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810
* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats
BUG=webrtc:13756
Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
This should avoid any potential race in static initialization for the
tracing logic.
Bug: webrtc:12715
Change-Id: Ic91d8e5fbd9b45a91e7e7a9e76226fc558e00c4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270381
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37662}
Keeping the field trial around as a kill-switch for another milestone.
Bug: webrtc:11340
Change-Id: I3285baefab176f541cbb5ed3bacbc669d3e8836f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269384
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37611}
A recent cleanup cl (r36900) had an unintended side-effect.
If the queue-time limit is expected to be hit, we adjust the pacing
bitrate up to make sure all packets are sent within the nominal time
frame.
However after that change we stopped adjusting the pacing rate back to
normal levels when queue clears - at least not until the next BWE
update (which is fairly often - but not immediate).
This CL fixes that, and also makes sure whe properly update the
adjusted media rate on enqueu, dequeue and set rate calls.
Bug: webrtc:10809
Change-Id: If00dc35169f1a1347fea6eb44fdb2868282ed3b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265387
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37178}
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}
When the slacked pacer experiment is enabled the next pacing opportunity
may be a full tick (~16 ms) from now. Add a flag to allow experimenting
with a burst interval (= 16 ms?) such that we can send bursts in
MaybeProcessPackets.
A common use case would be that EnqueuePackets triggers
MaybeProcessPackets when we are off-tick but we'd still like to create
an immediate burst instead of waiting for the next tick or two for that
to happen.
Bug: webrtc:14152
Change-Id: Ib0ed8312cb7d53b80f3520fff3a6e3bbb5a93fd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264985
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37116}
Allows the PacerController to send packets in bursts. If there are enqued packets, or a packet is enqueued while the pacer have a small media debt, an enqued packet is allowed to be sent immediately as long as the debt is smaller than the set burst interval.
Bug: b/233850913
Change-Id: Ibb0fa63c97409ca23b9fa7148b5ff6ce8c4517e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264462
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37098}
Ensure each test create its own PacerController.
Move (most) operations on the pacer controller to the actual test. (the
rest should be moved too eventually....)
Use only one test fixture.
Bug: none
Change-Id: I0b8eee9d2c2f91f7102858a1a544e45e8b0b7b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264120
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37017}
Structs with user-declared constructors are not aggregates and cannot
be initialized with designated initializers. Remove declarations that
don't actually affect anything.
Bug: chromium:1284275
Change-Id: Ib45ea334d7be28bfa7bbce132985612f0e6ecd10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262820
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36916}
Instead of using field trials in BitrateProber for probe duration, use values provided in ProbeClusterConfig from GoogCC.
Field trials are instead read in ProbeController.
To avoid having to do a thread jump for every ProbeClusterConfig, RtpPacketPacer interface is changed to RtpPacketPacer::CreateProbeClusters(std::vector<ProbeClusterConfig>
Deprecates field trial "WebRTC-Bwe-ProbingConfiguration"
Change-Id: I3991e4b54770601855a3af2d6a16678f11d41c31
Bug: webrtc:14027
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261265
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36911}
This completes the removal of the legacy pacer.
Bug: webrtc:10809
Change-Id: I8962ad56aa673f46b2c0e2cf8a5630e2c9942c92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262421
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36900}
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 will make it easier to extend testing, implement new features (e.g.
packet culling) and experiment with new variants.
Bug: webrtc:11340
Change-Id: I747f5f6cff61e11a420e43b06ffe0c4aba438c7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260116
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36670}
This will simplify upcoming changes to the queue.
Bug: webrtc:11340
Change-Id: Id023618fdef8a8bc9fb50e477cc87e6ba20c5421
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36644}
This avoids potentially creating structures in the queue, and removes
usage of a special priority class enabling us to move priority handling
in a follow-up.
Bug: webrtc:11340
Change-Id: I2286ef6eac62e1d6dd89f6eb6035b23f27543d8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259960
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36641}
This reverts commit fc5871cb98.
Reason for revert: I rage quit.
Original change's description:
> Reland "Send first probe packet directly instead of enqueuing it."
>
> This is a reland of commit 8088aad5ac
>
> Patchset 1 is original CL, patchset 2 contains a fix to make behavior
> exactly identical to original. It fixes a difference when the first
> small probe packet comprises the entire probe.
>
> Original change's description:
> > Send first probe packet directly instead of enqueuing it.
> >
> > This avoids potentially creating needless containers in the packet
> > queue and removes usage of the packet prio, allowing it to be moved in
> > an upcoming CL.
> >
> > Bug: webrtc:11340
> > Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
> > Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36602}
>
> Bug: webrtc:11340
> Change-Id: I7d2f476a7043edd03f44a4a3de31f13c3c946a8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259776
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36626}
Bug: webrtc:11340
Change-Id: Ife22cff8f5fbf9b70dc24926b84caad82d2738b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259778
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36628}
This is a reland of commit 8088aad5ac
Patchset 1 is original CL, patchset 2 contains a fix to make behavior
exactly identical to original. It fixes a difference when the first
small probe packet comprises the entire probe.
Original change's description:
> Send first probe packet directly instead of enqueuing it.
>
> This avoids potentially creating needless containers in the packet
> queue and removes usage of the packet prio, allowing it to be moved in
> an upcoming CL.
>
> Bug: webrtc:11340
> Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36602}
Bug: webrtc:11340
Change-Id: I7d2f476a7043edd03f44a4a3de31f13c3c946a8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259776
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36626}
This reverts commit 1386fbca8b.
Reason for revert: Now another downstream test flakes :(
Original change's description:
> Reland "Send first probe packet directly instead of enqueuing it."
>
> This is a reland of commit 8088aad5ac
>
> Original change's description:
> > Send first probe packet directly instead of enqueuing it.
> >
> > This avoids potentially creating needless containers in the packet
> > queue and removes usage of the packet prio, allowing it to be moved in
> > an upcoming CL.
> >
> > Bug: webrtc:11340
> > Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
> > Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36602}
>
> Bug: webrtc:11340
> Change-Id: I3e0db452961f7f5a8d00ea3283e92ec43da2f66a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259774
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36619}
Bug: webrtc:11340
Change-Id: I31b2c6636aca5debe8e4d71546b5a3b9eb746c9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259862
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36620}
This is a reland of commit 8088aad5ac
Original change's description:
> Send first probe packet directly instead of enqueuing it.
>
> This avoids potentially creating needless containers in the packet
> queue and removes usage of the packet prio, allowing it to be moved in
> an upcoming CL.
>
> Bug: webrtc:11340
> Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36602}
Bug: webrtc:11340
Change-Id: I3e0db452961f7f5a8d00ea3283e92ec43da2f66a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259774
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36619}
This reverts commit 8088aad5ac.
Reason for revert: Downstream test failure
Original change's description:
> Send first probe packet directly instead of enqueuing it.
>
> This avoids potentially creating needless containers in the packet
> queue and removes usage of the packet prio, allowing it to be moved in
> an upcoming CL.
>
> Bug: webrtc:11340
> Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36602}
Bug: webrtc:11340
Change-Id: Ib2a4bdad3ca82108e150feefb2680b880bc316e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259763
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36605}
This avoids potentially creating needless containers in the packet
queue and removes usage of the packet prio, allowing it to be moved in
an upcoming CL.
Bug: webrtc:11340
Change-Id: Iddd9e7e4e73c97ab25a85e42bcc0094d61fd60d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259524
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36602}
Some cases have been observer where the pacing controlled might have
been stuck in a send-loop. This CL adds a circuit breaker that attempts
to break that, and provide some logging for debugging.
Bug: webrtc:11340
Change-Id: Ia3d3a44c2d897260ef23160ea7122c0d0f9baa79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259521
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36592}
This CL adds flag "max_queue_time", e.g:
WebRTC-SlackedTaskQueuePacedSender/Enabled:true,max_queue_time:75ms
If the PacingController's ExpectedQueueTime() is greater than or equal
to "max_queue_time" then we will use high precision delayed tasks to
ensure a smoother (less bursty) pacing of packets.
This should only get triggered in ultra high definition scenarios or
temporarily during key frames being sent. I have confirmed manually that
with the flag set to 75 ms I get low precision when not sending key
frames and temporarily get high precision for 5-15 delayed tasks during
the sending of a key frame.
Bug: webrtc:13957
Change-Id: I3c8aeba5fe18812ed0187610cd3f92a375bc6f18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258623
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36538}
Update `early_execute_margin` after process packets, and the test case.
Original change's description:
>Pacer: Reduce TQ wake up and improve packet size estimation
>
>The TQ Pacer schedules delayed task according to target time of
>PacingController. It drains all valid ProcessPackets() in single loop,
>denies retired scheduled tasks, and round up the timeout to 1ms.
>
>This CL also improves packet size estimation in TQ Pacer by removing
>zero initialization, and introduces `include_overhead_` configuration.
>
>Tests:
>1. webrtc_perf_tests: MaybeProcessPackets() calls
> 2075147 -> 2007995
>
>2. module_unittests: MaybeProcessPackets() calls
> 203393 -> 183563
>
>3. peerconnection_unittests: MaybeProcessPackets() calls
> 66713-> 64333
>
>Bug: webrtc:13417, webrtc:13437
>Change-Id: I18eb0a36dbe063c606b1f27014df74a65ebfc486
>Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242962
>Reviewed-by: Erik Språng <sprang@webrtc.org>
>Reviewed-by: Henrik Boström <hbos@webrtc.org>
>Commit-Queue: Erik Språng <sprang@webrtc.org>
>Cr-Commit-Position: refs/heads/main@{#36179}
Bug: webrtc:13417, webrtc:13437
Change-Id: I79f2554cf02364b67ce7073698611a3ae337a73b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256145
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Owners-Override: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36283}