Upstream commit: https://webrtc.googlesource.com/src/+/cbb4421eacb6079cb14f2a53dbe1f520c3d79089
Remove DeliverPacketAsync.
This is currently unused and since we ultimately don't want the delivery
of packets to be async at this stage (but rather stay on the network
thread), we don't need it.
Bug: webrtc:11993
Change-Id: I6809026b6901c8ecfacd961e98ddf79aaa16d0bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220601
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34152}
Upstream commit: https://webrtc.googlesource.com/src/+/3d46d0b200128dfc919ffabe3172ff5d3c4ca7f1
Proxy: solve event tracing with compile time strings.
This change creates trace events with a single parameter
composed of ClassName::Method.
The change additionally causes the duration of the proxy call to be
traced, not only the occurrence.
Fixed: webrtc:12787
Change-Id: I1689862318d4c6fc1dcef343c3ccf3ae9f7e17df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219788
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34149}
Upstream commit: https://webrtc.googlesource.com/src/+/bd9031bf22c914856ac934b66083e204ebc8619c
dcsctp: Add OnTotalBufferedAmountLow in Send Queue
This is similar to Change-Id: I12a16f44f775da3711f3aa52a68a0bf24f70d2f8
but with the entire send buffer as scope, not a single stream.
This can be used by clients to take alternate action (such as delaying
transmission or using other buffering) if the send buffer ever becomes
full, as they can now be notified when the send buffer is no longer
full.
Bug: webrtc:12794
Change-Id: Icf3be3b118888ffb5ced955fd7ba4826a37140f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220360
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34143}
Upstream commit: https://webrtc.googlesource.com/src/+/791adafa09a1fdf6122e3f5b45c1e397bc6223a0
dcsctp: Add OnBufferedAmountLow in Send Queue
This adds the necessary properties and callback to the Send Queue to
support the bufferedAmount & bufferedAmountLowThreshold properties and
the bufferedamountlow event in RTCDataChannel.
The public API changes and socket support comes in a follow-up CL.
Bug: webrtc:12794
Change-Id: I12a16f44f775da3711f3aa52a68a0bf24f70d2f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219690
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34142}
Upstream commit: https://webrtc.googlesource.com/src/+/9700d88b1ae9406410c42c244cd7f7aedfec15dd
dcsctp: Avoid recalculation of outstanding bytes
Recalculating outstanding bytes is expensive when the congestion window
is large, as it iterates over all inflight data chunks. By doing it
incrementally, it will be a constant operation in most cases, and
in the remaining cases, a function of the number of chunks acked in a
single SACK, which is typically just a few chunks.
Implementing this fix required some refactoring to calculate it
correctly (and to be honest, it was likely done incorrectly previously).
Previously, the state of an item in the retransmission queue was
simplified as "in flight", "acked", "nacked", "abandoned", but these
were not completely orthogonal. A chunk could be abandoned while it was
in-flight or it could be abandoned because it was lost. The difference
between these if that chunk should be accounted for in
outstanding_bytes() or not.
Unit tests have been added to verify this.
Bug: webrtc:12799
Change-Id: I72341538bb0c4f8f89555b08f0c8a28815f0f828
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219623
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34139}
This commit was previously cherry-picked.
Upstream commit: https://webrtc.googlesource.com/src/+/e52cfab63347cd0f7b1ddf68d1f0a9321e0066f1
PipeWire capturer: request mouse cursor to be part of the stream
We need to specify that the cursor should be included in the stream as
by default xdg-desktop-portal defaults to hidden cursor.
Bug: chromium:1202526
Change-Id: Ic4742da2e51f7ed28cb9d7b6b0c069c1fa7d0cee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214782
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34137}
Upstream commit: https://webrtc.googlesource.com/src/+/7f11067110907f99b5bbbba6e3e084369e24498c
Clean up RtpSenderTest and remove RtpSenderEgress dependencies.
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}
Upstream commit: https://webrtc.googlesource.com/src/+/8f8bf252e69a8970fa97e111e618fcd37f089cdb
Remove usage of InjectPacket and transport_ in rtp_sender_unittest
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}
Upstream commit: https://webrtc.googlesource.com/src/+/0d0ed76ac133cd9006c8a0266306f0c687f40024
Fix RTP header extension encryption
Reland of commit a743303211b89bbcf4cea438ee797bbbc7b59e80
Previously, RTP header extensions with encryption had been filtered
if the encryption had been activated (not the other way around) which
was likely an unintended logic inversion.
In addition, it ensures that encrypted RTP header extensions are only
negotiated if RTP header extension encryption is turned on. Formerly,
which extensions had been negotiated depended on the order in which
they were inserted, regardless of whether or not header encryption was
actually enabled, leading to no extensions being sent on the wire.
Further changes:
- If RTP header encryption enabled, prefer encrypted extensions over
non-encrypted extensions
- Add most extensions to list of extensions supported for encryption
- Discard encrypted extensions in a session description in case encryption
is not supported for that extension
- Mark FindHeaderExtensionByUri without filter argument as deprecated
Bug: webrtc:11713
Change-Id: I52a5ade1b94bc01d1c2a35cb56023684fcaf9982
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34129}
Upstream commit: https://webrtc.googlesource.com/src/+/770acabd5d882eba5dbc7042fa5561d1631d2fe9
Refactor mid/rid rtp tests to avoid using egress/transport logic.
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}
This commit was previously cherry-picked.
Upstream commit: https://webrtc.googlesource.com/src/+/8d9d575920a906bbf2a7b4c5b10f0ccf046f1cb8
PipeWire capturer: fix stream width in PW 0.2 code
Set we don't use full stream width. This follows same code as in PW 0.3
case, it was just accidentally omitted.
Bug: chromium:682122
Change-Id: Ifb9200a14387ba9b9da3246c9c4e30306393c4e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214700
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Wez <wez@google.com>
Cr-Commit-Position: refs/heads/master@{#34124}
Upstream commit: https://webrtc.googlesource.com/src/+/4fbc3fc59e75615a17722cb93ae0d18caff5ee2e
Move SendPacketUpdates* tests to rtp_sender_egress_unittest.
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}
Upstream commit: https://webrtc.googlesource.com/src/+/fade919bb16c2b11f20aeacc24537ab3f63c98ac
Partial revert: "Use unordered map in RtpDemuxer"
While the savings were positive in Media Servers, there was a regression
in some scenarios (crbug.com/webrtc/12718) so let's revert it.
This partially reverts commit 553fd3220b7b1a476af6759b27b3a274677d21e3.
Bug: webrtc:12718
Change-Id: If9252fd996ffc5efd7609eb4c7c0e7f001893676
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220103
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34117}
Upstream commit: https://webrtc.googlesource.com/src/+/238da9a57eb9eb45c8ee356d4f334fe797fcaa42
Remove obsolete SendPacketMatches* tests from rtp_sender_egress_unittest.
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}
Upstream commit: https://webrtc.googlesource.com/src/+/af0dff0c7daa6964cfd95125428f2ce6f3c14668
dcsctp: start SCTP_DUMP on a new line
for consistency with usrsctp_dumppacket which prefixes its output with a newline.
This makes the packets easier to grep and process with text2pcap.
BUG=webrtc:12614
Change-Id: I67bc2e0026250b21b030daf967ebc697640f2d7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220102
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@nvidia.com>
Cr-Commit-Position: refs/heads/master@{#34114}
Upstream commit: https://webrtc.googlesource.com/src/+/36005afeb470bc1a54e6fd6af5ce7ca4341941df
Refactor and improve RtpSender packet history test.
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}
Upstream commit: https://webrtc.googlesource.com/src/+/02c0295a98130d6fb39ec6676bd9633091ea5b1b
Remove obsolete DCHECK in RtpPacket::CopyHeaderFrom
This check was important when header bytes were copied from source
packet to destination, but current implementation (new line 123) slices
the source packet, making capacity of the destination packet irrelevant.
Bug: b/189015462
Change-Id: I7e649cb7dfc6ba0fbe989c943e6515ab0da05fef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219695
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34110}
Upstream commit: https://webrtc.googlesource.com/src/+/6396b48b18597beb5108347421efab23c5a7bbea
Avoid modifying BWE internal state on reception of REMB feedback.
Instead, cap the final bandwidth estimate by the last received cap. This allows fast rampup after a REMB cap is lifted.
Bug: webrtc:12306
Change-Id: Ia99707134ce145275460524b3e46923876fdf62f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219696
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34109}
Upstream commit: https://webrtc.googlesource.com/src/+/c09c58134a46038c0dc37b4252a60a2756beb9dc
dcsctp: Limit the size of generated SACK chunks
Today, there is no actual limit on how large a SACK chunk can be. And
having limits is good to be able to stay within the MTU.
This commit adds a limit to the number of reported duplicate TSNs as
well as the number of reported gap-ack-blocks in a SACK chunk. These
limits are never expected to be reached in a real-life situation.
Bug: webrtc:12614
Change-Id: Ib2c143714a214cd3d961e8a52dac26a04b909b80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219464
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34108}
Upstream commit: https://webrtc.googlesource.com/src/+/41a111d5b944d48fcb1fbdcbf08622624b5750f7
Switch to av_packet_alloc()
ffmpeg is going to be hiding the implementation of AVPacket, so we can't
allocate them on the stack anymore. av_init_packet is marked deprecated
on TOT ffmpeg, so remove its use everywhere in favor of av_packet_alloc
and av_packet_free.
Bug: chromium:1211508
Change-Id: I154311071123110dd749c71dec1ec2a0452b3908
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217780
Commit-Queue: Ted Meyer <tmathmeyer@google.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34106}
Upstream commit: https://webrtc.googlesource.com/src/+/816134a8aa878f0664689016f2118881274c62a4
Reland "Fix race between enabled() and set_enabled() in VideoTrack."
This reverts commit 096ad02c02b4bc6c046282b8793ef84d041dd0d8.
Reason for revert: Including a fix for the test issue.
Original change's description:
> Revert "Fix race between enabled() and set_enabled() in VideoTrack."
>
> This reverts commit 5ffefe9d2d743c66f8a8bcbc5ad9662a3138840a.
>
> Reason for revert: Breaks Chromium Android browser tests on fyi bots.
>
> Original change's description:
> > Fix race between enabled() and set_enabled() in VideoTrack.
> >
> > Along the way I introduced VideoSourceBaseGuarded, which is equivalent
> > to VideoSourceBase except that it applies thread checks. I found that
> > it's easy to use VideoSourceBase incorrectly and in fact there appear
> > to be tests that do this.
> >
> > I made the source object const in VideoTrack, as it already was in
> > AudioTrack, and that allowed for making the GetSource() accessors
> > bypass the proxy thread hop and give the caller direct access.
> >
> > Bug: webrtc:12773, b/188139639, webrtc:12780
> > Change-Id: I022175c4239a1306ef54059c131d81411d5124fe
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219160
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34096}
>
> TBR=mbonadei@webrtc.org,tommi@webrtc.org,landrey@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I16323d459c76eb6a87cc602a0048f6ee01c81626
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:12773
> Bug: b/188139639
> Bug: webrtc:12780
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219637
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#34101}
# Not skipping CQ checks because this is a reland.
Bug: webrtc:12773
Bug: b/188139639
Bug: webrtc:12780
Change-Id: Ib35fe15a6c43de8f286d60aff02b19df1ab76925
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219639
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34104}