Add media config for using environment monotonic timestamps (i.e. not UTC) in RTCStats constructor, and implemented the usage of the flag.
Bug: chromium:369369568
Change-Id: Ia93d048742c28af201164fe7b2152b791bb6d0b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363946
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#43156}
This reverts commit bdc669347c70160cd648f5cab7a417227d41d82a.
Reason for revert: AUDs will be taken into account now.
video_replay with the provided out.pcap and these options:
--codec H264 --input_file out.pcap --media_payload_type 102 --ssrc 40000
plays smoothly.
Original change's description:
> Revert "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
>
> This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.
>
> Reason for revert: Break assembling of hardware encoded h264 P frame on
> weak network condition.
>
> Original change's description:
> > h264: fix first_packet_in_frame logic for multislice in a single rtp packet
> >
> > 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}
>
> Bug: webrtc:368335257
> Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#43062}
Bug: webrtc:368335257
Change-Id: Idfae2efc1ebd7b97a2f7ebbd9d1e8c7bf6fcc348
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363842
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43113}
This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.
Reason for revert: Break assembling of hardware encoded h264 P frame on
weak network condition.
Original change's description:
> h264: fix first_packet_in_frame logic for multislice in a single rtp packet
>
> 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}
Bug: webrtc:368335257
Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43062}
Passing Environment instead of Clock into this class simplifies some plumbing for downstream consumers that need to read field trials within this class.
Bug: webrtc:362762208
Change-Id: Ia501e9f7f1d91a8115a2f71fb005dd35146db172
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362535
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@{#43048}
They are now passed as part of the Environment
Bug: webrtc:362762208
Change-Id: I02868e9f41533a546f62fe30fdc6f3a7708eb346
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362084
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43032}
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}