Commit graph

339 commits

Author SHA1 Message Date
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
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}
2022-09-09 10:44:17 +00:00
Erik Språng
c18a8fd8d1 Add field trial for fast retransmissions.
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}
2022-08-29 11:52:14 +00:00
Per Kjellander
ffd99aa069 Set default for field value "WebRTC-Bwe-ProbingBehavior/min_probe_delta:2ms"
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}
2022-08-25 10:16:12 +00:00
Erik Språng
a9627e770e Remove unused class RoundRobinPacketQueue.
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}
2022-08-20 11:28:17 +00:00
Henrik Boström
d34605b0a4 Add "WebRTC-BurstyPacer/burst:20ms" field trial.
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}
2022-08-19 13:51:47 +00:00
Philipp Hancke
a204ad210d clean up misc TimeDelta use
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}
2022-08-02 13:52:36 +00:00
Erik Språng
6397fb4f6c Move TaskQueuePacedSender::EnqueuePackets tracing onto the task queue.
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}
2022-08-02 12:26:34 +00:00
Erik Språng
06a6f3f818 Make PrioritizedPacketQueue the default.
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}
2022-07-25 16:24:58 +00:00
Erik Språng
c52e627c83 Remove WebRTC-Pacer-DynamicPaddingTarget field trial
Bug: webrtc:10809
Change-Id: I9f4adbea5721408b339bbf7497c20834537e50c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268145
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37480}
2022-07-07 12:24:04 +00:00
Danil Chapovalov
0be8eba07e Migrate pacing and video_coding to absl::AnyInvocable based TaskQueueBase interface
Bug: webrtc:14245
Change-Id: Icfab3e6548055ea72a199a226eca5233b1ead20d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267983
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37467}
2022-07-06 15:46:04 +00:00
Danil Chapovalov
0fd2ed516b Delete ProcessThread and related Module interface
Bug: webrtc:7219
Change-Id: Id71430a24b21e591494557cf54419d2bc8b3f8c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267400
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37416}
2022-07-04 10:20:35 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Erik Språng
c62e1b8d10 Don't increment transport sequence number on send failures.
Bug: webrtc:14130
Change-Id: Idee794445872f3db8ffae7c3e2cef5e72843ef25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265640
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37190}
2022-06-13 10:01:26 +00:00
Markus Handell
9a665402d7 Reland "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 4cd3a0d082.

Reason for revert: Downstream build should be fixed.

Original change's description:
> Revert "TaskQueue: unexpose delayed task convenience methods."
>
> This reverts commit 08bb6295ea.
>
> Reason for revert: Breaks downstream tests
>
> Original change's description:
> > TaskQueue: unexpose delayed task convenience methods.
> >
> > Bug: webrtc:14165
> > Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Auto-Submit: Markus Handell <handellm@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37166}
>
> Bug: webrtc:14165
> Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37167}

Bug: webrtc:14165
Change-Id: I3d963d272e8a1431103a5d5fb4568ccacd81119c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265395
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37186}
2022-06-13 07:27:37 +00:00
Erik Språng
df9e51a190 Fix issue with pacing rate after long queue times.
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}
2022-06-10 11:43:14 +00:00
Björn Terelius
4cd3a0d082 Revert "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 08bb6295ea.

Reason for revert: Breaks downstream tests

Original change's description:
> TaskQueue: unexpose delayed task convenience methods.
>
> Bug: webrtc:14165
> Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37166}

