to avoid relying on the global field trials.
Bug: webrtc:362762208
Change-Id: I94e96f0a3f16cfd64f7deb4deb4aaa924ac1bba8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361865
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42982}
This makes it simpler to use in more contexts.
Bug: b/364184684
Change-Id: I1b08ebd24e51ba1b3f85261eed503a78cd006fd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361480
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42956}
ModuleRtpRtcpImpl and ModuleRtpRtcpImpl2 share certain components, RtcpReceiver in particular.
To always have Environment in RtcpReceiver both legacy and new module need to propagate it.
No-Iwyu: suggests too many changes, better address them separately.
Bug: webrtc:362762208
Change-Id: I2c885f57e24f135229fb7cd9781126d663017b3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361142
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42908}
And checks similar fields in Configuration struct are not set.
Migrate rtp_rtcp to use new constructor.
Bug: webrtc:362762208
Change-Id: I2385439c169a7432d174c72ca57ecb0ca639d864
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361100
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42896}
same as they attached to other packets.
Otherwise there is risk that ssrc will be acked after few initial pure padding packets are sent, before remote endpoint seen any mid or rid attached.
Bug: b/361257385
Change-Id: I695b379221debe2518ad33d13d65620877f0b2a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360660
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42851}
by encryption a packet with sequence number 65535 followed
by a packet with sequence number 1. The second packet is encrypted
with a SRTP ROC of 1 as described in
https://datatracker.ietf.org/doc/html/rfc3711#section-3.3.1
The packets are (received and) decrypted in a different order,
the packet with sequence number 1 (and ROC=1) is decrypted first.
Since the ROC is maintained locally the decrypting session assumes
it to be 0.
Why is that a problem? The RFC recommends estimating the ROC with +-1 which, as demonstrated by the test, libSRTP does not.
But this is a rare problem that requires a random in a high range combined with packet loss/reordering which turns into no-a-problem if you choose carefully as done by packet_sequencer.cc which restricts the initial sequence number in the range 0..32767 which means you do not run into this issue in production.
See also Q6 in libsrtp's historical documentation at
https://srtp.sourceforge.net/historical/faq.html
BUG=webrtc:353565743
Change-Id: I9bd72b198c946937aeb25c229005a0c682447f53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358360
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42798}
This can happen when VP8 simulcast is negotiated while two-byte header
extensions are not negotiated via extmap-allow-mixed. For VP8 the
DD extension would be 23 bytes long which exceeds the maximum size
of 15 bytes for a one-byte header extension.
To test, revert
f04b52b4a7
and test using VP8.
Note that this works for VP9, AV1, H264 out of the box.
BUG=webrtc:40191093
Change-Id: I2f5d04d8b58b71d32547b06fab6b9a9006df9f1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359623
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42786}
To make it available for FEC to use field trials in follow ups
Bug: webrtc:355577231
Change-Id: I4a6260a38e50a70dae27db28401b08bf0160aaec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358680
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42740}
To make it available for FEC to use field trials in follow ups
Bug: webrtc:355577231
Change-Id: Ie0b7761915696e6ee7453df3d0531b0f7ad30ee1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358240
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42732}
Old copy of the header and some previous usage is kept around
for compatibility with downstream projects for now.
Bug: chromium:345101934
Change-Id: Icbe42fb8450d3a4115799438d209da4eda127bab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357441
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42681}
a frame must be (or should be) first when it contains either SPS (but not just PPS),
is an IDR or is a slice with first_mb_in_slice == 0.
Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
into a single RTP packet which can happen with small 320x196 frames
BUG=webrtc:352379280,webrtc:346608838
Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42652}
All known users are updated to use ntp_time_util.h directly
Bug: webrtc:343076000
Change-Id: I7229b9e5dd72d83bfd98ba4050ae7583d792575b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357300
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42645}
This is cherry-picked from WebKit's patch for fixing a fuzzer failure.
The original patch: https://github.com/WebKit/WebKit/pull/30438
Bug: chromium:41480904
Change-Id: Ic8eddb9de816c4c8d720dac6d4c55d1db3f0596e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356361
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#42598}
This is a forward fix for https://webrtc-review.googlesource.com/c/src/+/354622 that breaks client code using nalus_length.
No-Try: true
Change-Id: Ic0fc41696e408adefe4eb8792150a64b1eab49da
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354840
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42493}
and files that broke when I fixed the first set.
Bug: webrtc:42226242
Change-Id: I321cd63537ab3002098c7bdecd889a6fc5a1eb25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353421
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42429}
Split out time_util.h and cc from target rtp_rtcp to its own target.
This is to avoid possible circular dependencies and not having all targets using them to depend on the full RtpRcp module.
Bug: webrtc:343076000
Change-Id: I7b3c84456b17f1920f71afdd5a644d27e28caed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42392}
This depenency is not needed and may lead to a circular dependency. The cl removes old unused functionaliy to log BWE related statistics using compile time flags.
Bug: webrtc:42225697
Change-Id: I6cc01b367c0c48ab30f34c12a10afc58d1e7822f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352142
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42386}
This makes the downcasts currently used in eg
modules/rtp_rtcp/source/rtp_sender_video_frame_transformer_delegate.cc
safer.
Bug: webrtc:339815768
Change-Id: Ie6c7ab84666d399dbca4c95846b850aac5327f1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350361
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42325}
This reverts commit e1607ed3a6.
Reason for revert: downstream project adjusted
Original change's description:
> Revert "h264: bail out early when failing to parse SPS/PPS ids"
>
> This reverts commit 4344eb713b.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > h264: bail out early when failing to parse SPS/PPS ids
> >
> > This currently gets caught later in the process by the H264 SPS/PPS
> > tracker but can be rejected explicitly here. The network observable
> > behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams
> >
> > BUG=webrtc:337076010
> >
> > Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Philipp Hancke <phancke@meta.com>
> > Cr-Commit-Position: refs/heads/main@{#42211}
>
> Bug: webrtc:337076010
> Change-Id: I15b815c69f1d25e41fb222d46359655242589fba
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349661
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42217}
Bug: webrtc:337076010
Change-Id: Ibe5a960b9b5fdf9a35e5dfffb47b78ade36b0cec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349700
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42223}
This reverts commit 4344eb713b.
Reason for revert: Breaks downstream project.
Original change's description:
> h264: bail out early when failing to parse SPS/PPS ids
>
> This currently gets caught later in the process by the H264 SPS/PPS
> tracker but can be rejected explicitly here. The network observable
> behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams
>
> BUG=webrtc:337076010
>
> Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42211}
Bug: webrtc:337076010
Change-Id: I15b815c69f1d25e41fb222d46359655242589fba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42217}
Support for parsing the packet is gated behind field trial
WebRTC-RFC8888CongestionControlFeedback/Enabled/.
Bug: webrtc:15368
Change-Id: Ib4478e821fe5a43510af5131543e7861cf54d901
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348664
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42215}
This currently gets caught later in the process by the H264 SPS/PPS
tracker but can be rejected explicitly here. The network observable
behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams
BUG=webrtc:337076010
Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42211}
Implements a two-pass approach to packetization which creates
packets of an even size similar to RtpPacketizer::SplitAboutEqually.
This improves the bandwidth estimation.
The algorithm does a first pass with the existing packetizer, then
iterates through the resulting packet sizes and sums up the bytes left unused in each packet.
It then calculates a new maximum packet length as
configured_max_packet_len - ((unused_bytes - packets + 1) / packets)
adjusts for the overhead and re-runs the packetization algorithm.
For example, a list of OBUs with sizes
{1206, 1476, 1431}
currently gets packetized greedily as payload sizes
{1200, 1200, 1200, 523}
With this change, it gets packetized as
{1032, 1032, 1032, 1028}
This change is guarded by the field trial
WebRTC-Video-AV1EvenPayloadSizes
which is acting as a rollout flag.
BUG=webrtc:15927
Co-authored-by: Shyam Sadhwani <shyamsadhwani@meta.com>
Change-Id: I4f0b3c27de6f06104908dd769c4dd1f34115712c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348100
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42203}
This cl adds an implementation of the RTCP feedback packet as specified in https://www.rfc-editor.org/rfc/rfc8888.html
Bug: webrtc:15368
Change-Id: I0b9a7fb15512ff9f9e721efd8e03ebe981a8d9bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347901
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42140}