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}
This adds an optional callback closure and an enum representing the error.
Bug: webrtc:390314937
Change-Id: If9a22dd6d90d5c4d94175e021511766ea49acec2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374420
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43780}
Formatting done via:
git ls-files | grep -E '.*\.m$' | xargs clang-format -i
After applying the command, I manually excluded Matlab .m files that I will handle separately.
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I40d11fd6b650ee0d90d92cbd6fc6aa6c78e1fea3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373887
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@{#43706}
I already submitted separate CLs for /api and /components, here I'm
doing the rest of this folder
Format /sdk/objc/api folder
There are a lot of changes in /sdk so I'm splitting it
Formatting done via:
git ls-files | grep -E '^sdk\/objc\/.*\.(h|cc|mm)' | grep -Ev '^sdk\/objc\/(api|components).*' | xargs clang-format -i
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I8bb63f6696b2649ea642b900b9d9827980cc8315
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373884
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43696}
There are a lot of changes in /sdk so I'm splitting it
Formatting done via:
git ls-files | grep -E '^sdk\/objc\/api\/.*\.(h|cc|mm)' | xargs clang-format -i
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: Ieebcd026e77db31f94df2b5dd5cd18ccc4f06674
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373883
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43682}
There are a lot of changes in /sdk so I'm splitting it
Formatting done via:
git ls-files | grep -E '^sdk\/objc\/components.*\.(h|cc|mm)' | xargs clang-format -i
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I18632b265b2279e804b2f86abfc66601d12bb2ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373901
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43681}
These interfaces were deprecated 6 years ago and have not been
functional for a long time. It is safe to remove them.
Bug: None
Change-Id: Icbc85758551a96b8da10fbf16a1771c3641d1ac3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366500
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43291}
The goal is to be able to write the rtc::Buffer by another utility
(like rtc::ByteBufferWriter) and pass it into EncodedImageBuffer
without memcpy.
Bug: webrtc:42223344
Change-Id: Ieda55e77a36636e8cdff6ad6b7d078de0aeafec0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364243
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43179}
This change refactors existing self-assignments within if clauses across
the WebRTC codebase.
*Why:*
- Bug Prevention: Assignments within conditionals are frequently
unintended errors, often mistaken for equality checks.
- Clearer Code: Separating assignments from conditionals improves code
readability and reduces the risk of misinterpretation.
Change-Id: I199dc26a35ceca109a2ac569b446811314dfdf0b
Bug: chromium:361594695
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360460
Reviewed-by: Chuck Hays <haysc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42850}
Fixed issue with network interfaces due to a missing return value in the
"nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18,
RTCNetworkMonitor::initWithObserver will only enumerate the first
interface, instead of all device interfaces
Bug: webrtc:359245764
Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541
Auto-Submit: Corby <corby.hoback@gmail.com>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42818}
Web Spec and C++ version of setCodecPreferences are failable, as they return
an RTCError (in C++) or throw an InvalidModificationError (in Web Spec).
However, current Objective-C version of setCodecPreferences is not failable,
so callers cannot know if the operation succeeded or not.
Also, the current Objective-C version does not accept nil, which is not
spec-compliant. (Web Spec says if codecs is an empty list, set
transceiver.PreferredCodecs to codecs and abort these steps.)
Bug: webrtc:42226103, webrtc:42226230
Change-Id: Ib90f3e5b45fc959eeb92f623cf50efcb458a7478
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42789}
There is a race condition on reading
`ObjCNetworkMonitor::_network_monitor` field.
The `ObjCNetworkMonitor::OnPathUpdate()` checks its nullability
on the org.webrtc.RTCDispatcherNetworkMonitor thread BEFORE the
`ObjCNetworkMonitor::Start()` assigns it on the network_monitor thread.
In addition, this field is neither atomic nor protected by mutex so its
last assigned value is not guaranteed to be visible to
another [reading] thread.
Bug: webrtc:355238623
Change-Id: I1a05215111cc873b7d4931824e18f281aebfb91f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357880
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42778}
First batch of applying iwyu to the repo.
Done with:
> ./tools_webrtc/iwyu/apply-iwyu api
> git add api/[a-s]*
> python3 gn_autodeps.py ~/local/webrtc/src out/Default
Last step is a custom script I wrote to automatically apply new required
dependencies for target in gn, which saved tons of time manually going
over the files and fixing.
If this is something that interest others, I can submit it as well.
Bug: webrtc:42226242
Change-Id: Id109e77f50835827495bc4512880c4ec9ae175f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#42512}
describing video codecs with their parameters as static members of SdpVideoFormat:
static const SdpVideoFormat VP8();
static const SdpVideoFormat H264();
static const SdpVideoFormat VP9Profile0();
static const SdpVideoFormat VP9Profile1();
static const SdpVideoFormat VP9Profile2();
static const SdpVideoFormat VP9Profile3();
static const SdpVideoFormat AV1Profile0();
static const SdpVideoFormat AV1Profile1();
This removes the need to craft instances of these by hand.
BUG=webrtc:15703
Change-Id: I2171e08b48ec98f18424f53f3b5d6d148130532e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337441
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41833}
This is a step towards sending audio timestamps from Meet in iOS.
Next step is to enable sending the audio timestamps (in harmony).
After enable absolute-capture-time header extension in harmony, the receiving participants will be able to store E2E audio latency and A/V sync metrics.
Bug: webrtc:13609
Change-Id: I797c1ed0035625ed065307314ac34c932c5abe7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334720
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41574}
To unblock code cleanup, uses of Members() are replaced by
Attributes(). This will allow replacing RTCStatsMember<T> with
absl::optional<T> in a future CL.
Bug: webrtc:15164
Change-Id: I4ed32ef8ea3d8fd7506415848e044e34377fce8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334161
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41511}