The config flag will be removed once downstream usage is gone.
Bug: webrtc:11340
Change-Id: Iee8816660009211540d9b09bb3cba514455d709b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228431
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34757}
This prepares for deferred sequence numbering, and is (sort of)
extracted from
https://webrtc-review.googlesource.com/c/src/+/208584
Bug: webrtc:11340, webrtc:12470
Change-Id: I2f3695309e1591b9f7a1ee98556f4f0758de7f69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227352
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34643}
Since all test cases that used RtpSenderEgress have been refactored or
moved, we can now get rid of lot of test fixture crud:
* Remove RtpSenderContext helper, make sender normal member.
* Remove test transport helper
* Remove task queue helper (needed for thread checks in egress)
* Remove various mocks no longer used
* Remove RtpSenderWithoutPacer subclass
* Remove WithWithoutOverhead parametrization (only affect egress)
..plus some cleanup of how configs are created.
Bug: webrtc:11340
Change-Id: I5c581d60862fc6dc2b99f76058782309dc7aef4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220280
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34135}
Thus removing dependency on RtpSenderEgress, allowing simplification of
the test fixture in a follow-up.
Bug: webrtc:11340
Change-Id: I9772bab18d1f4a04e0deccc9125d4b1c16c30d7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219627
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34132}
This CL makes a number of test use the paced sender callback to verify
the output of RTPSender, instead of re-parsed data from RtpSenderEgres.
Bug: webrtc:11340
Change-Id: I13ccf5a5db4b6df128cf2fa9e8dad443fcd15cdd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220162
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34126}
These should be the last of the testis from rtp_sender_unittest.cc that
should be moved and refactored to just test RtpSenderEgress.
Bug: webrtc:11340
Change-Id: Id09d7bbade608dd7194dcd8843d4f2887842a372
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220140
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34118}
These tests were likely made back when PacketRouter was iterating over
the RTP modules to find the correct to send on. Now that this is just
a DCHECK, it's already implicitly covered by other tests that actually
test the respective packet type functionality. Let's thus just remove
these old tests.
Bug: webrtc:11340
Change-Id: I244ca7e365378f4e48a601464b5df0e1d07732be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219621
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34116}
This CL refactors RtpSenderTest.SendPacketHandlesRetransmissionHistory,
moves some testing to rtp_ender_egress_unittest and adds test coverage
for a few cases.
Bug: webrtc:11340
Change-Id: Ic225d2af43c3926f69fe3ea45f41b18c29b8b4fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219796
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34111}
This simplifies some tests and removes dependency on RtpSenderEgress
for those tests in rtp_sender_unittest.
Bug: webrtc:11340
Change-Id: I37489875947b0ac48a1742d2e9945510ee002f99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219624
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34099}
This is a follow-up to r34019. It adds checks for when padding can be
sent before media - and how timestamps are set on RTX padding.
Bug: webrtc:11340
Change-Id: I46fbd3c3eff9e308b5c65220718df749f2d9c46b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219162
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34041}
Reduce to testing what RTPSender is actually interested in: that
packets are actually forwarded to the pacer.
Partially the old test was verifying TransmissionOffset header extension,
add an explicit test for that at RtpRtcp-level instead.
Bug: webrtc:11340
Change-Id: I62be39e1d9d8c214c3277f4f1326db05b937674a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218845
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34023}
Simplifies the test so that it only tests the padding-related parts.
Header extensions for padding already has a dedicated test, as does
packet stats from RtpSenderEgress.
Bug: webrtc:11340
Change-Id: I88829409aac15f0aad0d4d634114731e819574bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218844
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34019}
Moves OnSendSideDelayUpdated and OnSendPacketUpdated out from
rtp_sender_unittest and into rtp_sender_egress_unittest and
rtp_rtcp_impl2_unittest. The former test now only tests the logic for
updating send-side-delay stats. The latter is now on a proper
RtpRtcp-level and also verifies that frame timestamps makes it to the
egress (as assumed by the first test).
Bug: webrtc:11340
Change-Id: I784042ad91eb66a4d1eebdbbc625f9522528bfb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218502
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33996}
New tests (transport sequence number plus newly added abs send time) now
test more of production code and less of rtp_sender_unittest.cc test
fixture code.
Bug: webrtc:11340
Change-Id: I8ec0022c3d18467a4144ce984996af1a452760dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216327
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33895}
The extracts and refactors some test code from rtp_sender_unittest.cc
and puts it in a new target intended to only test RtpSenderEgress, and
do it as pure unit test, rather than the unholy
not-quite-unit-not-quite-integration-test thingy we have today.
Only a first test case is actually ported with this CL, but it's a
start...
Bug: webrtc:11340
Change-Id: Ie2cdde63a00a6ff6eba7b8d443eeb76ce2a527c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216180
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33841}
This prepares for ability to defer sequence number assignment to after
the pacing stage - a scenario where the RtpRtcp module rather than than
RTPSender class has responsibility for sequence numbering.
Bug: webrtc:11340
Change-Id: Ife88f60258b9b7cfd9dbd3326f02ac34da8f7603
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214967
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33702}
These functions are not longer used by the RtpRtcp implementations.
Bug: None
Change-Id: Ibc36433b253b264de4cdcdf380f5ec1df201b17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33282}
When calculating maximum allowed size for a media packet.
In particular take in account that rtx packet might need to
include mid and repaired-rsid extensions when media packet can omit them.
Bug: webrtc:11031
Change-Id: I3e7bc36437c23e0330316588d2a46978407c8c45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206060
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33184}
This CL:
1) Updates RtpSenderVideo to actually populate the is_key_frame field
properly.
2) Updates UlpfecGenerator to:
* Allow updating the protection parameters before adding any packet.
* Apply keyframe protection parameter when at least one buffered
media packet to be protected belongs to a keyframe.
Updating the parameters in the middle of a frame is allowed, at that
point they only determine how many _complete_ frames are needed in order
to trigger FEC generation. Only that requirement is met, will the
protection parameters (e.g. FEC rate and mask type) actually be applied.
This means that delta-frames adjecent to a key-frame (either ahead of
or after) may be protected in the same way as the key-frame itself.
Bug: webrtc:11340
Change-Id: Ieb84d0ae46de01c17b4ef72251a4cb37814569da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195620
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32787}
This CL fixes a bug where the RtpPackeToSend::fec_protect_packet flag
was not cleared when a packet copy was fetched from the packet history
in order to be retransmitted. This caused the packet to be added to the
FEC generator a second time when the retransmission passed through
RtpSenderEgress.
The bug did not affect RTX retransmission and only manifests when using
deferred FEC generation.
Bug: webrtc:11340
Change-Id: Ic7ce2800cce9a99e74bd3dd697bc0779d2a02fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185817
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32227}
It is not longer needed by the rtp_rtcp module.
Bug: webrtc:6471
Change-Id: I89a4374a50c54a02e9f20a5ce789eac308aaffeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179523
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31773}
Some classes such as RtpSenderEgress makes assumptions about which
threads (e.g. paced sender vs worker thread) call specific methods.
Unit tests currently are single threaded so these checks are
essentially noops.
This change uses a separate task queue for calls epected to be called
by the pacer, so that inconsistencies in thread can be detected early.
Bug: None
Change-Id: Ic0904304a67eb034033524e62306da34b9eab8b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178602
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31628}
This is a reland of 19df870d92
Patchset 1 is the original.
Subsequent patchset changes threadchecker that crashed with downstream
code.
Original change's description:
> Reland "Allows FEC generation after pacer step."
>
> This is a reland of 75fd127640
>
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
>
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
>
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}
Bug: webrtc:11340
Change-Id: Ib741c8c284f523c959f8aca454088d9eee7b17f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178600
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31619}
This reverts commit 19df870d92.
Reason for revert: Downstream project failure
Original change's description:
> Reland "Allows FEC generation after pacer step."
>
> This is a reland of 75fd127640
>
> Patchset 2 contains a fix. Old code can in factor call
> RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
> is not supported there - we shouldn't crash.
>
> Original change's description:
> > Allows FEC generation after pacer step.
> >
> > Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> > This CL enables FEC packets to be generated as media packets are sent,
> > rather than generated, i.e. media packets are inserted into the fec
> > generator after the pacing stage rather than at packetization time.
> >
> > This may have some small impact of performance. FEC packets are
> > typically only generated when a new packet with a marker bit is added,
> > which means FEC packets protecting a frame will now be sent after all
> > of the media packets, rather than (potentially) interleaved with them.
> > Therefore this feature is currently behind a flag so we can examine the
> > impact. Once we are comfortable with the behavior we'll make it default
> > and remove the old code.
> >
> > Note that this change does not include the "protect all header
> > extensions" part of the original CL - that will be a follow-up.
> >
> > Bug: webrtc:11340
> > Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31558}
>
> Bug: webrtc:11340
> Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31613}
TBR=sprang@webrtc.org,srte@webrtc.org
Change-Id: I3b2b25898ce88b64c2322f68ef83f9f86ac2edb0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178563
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31614}
This is a reland of 75fd127640
Patchset 2 contains a fix. Old code can in factor call
RtpRtcpImpl::FetchFec(). It should only be a noop since deferred fec
is not supported there - we shouldn't crash.
Original change's description:
> Allows FEC generation after pacer step.
>
> Split out from https://webrtc-review.googlesource.com/c/src/+/173708
> This CL enables FEC packets to be generated as media packets are sent,
> rather than generated, i.e. media packets are inserted into the fec
> generator after the pacing stage rather than at packetization time.
>
> This may have some small impact of performance. FEC packets are
> typically only generated when a new packet with a marker bit is added,
> which means FEC packets protecting a frame will now be sent after all
> of the media packets, rather than (potentially) interleaved with them.
> Therefore this feature is currently behind a flag so we can examine the
> impact. Once we are comfortable with the behavior we'll make it default
> and remove the old code.
>
> Note that this change does not include the "protect all header
> extensions" part of the original CL - that will be a follow-up.
>
> Bug: webrtc:11340
> Change-Id: I3fe139c5d53968579b75b91e2612075451ff0f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177760
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31558}
Bug: webrtc:11340
Change-Id: I2ea49ee87ee9ff409044e34a777a7dd0ae0a077f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177984
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31613}
On the way remove need for lock for
rtp_sequence_number_map_ and timestamp_offset_.
Change-Id: I21a5cbf6208620435a1a16fff68c33c0cb84f51d
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177424
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31581}
The timer fired a Notify call that goes to an object that already
receives callbacks for every packet from RtpSenderEgress.
Further optimizations will be realized by moving ownership
of the stats to the worker thread and then be able to remove
locking in a few classes that currently are tied to those
variables and the callbacks that previously did not come
from the same thread consistently.
We could furthermore get rid of one of these callback interfaces
and just use one.
Bug: webrtc:11581
Change-Id: I56ca5893c0153a87a4cbbe87d7741c39f9e66e52
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177422
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31575}