Bug: webrtc:14165
Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37167}
2022-06-09 15:48:23 +00:00
Markus Handell
08bb6295ea TaskQueue: unexpose delayed task convenience methods.
Bug: webrtc:14165
Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37166}
2022-06-09 14:08:54 +00:00
Erik Språng
8f722cae35 Update pacer documentation.
Bug: webrtc:10809
Change-Id: I5a032114e4bbd0bcae97d9a657dc84e62dba6508
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265386
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37163}
2022-06-09 12:04:24 +00:00
Henrik Boström
ef241167a5 [SlackedPacer] Don't slack while retransmissions or audio is in queue.
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}
2022-06-07 12:16:37 +00:00
Henrik Boström
8263020407 Allow the SlackedPacer experiment to control SendBurstInterval.
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}
2022-06-03 13:20:24 +00:00
Per Kjellander
8d847f077c Introduce PacerController::SendBurstInterval
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}
2022-06-02 15:10:06 +00:00
Per Kjellander
bfd30652b5 Refactor PacingControllerUnitTest
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}
2022-05-27 12:28:33 +00:00
Jianhui Dai
b1ba85385e Eliminate unnecessary RTC_TRACE_EVENTS_ENABLED
Bug: webrtc:14073
Change-Id: I6365cc17393be52c11312dfa954783a3e135cb8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262263
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36929}
2022-05-19 09:52:47 +00:00
Peter Kasting
f92a0846c3 Fix build in C++20 mode.
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}
2022-05-18 06:47:30 +00:00
Per Kjellander
88af20356f Use ProbeClusterConfig in BitrateProber from GoogCC
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}
2022-05-17 12:29:25 +00:00
Erik Språng
f47e941dbd Remove deprecated PacingController constructor
Bug: webrtc:10809
Change-Id: Ic913bd81dc5d043e4307f3b7f80ecacc78852d7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262760
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36906}
2022-05-17 09:59:14 +00:00
Erik Språng
6aa5cea4d3 Remove periodic mode from PacingController.
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}
2022-05-16 15:56:34 +00:00
Erik Språng
f3f3a61167 Remove legacy PacedSender.
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}
2022-05-13 20:31:06 +00:00
Erik Språng
b73c058702 Add new prioritized packet queue.
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}
2022-05-02 20:49:35 +00:00
Erik Språng
cb56827c55 Abstract the pacer queue behind an interface.
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}
2022-04-27 11:58:55 +00:00
Erik Språng
8b749e462b Move priority handling from PacingController to packet queue.
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}
2022-04-25 14:09:41 +00:00
Florent Castelli
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +00:00
Erik Språng
e65d05da25 Avoid bouncing first probe packet via pacer queue.
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}
2022-04-25 09:46:10 +00:00
Florent Castelli
a30aef3dea Move event_tracer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic3c424729b5edd3e378c4195afe33ae5c88ad491
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259312
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36637}
2022-04-24 14:47:40 +00:00
Erik Språng
acded16424 Revert "Reland "Send first probe packet directly instead of enqueuing it.""
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}
2022-04-22 16:01:28 +00:00
Erik Språng
fc5871cb98 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}
2022-04-22 15:28:38 +00:00
Erik Språng
660a434307 Revert "Reland "Send first probe packet directly instead of enqueuing it.""
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}
2022-04-22 13:01:28 +00:00
Erik Språng
1386fbca8b 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}
2022-04-22 12:23:59 +00:00
Erik Språng
b844dd8465 Non-zero pacing debt should result in non-zero process time delta.
Bug: webrtc:11340
Change-Id: Ib5567ef03d324b44fd1c0f3f8265870acb710cc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259764
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36616}
2022-04-22 11:09:01 +00:00
Erik Språng
d090952628 Revert "Send first probe packet directly instead of enqueuing it."
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}
2022-04-21 12:52:34 +00:00
Erik Språng
8088aad5ac 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}
2022-04-21 10:34:04 +00:00
Erik Språng
ed21d96e13 Add circuit-breaker in PacingController.
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}
2022-04-20 16:57:44 +00:00
Florent Castelli
aa6d05d268 Move location out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I3510f3d01df532cb228a6cc14be830f6ab81a8e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258764
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36576}
2022-04-19 21:57:48 +00:00
Henrik Boström
a768f5256a [SlackedPacer] Add experiment arm for high precision if long queue time.
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}
2022-04-13 11:50:38 +00:00
Florent Castelli
dd837e28fa Remove //rtc_base:timeutils from public deps
Bug: webrtc:8603
Change-Id: Iaca9356d16275a02e8842c783f259131d72ef010
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257914
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36460}
2022-04-06 11:23:21 +00:00
Florent Castelli
e10a9f609a Remove //rtc_base:safe_conversions from public deps
Bug: webrtc:8603
Change-Id: I285ac30975039f8fe9882d1673cc8e4a615c8618
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257912
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36452}
2022-04-05 20:04:59 +00:00
Florent Castelli
4467ad7835 Remove //rtc_base:macromagic from public deps
Bug: webrtc:8603
Change-Id: I9708df48c9bde9f86ba2d1a92a278bb0d09f3865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257909
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36444}
2022-04-05 12:36:12 +00:00
Florent Castelli
0af55ba60d Remove //rtc_base:logging from public deps
Bug: webrtc:8603
Change-Id: I2704da8618f88032adac7ae9eb2a0f47fce4a836
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257908
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36443}
2022-04-05 10:31:19 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Jianhui Dai
df59e53818 Reland "Pacer: Reduce TQ wake up and improve packet size estimation"
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}
2022-03-21 16:41:42 +00:00