Commit graph

33 commits

Author SHA1 Message Date
Erik Språng
641d59b337 Add ability to disable padding prioritization.
This allows trading off some potential media quality for CPU usage.

Bug: webrtc:8975
Change-Id: I447a03f596e9e711ba5d7038fe71f27bd80bf795
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172085
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30936}
2020-03-30 09:01:51 +00:00
Sebastian Jansson
5e9cac984f Don't try to resend packets that were removed out of order.
Bug: webrtc:11206
Change-Id: Iae05e1db80afd871d37aca203e17bad40dbc9522
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162041
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30083}
2019-12-13 10:29:49 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Erik Språng
2d7b2f5f72 Reland "Improve performance of RtpPacketHistory"
This is a reland of 9e380fd484

Patchset 1 is the original CL. The follow-ups adds fix for a test failure
and test for that change.

Original change's description:
> Improve performance of RtpPacketHistory
>
> The data structures in RtpPacketHistory were chosen based on assumption
> of few packets with possible sparse segments due to missing acking.
> In practice high bitrate usages with full histories seem to be more of
> a problem.
> Due to that, change storage from an std::map to an std::deque and live
> with potential segments of nullptr. Also limit size of padding prio
> set so that doesn't become a bottleneck.
>
> Bug: webrtc:8975
> Change-Id: I3b6314fb3255937d25362ff2cd906efb7b1397f7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145901
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29117}

Bug: webrtc:8975
Change-Id: I5038e5ad2eb79ce75710d2d8b0b3ac01dd41c013
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152282
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29152}
2019-09-11 11:07:29 +00:00
Qingsi Wang
c77df78931 Revert "Improve performance of RtpPacketHistory"
This reverts commit 9e380fd484.

Reason for revert: breaking downstream projects

Original change's description:
> Improve performance of RtpPacketHistory
> 
> The data structures in RtpPacketHistory were chosen based on assumption
> of few packets with possible sparse segments due to missing acking.
> In practice high bitrate usages with full histories seem to be more of
> a problem.
> Due to that, change storage from an std::map to an std::deque and live
> with potential segments of nullptr. Also limit size of padding prio
> set so that doesn't become a bottleneck.
> 
> Bug: webrtc:8975
> Change-Id: I3b6314fb3255937d25362ff2cd906efb7b1397f7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145901
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29117}

TBR=danilchap@webrtc.org,sprang@webrtc.org

Change-Id: I5d5b74a6f4d60588e01a52dafe33e26deb9bdf77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152220
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29121}
2019-09-09 23:40:53 +00:00
Erik Språng
9e380fd484 Improve performance of RtpPacketHistory
The data structures in RtpPacketHistory were chosen based on assumption
of few packets with possible sparse segments due to missing acking.
In practice high bitrate usages with full histories seem to be more of
a problem.
Due to that, change storage from an std::map to an std::deque and live
with potential segments of nullptr. Also limit size of padding prio
set so that doesn't become a bottleneck.

Bug: webrtc:8975
Change-Id: I3b6314fb3255937d25362ff2cd906efb7b1397f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145901
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29117}
2019-09-09 16:31:53 +00:00
Erik Språng
70768f4a8e Remove usage of StorageType enum
Previously the kDontRetransmit value was used to indicate packets that
should not be retransmitted but were put in the RtpPacketHistory anyway
as a temporary storage while waiting for a callback from PacedSender.
Since PacedSender now always owns the delayed packets directly, we can
remove all usage of StorageTye in RtpPacketHistory, and only put
packets there after pacing if RtpPacketToSend::allow_retransmission()
returns true.

Bug: webrtc:10633
Change-Id: I003b76ba43bd87658cc2a39e908fd28ebcd403f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150521
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28974}
2019-08-27 16:48:33 +00:00
Erik Språng
a57711c941 Fix issue with TransmissionOffset using new pacer code path
This CL fixes two issues related to the TransmissionOffset header
extension and the new (not yet active) pacer mode.

Previously capture time (if unset) would be populated when put into the
packet history before entering the pacer. Since the pacer now owns the
packets, this does not occur until packet is actually sent, if at all.
Capture has really nothing to do with the packet history, this should
be set by the RtpSender pre-pacing instead.

