commit 658ffc82c63aa8bb897cc748a690f743442f9b0a parent 6fdf4398fe5603fa1d70a54f9450c5255a20b0e7 Author: Michael Froman <mfroman@mozilla.com> Date: Wed, 8 Oct 2025 15:37:17 -0500 Bug 1993083 - Vendor libwebrtc from 78c6e919e2 Upstream commit: https://webrtc.googlesource.com/src/+/78c6e919e2d735ad20af3d991a39f84b3080c066 IWYU: Android files including jni.h generated in an Android build directory using git grep "<jni.h>" | awk -F ":" '{print $1'} | xargs tools_webrtc/iwyu/apply-include-cleaner followed by manually including native_api/jni/jvm.h for webrtc::AttachCurrentThreadIfNeeded() where needed and small fixes to make things compile again. Bug: webrtc:42226242 Change-Id: I562b3bda007611f187aab14a838865f91a138e60 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396287 Reviewed-by: ZoƩ Lepaul <xalep@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#44984} Diffstat:
11 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-08T20:36:04.989772+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-08T20:37:08.014028+00:00. # base of lastest vendoring -93cbaaa0f6 +78c6e919e2 diff --git a/third_party/libwebrtc/examples/androidnativeapi/BUILD.gn b/third_party/libwebrtc/examples/androidnativeapi/BUILD.gn @@ -56,6 +56,7 @@ if (is_android) { "../../api/video:video_frame", "../../rtc_base:checks", "../../rtc_base:logging", + "../../rtc_base:macromagic", "../../rtc_base:ssl", "../../rtc_base:ssl_adapter", "../../rtc_base:threading", diff --git a/third_party/libwebrtc/examples/androidnativeapi/jni/android_call_client.h b/third_party/libwebrtc/examples/androidnativeapi/jni/android_call_client.h @@ -14,12 +14,15 @@ #include <jni.h> #include <memory> -#include <string> #include "api/peer_connection_interface.h" #include "api/scoped_refptr.h" #include "api/sequence_checker.h" +#include "api/video/video_frame.h" +#include "api/video/video_sink_interface.h" #include "rtc_base/synchronization/mutex.h" +#include "rtc_base/thread.h" +#include "rtc_base/thread_annotations.h" #include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/native_api/video/video_source.h" diff --git a/third_party/libwebrtc/examples/androidnativeapi/jni/onload.cc b/third_party/libwebrtc/examples/androidnativeapi/jni/onload.cc @@ -11,6 +11,7 @@ #include <jni.h> #include "modules/utility/include/jvm_android.h" +#include "rtc_base/checks.h" #include "rtc_base/ssl_adapter.h" #include "sdk/android/native_api/base/init.h" diff --git a/third_party/libwebrtc/examples/androidvoip/BUILD.gn b/third_party/libwebrtc/examples/androidvoip/BUILD.gn @@ -56,11 +56,14 @@ if (is_android) { deps = [ ":generated_jni", + "../../api:array_view", "../../api/audio:builtin_audio_processing_builder", "../../api/environment:environment_factory", "../../rtc_base:async_packet_socket", "../../rtc_base:async_udp_socket", + "../../rtc_base:checks", "../../rtc_base:logging", + "../../rtc_base:macromagic", "../../rtc_base:network", "../../rtc_base:socket_address", "../../rtc_base:socket_server", @@ -78,6 +81,7 @@ if (is_android) { "//sdk/android:native_api_base", "//sdk/android:native_api_jni", "//third_party/abseil-cpp/absl/memory:memory", + "//third_party/jni_zero", ] } diff --git a/third_party/libwebrtc/examples/androidvoip/jni/android_voip_client.h b/third_party/libwebrtc/examples/androidvoip/jni/android_voip_client.h @@ -13,10 +13,13 @@ #include <jni.h> +#include <cstdint> #include <memory> +#include <optional> #include <string> #include <vector> +#include "api/array_view.h" #include "api/audio_codecs/audio_format.h" #include "api/call/transport.h" #include "api/voip/voip_base.h" @@ -26,7 +29,8 @@ #include "rtc_base/network/received_packet.h" #include "rtc_base/socket_address.h" #include "rtc_base/thread.h" -#include "sdk/android/native_api/jni/scoped_java_ref.h" +#include "rtc_base/thread_annotations.h" +#include "third_party/jni_zero/jni_zero.h" namespace webrtc_examples { diff --git a/third_party/libwebrtc/examples/androidvoip/jni/onload.cc b/third_party/libwebrtc/examples/androidvoip/jni/onload.cc @@ -10,6 +10,7 @@ #include <jni.h> +#include "rtc_base/checks.h" #include "rtc_base/ssl_adapter.h" #include "sdk/android/native_api/base/init.h" diff --git a/third_party/libwebrtc/modules/video_coding/codecs/test/android_codec_factory_helper.cc b/third_party/libwebrtc/modules/video_coding/codecs/test/android_codec_factory_helper.cc @@ -10,12 +10,15 @@ #include "modules/video_coding/codecs/test/android_codec_factory_helper.h" +#include <bits/pthread_types.h> #include <jni.h> #include <pthread.h> #include <stddef.h> #include <memory> +#include "api/video_codecs/video_decoder_factory.h" +#include "api/video_codecs/video_encoder_factory.h" #include "modules/utility/include/jvm_android.h" #include "rtc_base/checks.h" #include "sdk/android/native_api/codecs/wrapper.h" diff --git a/third_party/libwebrtc/moz-patch-stack/s0103.patch b/third_party/libwebrtc/moz-patch-stack/s0103.patch @@ -382,7 +382,7 @@ index b671239bae..e545b2cde3 100644 android_java_prebuilt("autobanh_java") { jar_path = "lib/autobanh.jar" diff --git a/examples/androidnativeapi/BUILD.gn b/examples/androidnativeapi/BUILD.gn -index 7211192206..b0c5178da4 100644 +index 2af94b7f15..fb07056f1c 100644 --- a/examples/androidnativeapi/BUILD.gn +++ b/examples/androidnativeapi/BUILD.gn @@ -42,8 +42,8 @@ if (is_android) { @@ -397,7 +397,7 @@ index 7211192206..b0c5178da4 100644 deps = [ ":generated_jni", diff --git a/examples/androidvoip/BUILD.gn b/examples/androidvoip/BUILD.gn -index 4c8af525ec..240e762ae8 100644 +index 3f517b73c0..edf214e0c4 100644 --- a/examples/androidvoip/BUILD.gn +++ b/examples/androidvoip/BUILD.gn @@ -51,8 +51,8 @@ if (is_android) { diff --git a/third_party/libwebrtc/pc/test/android_test_initializer.cc b/third_party/libwebrtc/pc/test/android_test_initializer.cc @@ -10,6 +10,7 @@ #include "pc/test/android_test_initializer.h" +#include <bits/pthread_types.h> #include <jni.h> #include <pthread.h> #include <stddef.h> diff --git a/third_party/libwebrtc/rtc_tools/network_tester/jni.cc b/third_party/libwebrtc/rtc_tools/network_tester/jni.cc @@ -9,14 +9,16 @@ */ #include <jni.h> -#undef JNIEXPORT -#define JNIEXPORT __attribute__((visibility("default"))) + +#include <cstdint> #include <string> -#include "rtc_base/logging.h" #include "rtc_base/thread.h" #include "rtc_tools/network_tester/test_controller.h" +#undef JNIEXPORT +#define JNIEXPORT __attribute__((visibility("default"))) + extern "C" JNIEXPORT jlong JNICALL Java_com_google_media_networktester_NetworkTester_CreateTestController( JNIEnv* jni,