webrtc/modules/pacing
Erik Språng be152f5f9e Optimizes thread usage with task queue pacer.
The TaskQueuePacedSender today has some inefficiencies:
* Enqueuing a packet will trigger a MaybeProcessPackets() call, but it
  won't actually run immediately even if it should - instead it will
  schedule a new call in at least 1ms. This incurs delays and extra
  CPU overhead.
* Sometimes thread wakeups are scheduled simply in order to do
  book-keeping: ProcessPackets() will be called when the media debt has
  gone down to 0 even if there is no packet in the queue, in order to
  check if we should send padding.

This CL fixes that by called ProcessPackets() immediately if it is
actually time to do so, and by immediately determining when padding
should be sent without having a separate call to drain media debt.

Bug: webrtc:10809
Change-Id: I4870e86e6de2ce4197463fd5b788ad4717fc7177
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172842
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31010}
2020-04-06 15:34:58 +00:00
..
bitrate_prober_unittest.cc Make BitrateProber::IsProbing() inline. 2020-03-26 12:55:30 +00:00
bitrate_prober.cc Make BitrateProber::IsProbing() inline. 2020-03-26 12:55:30 +00:00
bitrate_prober.h Make BitrateProber::IsProbing() inline. 2020-03-26 12:55:30 +00:00
BUILD.gn Replace std::string::find() == 0 with absl::StartsWith (part 2). 2020-04-02 14:38:30 +00:00
DEPS Replace field trials with WebRtcKeyValueConfig in PacedSender 2019-02-22 13:08:18 +00:00
interval_budget_unittest.cc Make interval budget use ratio instead of percent 2019-06-07 08:53:57 +00:00
interval_budget.cc Fix potential signed overflow in IntervalBudget::set_target_rate_kbps 2019-06-18 15:42:54 +00:00
interval_budget.h Fix potential signed overflow in IntervalBudget::set_target_rate_kbps 2019-06-18 15:42:54 +00:00
OWNERS Remove wildcard ownership for build files. 2020-02-19 14:05:46 +00:00
paced_sender_unittest.cc Replace DataSize and DataRate factories with newer versions 2020-02-18 16:09:50 +00:00
paced_sender.cc Replace std::string::find() == 0 with absl::StartsWith (part 2). 2020-04-02 14:38:30 +00:00
paced_sender.h Reland "Adds trial to use correct overhead calculation in pacer." 2020-01-29 18:45:16 +00:00
pacing_controller_unittest.cc Optimizes thread usage with task queue pacer. 2020-04-06 15:34:58 +00:00
pacing_controller.cc Optimizes thread usage with task queue pacer. 2020-04-06 15:34:58 +00:00
pacing_controller.h Move packet type enum from RtpPacketToSend to rtp_rtcp_defines.h 2020-02-06 17:58:39 +00:00
packet_router_unittest.cc Use newer version of TimeDelta and TimeStamp factories in modules/ 2020-02-10 11:49:57 +00:00
packet_router.cc Merge RtpPacket HasExtension and IsExtensionReserved functions 2020-01-20 11:37:25 +00:00
packet_router.h Makes padding prefer video SSRCs instead of audio. 2019-12-11 16:32:14 +00:00
round_robin_packet_queue.cc Fixes issue with non-paced audio send time in dynamic pacer. 2020-04-06 10:41:33 +00:00
round_robin_packet_queue.h Fixes issue with non-paced audio send time in dynamic pacer. 2020-04-06 10:41:33 +00:00
rtp_packet_pacer.h Reland "Adds trial to use correct overhead calculation in pacer." 2020-01-29 18:45:16 +00:00
task_queue_paced_sender_unittest.cc Optimizes thread usage with task queue pacer. 2020-04-06 15:34:58 +00:00
task_queue_paced_sender.cc Optimizes thread usage with task queue pacer. 2020-04-06 15:34:58 +00:00
task_queue_paced_sender.h Reland "Adds trial to use correct overhead calculation in pacer." 2020-01-29 18:45:16 +00:00