Furthermore, for retransmissions the old path would take the capture
time from the original packet, build the RTX-wrapped retransmission and
set the toffset extension of the RTX packet using that captured capture
time. Since RTX packets are now fully built before the pacer, this does
not work, and we need to transfer the capture time from the original to
the RTX packet instead.

Bug: webrtc:10633
Change-Id: I031e8b6cc4ab20fb094dbd46720829b78951e7f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146218
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28657}
2019-07-24 11:24:57 +00:00
Erik Språng
b9f5989e05 Remove legacy/unused RtpPacketHistory::StorageMode::kStore
The kStoreAndCull mode has been the default since May 3rd 2019:
https://webrtc.googlesource.com/src/+/d2a634447f42d6856656a9fcdb65d5845b736941

Let's clean away the old code.

Bug: webrtc:8975
Change-Id: I5f41b48b68aecce281cbb713e50db60c8a89da9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146213
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28650}
2019-07-23 21:20:50 +00:00
Erik Språng
21f2fc9c73 Remove the non-useful rtx payload padding option
This CL removes the field trial left in place as a kill-switch in case
there were any regressions related to selecting payload padding based
on the likelihood of being useful instead of matching size.

It also removes the functionality that was only enabled with the
kill-switch active.

The feature has been default-on since June 23rd 2019:
https://webrtc.googlesource.com/src.git/+/214f54365ec210db76218a35ead66c9ce23e068e

Since we have not observed any issues, let's clean this code up.

Bug: webrtc:8975
Change-Id: I7f49fe354227b3f6566a250332e56b6d70fe2f09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145821
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28616}
2019-07-19 11:19:18 +00:00
Erik Språng
478cb46435 Add GeneratePadding method to replace TimeToSendPadding
Unlike TimeToSendPadding(), the new GeneratePadding() method will
generate RTP packets and put them in the pacer queue, which will be
responsible for actually sending them.

A slight difference from previous logic is that we do not use a lower
bound of 50bytes for getting payload packets, instead we always try and
then abort if the next padding packet is larger than the current
available budget.

Since we're not sending the packets immediately, we don't need to worry
about twcc sequence numbering or updating the stats, that will be
handled by the general SendPacket() codepath. We can also omit the
PacingInfo struct and the return value of bytes sent, as that will
be handled when taking the packets out of the queue.

Bug: webrtc:10633
Change-Id: I066c292805a0bf76c59f68e66c21ea23fdb56c03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143794
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28403}
2019-06-27 13:39:05 +00:00
Erik Språng
1b3f4f9b45 Allow RtpPacketHistory encapsulator function to abort retransmit
Bug: webrtc:10633
Change-Id: I162b2c2f778e8e4c6f31307028db0c352ded2276
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142230
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28312}
2019-06-18 17:59:16 +00:00
Erik Språng
eceb537086 Add RtpPacketHistory::SetSendTime()
This method will be used instead of GetPacketAndSetSendTime() when the
new pacer code path is used, where the packet isn't stored in the
history during pacing.

Bug: webrtc:10633
Change-Id: Ie168125d949cef617ade3868a1858ed1dffe909c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140892
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28240}
2019-06-11 17:49:51 +00:00
Erik Språng
4ffed7ca67 Add field trial for selecting potentially useful packets as padding.
Currently, the packet in the history that most closely matches the bit
budget between two PacedSender::Process() calls is selected to be
retransmitted. This usually means that the smallest packet in the
history is selected over and over.

With this new field trial, we ignore the size constraint (since you're
sending padding, you obviously have some bandwidth to spare) and
instead prefer packets that have the fewest transmission times first,
and after that we prefer new packets over older ones. This way, in
case of available bandwidth but small loss, these padding packets have
a greater chance of actually being useful to the receiver.

Bug: webrtc:8975
Change-Id: I15a69231f44bfbefcb9ab38dd7886b966e3af6fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135954
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28084}
2019-05-28 11:22:19 +00:00
Erik Språng
0f4f055ca6 Don't remove or retransmit packets in the pacer queue.
The main purpose right now of this CL is to avoid the situation
where multiple retransmissions are queued for sending (normally after
network glitch with increased pacer queue length), and some of those
fail sending because the can't be retrieved from the packet history
due to too short time since last sent.

