Useful for when creating aggregate stats objects, seems like an
oversight that we don't have it already.
Bug: None
Change-Id: Ied36afd2122464a81c7d725825353f9af59fe632
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376220
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43844}
Whenever encoding info change, this ToString() method is called for some
LS_INFO logging inside video_stream_encoder.cc. Apparently the char
buffer used for constructing this string is not large enough because I
can get WebRTC to crash in a demo page that gets and sets a lot of
parameters.
By changing to rtc::StringBuilder, we don't have to make assumptions
about how long the string can get at runtime.
Bug: None
Change-Id: I32695523282143a301c0e13e06082d55bd2796b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375520
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43805}
The old version of these returns -1 when the value is not set.
Optional is better.
Bug: webrtc:42220231
Change-Id: Ideb0f51fd8bb7b5aa490743eb3b5d95998efbd1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374483
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43786}
Drive-by: fix MakeVal in rtc_base/checks.h to ensure that StrCat is
used for types that have AbslStringify.
Bug: None
Change-Id: Ia78c65da18b4a826365a6a2c741f11809640197f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374345
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43779}
Needed for testing in a follow-up CL.
Using ToString rather than absl::StrCat because I want the name of the
enum (e.g. "INVALID_MODIFICATION") as opposed to the enum value (int).
Bug: none
Change-Id: I45a925fad65395d1e6a886a9f787c2f360fb8604
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374343
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43777}
by storing
[[LastCreatedOffer]] / [[LastCreatedAnswer]]
which are similar to the W3C equivalent but as
description objects instead of serialized SDP strings.
While rejecting all SDP munging is not feasible, this lets us
measure and reject certain modifications gradually.
Chromium metrics CL:
https://chromium-review.googlesource.com/c/chromium/src/+/6089633
This is measured at three points during the lifetime of a peerconnection:
* for the first SLD call
* when the connection is first established
* when the connection was established and is being closed
Note that the "first" SDP munging detected is returned which may hide that something uses more than one modification.
BUG=chromium:40567530
Change-Id: I964e3ee6e75f73b777d90556fac8691a6f3dc27f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43741}
At Meta, we have formatted the repo according to WebRTC .clang-format
file. Currently, those changes are stored as patch and we'd like to
apply them to the base WebRTC release instead.
I will be submitting CLs per folder. The plan is to format all h|cc|mm|m
files, while exlcuding Matlab files from the formatter as clang
misinterprets them as ObjC.
Formatting done via:
git ls-files | grep -E '^api\/.*\.(h|cc)' | xargs clang-format -i
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I4d7470104983d5d32612f9347301354265fb34c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373520
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43671}
Useful for other CLs.
Bug: None
Change-Id: I3afec582c86a8263ad59a1a9f4ac131a451aa1e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372300
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43615}
When echo controller factories are updated, it would be possible to pass Environment into EchoCanceller3 and thus rely on propagated field trials.
Bug: webrtc:369904700
Change-Id: Iba9c04edbaab23277874234bd289e2c37625b1c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43614}
With this CL, the decision if an RTP packet should be sent as ect(1) is made in RtpControllerSend depending on if RFC 8888 has been negotiated and if CCFB is received with ECN enabled.
Since webrtc does not yet adapt to ECN feedback, packets are sent as ECT(1) until the first feedback is received.
Change-Id: Iddf63849328afbe54a7c8f921f2e8db134aeff6a
Bug: webrtc:42225697
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367388
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43609}
which implements the handshaking logic of the DTLS-STUN piggybacking.
Not wired up yet, split from
https://webrtc-review.googlesource.com/c/src/+/362480
BUG=webrtc:367395350
Change-Id: I9ee8ff17af4ec96fb891d9852ac50825155735a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370679
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43606}
Demonstrates use of matchers and WaitUntil to have tests that are more
understandable during failure.
Drive by changes,
* Remove the `const` on RTCStats.id_ as to allow for the implicit copy
constructor.
* Add [[nodiscard]] to WaitUntil as it is not useful without checking
the return value.
Bug: webrtc:381524905
Change-Id: I379910ce0fc8d9d81c96b8f164aa5a040637c85a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370802
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43599}
It is not used so we don't need it.
Bug: webrtc:384483059
Change-Id: I99a4c3dca0881c56d5cd6eb41430505f2c9ccb03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371700
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43578}
This allows other tests using RTC stats to get pretty printing as well.
Bug: webrtc:381524905
Change-Id: Ib1eb9e1dad36b89e5b1c2ec687fcfeb308f82939
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370761
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43575}
The negotiation of encrypted header extensions has already been enabled in Chromium, https://chromium-review.googlesource.com/c/chromium/src/+/5933829. Hence, it make sense to enable the encryption of header extensions by default also in webRTC environment so that all the tests run by taking this into considiration when new changes are made.
Bug: webrtc:358039777
Change-Id: I141fac01b0eb0f2ce5a0a365736f0dcf9f21ddcd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43573}
This reverts commit e046787a5a80a9d292b3aec7e946644e025a2b95.
Reason for revert: Revised codec matching to fix issue.
Changes also back out some changes that should not have been
included (using PayloadTypePicker for codec list merging).
Original change's description:
> Revert "Use PayloadTypePicker for video PT assignment"
>
> This reverts commit e5048949b0fcc275264e24f3b2a4c658fcc84aa3.
>
> Reason for revert: Broke internal tests.
>
> Original change's description:
> > Use PayloadTypePicker for video PT assignment
> >
> > This includes changes that change the order of codecs.
> > It is preparatory to doing late assignment of video PTs.
> >
> > Bug: webrtc:360058654
> > Change-Id: Id5ddaf94d4b9557c0502a373e42635108d8fdf26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366400
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43489}
>
> Bug: webrtc:360058654
> Change-Id: I5c94a7bafa49bdf17f665480398707155e458d26
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370240
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43490}
Bug: webrtc:360058654
Change-Id: I66b3b6bd657c66f8860c5e67a504266d7707f48d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370380
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43554}
BuiltinAudioProcessingBuilder should be used instead.
This would allow AudioProcessingImpl to have Environment construction parameter and thus use propagated rather than global field trials.
Bug: webrtc:369904700
Change-Id: I4fcc299bb9e65c109a3fe476c755a81c2aea551c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368480
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43553}
Previous CLs that disabled the rtc_enable_libevent build flag
did not reveal issues. Now continue to remove the source code for
the task queue.
Bug: webrtc:42224654
Change-Id: I0866b4b56f0a8d8b56a5b604c31a426d77ab8d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43550}
dtls_transport will when detecting a new fingerprint
(e.g by usage of pranswer) signal DtlsTransportState::kNew.
When this happen, the dtls crypto state is lost, and
sctp should reconnect, srtp does this automatically
in current code base.
The existing behavior in dcsctp is that it will detect
peer sending an init, and reconnect. But any messages sent
between the dtls restart and the message arriving from the
peer will be lost.
This patch changes so that this case is gracefully handled by
a) letting dcsctp_transport listen to dtls state
this is big part of patch and involves changing the type of
the underlying dtransport from rtc::PacketTransportInternal to cricket::DtlsTransportInternal. If requested, I can put this
into a separate patch...
b) if a dtls restart happens, delete and restart socket.
Testcase that fails before patch and works after is attached.
Bonus: And include-what-you-use on patch
Bug: b/375327137
Change-Id: Ib78488ae75fd8aeb50d121adf464a33dabbf95e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367202
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43546}
removing the webrtc need for having sources in it.
BUG=webrtc:42226155
Change-Id: I40fbde9064f4fa629c7c6b0cf99f23ab1726da75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43540}
As of 485f2be7c1, this no longer has any effect; instead, the ABSL_NULLABILITY_COMPATIBLE attribute which is already present on the class determines whether a class is compatible with nullability annotations.
Bug: None
Change-Id: I5aeca86c86c2b6eadb2644695ee3621e92f1f568
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43532}
This replaces the WaitUntilCondition function that was used in the
peer_connection_encodings_integrationtest previously. Along with that it
adds tests and improved error message printing.
As a drive-by, matchers were added for RTCError as these are the return
type of this utility function.
Bug: webrtc:381524905
Change-Id: If7ff18692396d3996b5b289f2d2c92520226003e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43494}
0 is natural default value for types that can be accumulated
Having default constructor simplify usage of these types in templated code.
Bug: None
Change-Id: If005c69018a2a11011bc789502fdbc600cad3278
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43460}
This is a reland of commit 38ddea5ee3320bf3441aeb3654e099b3695c9789
Original change's description:
> Add InsertPacket method that takes RtpPacketInfo.
>
> The version which only passes receive_time will be removed (once migrated).
> Keeping the version that only passes header and payload for convenience.
>
> This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
>
> Bug: webrtc:42223109
> Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43445}
Bug: webrtc:42223109
Change-Id: I97d1d3d390e6d3de8bf9355b895ec336339d079f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369260
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43454}
This reverts commit 38ddea5ee3320bf3441aeb3654e099b3695c9789.
Reason for revert: not backwards compatible
Original change's description:
> Add InsertPacket method that takes RtpPacketInfo.
>
> The version which only passes receive_time will be removed (once migrated).
> Keeping the version that only passes header and payload for convenience.
>
> This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
>
> Bug: webrtc:42223109
> Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43445}
Bug: webrtc:42223109
Change-Id: Ie7cf397cfbe5dedca009f16e5e9e3af40adbe99b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369200
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43450}
The version which only passes receive_time will be removed (once migrated).
Keeping the version that only passes header and payload for convenience.
This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
Bug: webrtc:42223109
Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43445}
This is a prerequisite for enabling implementation-specific filter
settings for automatic corruption detection.
Bug: webrtc:358039777
Change-Id: I363c592aa35164f690dd4ad1204e90afc0277d8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368940
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43443}
- Add `WebRTC-Audio-OpusDecodeStereoByDefault` field trial
- Behind that field trial, `AudioDecoderOpus::SdpToConfig` uses 2
instead of 1 as default number of channels when the `stereo` codec
param is unspecified
- Instead of wiring up `FieldTrialsView` to `SdpToConfig`, which
requires API changes that break downstream projects, a change in
`AudioDecoderOpus::Config` is made to signal when the number of
channels is forced via SDP config
Bug: webrtc:379996136
Change-Id: If70eb19bc7e3bc74dd0423610cb04ae33ea602fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368860
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43440}
This adds support of H.265 into the RTP video frame assembler, which is
now a public interface.
Bug: chromium:41480904
Change-Id: I74fd761949d0b095ba4526d2fa887e963f48abcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367603
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43374}
The std::lcm and std::gcd functions are part of the C++ standard
library. The existing functions are marked as deprecated rather than
deleted in the case of possible third party uses.
#rtc_cleanup
Bug: webrtc:377205743
Change-Id: I174e663f152d750c984a35dc7136bc18dc01bc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367440
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@google.com>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43368}