Bug: webrtc:8975, webrtc:10607
Change-Id: I9f6369d83f0b8208e5f57b2dc2fd3f2db7c6fea1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135164
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27884}
2019-05-08 18:28:24 +00:00
Erik Språng
d2a634447f RtpPacketHistory: StoreAndCull default on, support ack removals
Add support for potentially out-of-order removals of packets, using a
vector of sequence numbers that have been acknowledges as received.

Additionally, make kStoreAndCull storage method by default with a
field-trial kill-switch if things go wrong unexpectedly.

Bug: webrtc:8975
Change-Id: I6da8b92d85fc362c12db82976f115626cb1d32d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134307
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27850}
2019-05-03 15:54:03 +00:00
Per Kjellander
252725d986 Rename RtpPacketHistory::PacketState::payload_size -> packet_size
To reflect what this value actually contain.

BUG: webrtc:10325
Change-Id: Ic3c5efbd16157bfae1a2749df17051f105720997
Reviewed-on: https://webrtc-review.googlesource.com/c/123500
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26787}
2019-02-21 06:42:45 +00:00
Danil Chapovalov
6c78ff486a Always verify packet wasn't resend recently before resending it.
Pacer may accept same packet serveral time for resending,
packet may spend non-zero time in pacer queue.
As a result packet can be resend several time within one rtt
wasting bandwidth.

Bug: None
Change-Id: I753a5400b47d3804735e66e539a1b103916d0c94
Reviewed-on: https://webrtc-review.googlesource.com/c/106260
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25205}
2018-10-16 11:26:10 +00:00
Per Kjellander
e9da5f27a4 Reland "Decrease complexity of RtpPacketHistory::GetBestFittingPacket.""
This reverts commit 49b2c3c4c4.

Original CL description:
Decrease complexity of RtpPacketHistory::GetBestFittingPacket.
Use a map of packet sizes in RtpPacketHistory instead of looping through the whole history for every call

patch set 1 contains the initial submit from https://webrtc-review.googlesource.com/c/src/+/98882
new patch sets contains the modification.

The problem with the initial submit was the assumption that packets are removed
from history in the same order as they are added which is not always true.

Bug: webrtc:9731
Change-Id: Ic2c8905a0f47287fc46e53f41a019a4c69c3dd8e
Reviewed-on: https://webrtc-review.googlesource.com/99460
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24687}
2018-09-11 13:54:30 +00:00
Per Kjellander
49b2c3c4c4 Revert "Decrease complexity of RtpPacketHistory::GetBestFittingPacket."
This reverts commit 54caa4b68a.

Reason for revert: Crashes on some perf tests.
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.webrtc.perf%2FLinux_Trusty%2F7170%2F%2B%2Frecipes%2Fsteps%2Fwebrtc_perf_tests%2F0%2Fstdout



Original change's description:
> Decrease complexity of RtpPacketHistory::GetBestFittingPacket.
> Use a map of packet sizes in RtpPacketHistory instead of looping through the whole history for every call.
> 
> Bug: webrtc:9731
> Change-Id: I44a4f6221e261a6cb3d5039edfa7556a102ee6f1
> Reviewed-on: https://webrtc-review.googlesource.com/98882
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24662}

TBR=danilchap@webrtc.org,sprang@webrtc.org,perkj@webrtc.org

Change-Id: Id183cd31a67117e9614d163e4388131fd88de07d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9731
Reviewed-on: https://webrtc-review.googlesource.com/99440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24665}
2018-09-11 05:35:09 +00:00
Per Kjellander
54caa4b68a Decrease complexity of RtpPacketHistory::GetBestFittingPacket.
Use a map of packet sizes in RtpPacketHistory instead of looping through the whole history for every call.

Bug: webrtc:9731
Change-Id: I44a4f6221e261a6cb3d5039edfa7556a102ee6f1
Reviewed-on: https://webrtc-review.googlesource.com/98882
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24662}
2018-09-10 19:09:29 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Danil Chapovalov
d264df587f Replace rtc::Optional with absl::optional in modules/rtp_rtcp
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated using script:
#!/bin/bash
dir=modules/rtp_rtcp
find $dir -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $dir -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ife720849709959046329c1c9faa3f31aa13274dc
Reviewed-on: https://webrtc-review.googlesource.com/83584
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23624}
2018-06-15 09:53:35 +00:00
Erik Språng
a12b1d625c Reland "Rework rtp packet history"
This is a reland of 6328d7cbbc

Original change's description:
> Rework rtp packet history
>
> This CL rewrites the history from the ground up, but keeps the logic
> (mostly) intact. It does however lay the groundwork for adding a new
> mode where TransportFeedback messages can be used to remove packets
> from the history as we know the remote end has received them.
>
> This should both reduce memory usage and make the payload based padding
> a little more likely to be useful.
>
> My tests show a reduction of ca 500-800kB reduction in memory usage per
> rtp module. So with simulcast and/or fec this will increase. Lossy
> links and long RTT will use more memory.
>
> I've also slightly update the interface to make usage with/without
> pacer less unintuitive, and avoid making a copy of the entire RTP
> packet just to find the ssrc and sequence number to put into the pacer.
>
> The more aggressive culling is not enabled by default. I will
> wire that up in a follow-up CL, as there's some interface refactoring
> required.
>
> Bug: webrtc:8975
> Change-Id: I0c1bb528f32eeed0fb276b4ae77ae3235656980f
> Reviewed-on: https://webrtc-review.googlesource.com/59441
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22347}

Bug: webrtc:8975
Change-Id: I162cb9a1eccddf567bdda7285f8296dc2f005503
Reviewed-on: https://webrtc-review.googlesource.com/60900
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#22356}
Reviewed-on: https://webrtc-review.googlesource.com/61661
Cr-Commit-Position: refs/heads/master@{#22438}
2018-03-15 09:54:56 +00:00
Oleh Prypin
5a98049f6a Revert "Reland "Rework rtp packet history""
This reverts commit 7bb37b884b.

Reason for revert: Breaks downstream projects

Original change's description:
> Reland "Rework rtp packet history"
> 
> This is a reland of 6328d7cbbc
> 
> Original change's description:
> > Rework rtp packet history
> > 
> > This CL rewrites the history from the ground up, but keeps the logic
> > (mostly) intact. It does however lay the groundwork for adding a new
> > mode where TransportFeedback messages can be used to remove packets
> > from the history as we know the remote end has received them.
> > 
> > This should both reduce memory usage and make the payload based padding
> > a little more likely to be useful.
> > 
> > My tests show a reduction of ca 500-800kB reduction in memory usage per
> > rtp module. So with simulcast and/or fec this will increase. Lossy
> > links and long RTT will use more memory.
> > 
> > I've also slightly update the interface to make usage with/without
> > pacer less unintuitive, and avoid making a copy of the entire RTP
> > packet just to find the ssrc and sequence number to put into the pacer.
> > 
> > The more aggressive culling is not enabled by default. I will
> > wire that up in a follow-up CL, as there's some interface refactoring
> > required.
> > 
> > Bug: webrtc:8975
> > Change-Id: I0c1bb528f32eeed0fb276b4ae77ae3235656980f
> > Reviewed-on: https://webrtc-review.googlesource.com/59441
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22347}
> 
> Bug: webrtc:8975
> Change-Id: Ibbdbcc3c13bd58d994ad66f789a95ef9bd9bc19b
> Reviewed-on: https://webrtc-review.googlesource.com/60900
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22356}

TBR=danilchap@webrtc.org,sprang@webrtc.org

Change-Id: Id698f5dbba6f9f871f37501d056e2b8463ebae50
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8975
Reviewed-on: https://webrtc-review.googlesource.com/61020
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22358}
2018-03-09 12:28:39 +00:00
Erik Språng
7bb37b884b Reland "Rework rtp packet history"
This is a reland of 6328d7cbbc

Original change's description:
> Rework rtp packet history
> 
> This CL rewrites the history from the ground up, but keeps the logic
> (mostly) intact. It does however lay the groundwork for adding a new
> mode where TransportFeedback messages can be used to remove packets
> from the history as we know the remote end has received them.
> 
> This should both reduce memory usage and make the payload based padding
> a little more likely to be useful.
> 
> My tests show a reduction of ca 500-800kB reduction in memory usage per
> rtp module. So with simulcast and/or fec this will increase. Lossy
> links and long RTT will use more memory.
> 
> I've also slightly update the interface to make usage with/without
> pacer less unintuitive, and avoid making a copy of the entire RTP
> packet just to find the ssrc and sequence number to put into the pacer.
> 
> The more aggressive culling is not enabled by default. I will
> wire that up in a follow-up CL, as there's some interface refactoring
> required.
> 
> Bug: webrtc:8975
> Change-Id: I0c1bb528f32eeed0fb276b4ae77ae3235656980f
> Reviewed-on: https://webrtc-review.googlesource.com/59441
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22347}

Bug: webrtc:8975
Change-Id: Ibbdbcc3c13bd58d994ad66f789a95ef9bd9bc19b
Reviewed-on: https://webrtc-review.googlesource.com/60900
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22356}
2018-03-09 11:42:34 +00:00
Taylor Brandstetter
6d72c3258f Revert "Rework rtp packet history"
This reverts commit 6328d7cbbc.

Reason for revert: Breaks downstream build, due to use of std::pair constructor that some compilers appear to not support yet. See comment.

Original change's description:
> Rework rtp packet history
> 
> This CL rewrites the history from the ground up, but keeps the logic
> (mostly) intact. It does however lay the groundwork for adding a new
> mode where TransportFeedback messages can be used to remove packets
> from the history as we know the remote end has received them.
> 
> This should both reduce memory usage and make the payload based padding
> a little more likely to be useful.
> 
> My tests show a reduction of ca 500-800kB reduction in memory usage per
> rtp module. So with simulcast and/or fec this will increase. Lossy
> links and long RTT will use more memory.
> 
> I've also slightly update the interface to make usage with/without
> pacer less unintuitive, and avoid making a copy of the entire RTP
> packet just to find the ssrc and sequence number to put into the pacer.
> 
> The more aggressive culling is not enabled by default. I will
> wire that up in a follow-up CL, as there's some interface refactoring
> required.
> 
> Bug: webrtc:8975
> Change-Id: I0c1bb528f32eeed0fb276b4ae77ae3235656980f
> Reviewed-on: https://webrtc-review.googlesource.com/59441
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22347}

TBR=danilchap@webrtc.org,sprang@webrtc.org

Change-Id: I2fa7efc7d008c56f7a8f77bc9958c19119f69de8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8975
Reviewed-on: https://webrtc-review.googlesource.com/60880
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22350}
2018-03-08 23:41:24 +00:00
Erik Språng
6328d7cbbc Rework rtp packet history
This CL rewrites the history from the ground up, but keeps the logic
(mostly) intact. It does however lay the groundwork for adding a new
mode where TransportFeedback messages can be used to remove packets
from the history as we know the remote end has received them.

This should both reduce memory usage and make the payload based padding
a little more likely to be useful.

My tests show a reduction of ca 500-800kB reduction in memory usage per
rtp module. So with simulcast and/or fec this will increase. Lossy
links and long RTT will use more memory.

I've also slightly update the interface to make usage with/without
pacer less unintuitive, and avoid making a copy of the entire RTP
packet just to find the ssrc and sequence number to put into the pacer.

The more aggressive culling is not enabled by default. I will
wire that up in a follow-up CL, as there's some interface refactoring
required.

Bug: webrtc:8975
Change-Id: I0c1bb528f32eeed0fb276b4ae77ae3235656980f
Reviewed-on: https://webrtc-review.googlesource.com/59441
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22347}
2018-03-08 19:01:53 +00:00
Erik Språng
788ac70c1f Don't overwrite RTP packets in history within one second or 3x RTT.
This prevents us from prematurely overwriting the packets in the history
if the RTT is underestimated.

Bug: webrtc:8766
Change-Id: I042e8ce74cdce2a0451596f4217779fc856b51f4
Reviewed-on: https://webrtc-review.googlesource.com/42960
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21735}
2018-01-23 17:08:28 +00:00
Erik Språng
8b10192307 Don't overwrite packets in rtp packet history too early
Bug: webrtc:8766
Change-Id: I24029138d366ba54dc5d95be5c06d08d6b1c9575
Reviewed-on: https://webrtc-review.googlesource.com/40506
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21687}
2018-01-18 22:41:18 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc (Browse further)