Skip to content

Commit

Permalink
Upgrade to 129.0.6668.58 version (#123)
Browse files Browse the repository at this point in the history
- apply upstream `borning_ssl_missing_string_header.patch`

Co-authored-by: evdokimovs <[email protected]>
Co-authored-by: Zenichi Amano <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent 5812a65 commit 5d175a3
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# The minimum macOS version required to build `libwebrtc` is macOS 14
# due to the use of Screen Capture Kit in the `libwebrtc` source code.
runs-on: ${{ (contains('ios macos', matrix.os) && 'macos-14')
|| (contains('windows', matrix.os) && 'windows-2019')
|| (contains('windows', matrix.os) && 'windows-2022')
|| 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ CCACHE_VERSION=4.8.3

# WebRTC doesn't have its own versioning, so we use Chromium versions:
# https://chromiumdash.appspot.com/releases
WEBRTC_VERSION=128.0.6613.137
WEBRTC_VERSION=129.0.6668.58
# Look for the concrete revision for WebRTC in:
# https://chromium.googlesource.com/chromium/src/+/refs/tags/<WEBRTC_VERSION>/DEPS
WEBRTC_COMMIT=f237dc146debcfde3d70038c2b66f71bfea8d24b
WEBRTC_COMMIT=21508e08e7545a03c8c35a9299923279e3def319

# Additional revision of the `WEBRTC_VERSION` added as `-rN` suffix to it, and
# tracking additional changes applied on top of it.
Expand Down
1 change: 1 addition & 0 deletions build.windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Exec { git apply --ignore-space-change -v $PATCH_DIR\fix_disable_proxy_trace_eve
Exec { git apply --ignore-space-change -v $PATCH_DIR\webrtc_voice_engine.patch }
Exec { git apply --ignore-space-change -v $PATCH_DIR\win_dynamic_crt.patch }
Exec { git apply --ignore-space-change -v $PATCH_DIR\windows_fix_abseil.patch }
Exec { git apply --ignore-space-change -v $PATCH_DIR\borning_ssl_missing_string_header.patch }
Pop-Location

Get-PSDrive
Expand Down
3 changes: 2 additions & 1 deletion build/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ common-patch:
&& patch -p1 < $(PATCH_DIR)/nacl_armv6_2.patch \
&& patch -p2 < $(PATCH_DIR)/add_licenses.patch \
&& patch -p2 < $(PATCH_DIR)/4k.patch \
&& patch -p2 < $(PATCH_DIR)/fix_disable_proxy_trace_events.patch
&& patch -p2 < $(PATCH_DIR)/fix_disable_proxy_trace_events.patch \
&& patch -p2 < $(PATCH_DIR)/borning_ssl_missing_string_header.patch

.PHONY: common-package
common-package: copy
Expand Down
4 changes: 2 additions & 2 deletions instrumentisto-libwebrtc-bin.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |spec|
spec.name = "instrumentisto-libwebrtc-bin"
spec.version = "128.0.6613.137"
spec.version = "129.0.6668.58"
spec.summary = "Pre-compiled `libwebrtc` library for Darwin used by Medea Flutter-WebRTC."

spec.homepage = "https://github.com/instrumentisto/libwebrtc-bin"
spec.license = { :type => 'BSD', :file => 'WebRTC.xcframework/LICENSE.md' }
spec.author = { 'Instrumentisto Team' => '[email protected]' }
spec.ios.deployment_target = '10.0'

spec.source = { :http => "https://github.com/instrumentisto/libwebrtc-bin/releases/download/128.0.6613.137/libwebrtc-ios.zip" }
spec.source = { :http => "https://github.com/instrumentisto/libwebrtc-bin/releases/download/129.0.6668.58/libwebrtc-ios.zip" }
spec.vendored_frameworks = "WebRTC.xcframework"

spec.pod_target_xcconfig = {
Expand Down
10 changes: 10 additions & 0 deletions patch/borning_ssl_missing_string_header.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/src/third_party/boringssl/src/pki/string_util.h
+++ b/src/third_party/boringssl/src/pki/string_util.h
@@ -6,6 +6,7 @@
#define BSSL_PKI_STRING_UTIL_H_

#include <cstdint>
+#include <string>
#include <string_view>
#include <vector>

62 changes: 30 additions & 32 deletions patch/enable_android_scalability_mode.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/src/sdk/android/BUILD.gn b/src/sdk/android/BUILD.gn
index 593ed36..eab1b0e 100644
index 82aabac..3856891 100644
--- a/src/sdk/android/BUILD.gn
+++ b/src/sdk/android/BUILD.gn
@@ -192,6 +192,8 @@ if (is_android) {
@@ -196,6 +196,8 @@ if (is_android) {
"api/org/webrtc/CapturerObserver.java",
"api/org/webrtc/EncodedImage.java",
"api/org/webrtc/VideoCodecInfo.java",
Expand All @@ -11,7 +11,7 @@ index 593ed36..eab1b0e 100644
"api/org/webrtc/VideoCodecStatus.java",
"api/org/webrtc/VideoDecoder.java",
"api/org/webrtc/VideoDecoderFactory.java",
@@ -1319,6 +1321,8 @@ if (current_os == "linux" || is_android) {
@@ -1330,6 +1332,8 @@ if (current_os == "linux" || is_android) {
"api/org/webrtc/JavaI420Buffer.java",
"api/org/webrtc/TimestampAligner.java",
"api/org/webrtc/VideoCodecInfo.java",
Expand Down Expand Up @@ -296,7 +296,7 @@ index fe608c7..313ca8c 100644
+ }
}
diff --git a/src/sdk/android/instrumentationtests/src/org/webrtc/RtpCapabilitiesTest.java b/src/sdk/android/instrumentationtests/src/org/webrtc/RtpCapabilitiesTest.java
index 961ecd5..888723e 100644
index e04b236..5c667a7 100644
--- a/src/sdk/android/instrumentationtests/src/org/webrtc/RtpCapabilitiesTest.java
+++ b/src/sdk/android/instrumentationtests/src/org/webrtc/RtpCapabilitiesTest.java
@@ -82,8 +82,8 @@ public class RtpCapabilitiesTest {
Expand All @@ -310,7 +310,7 @@ index 961ecd5..888723e 100644
List<VideoCodecInfo> supportedCodecs = new ArrayList<>();
supportedCodecs.add(vp8Codec);
supportedCodecs.add(h264Codec);
@@ -214,4 +214,9 @@ public class RtpCapabilitiesTest {
@@ -227,4 +227,9 @@ public class RtpCapabilitiesTest {

return rtpMaps;
}
Expand Down Expand Up @@ -529,20 +529,21 @@ index 4bd9ee0..1f5957b 100644
Java_Encoding_getScaleResolutionDownBy(jni, j_encoding_parameters);
encoding.scale_resolution_down_by =
diff --git a/src/sdk/android/src/jni/software_video_decoder_factory.cc b/src/sdk/android/src/jni/software_video_decoder_factory.cc
index 6e711e8..d7d885f 100644
index 08e94a9..d75c5c7 100644
--- a/src/sdk/android/src/jni/software_video_decoder_factory.cc
+++ b/src/sdk/android/src/jni/software_video_decoder_factory.cc
@@ -11,21 +11,31 @@
@@ -11,7 +11,6 @@
#include <memory>

#include "api/environment/environment.h"
-#include "api/video_codecs/builtin_video_decoder_factory.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "sdk/android/generated_swcodecs_jni/SoftwareVideoDecoderFactory_jni.h"
#include "sdk/android/native_api/jni/java_types.h"
@@ -19,13 +18,24 @@
#include "sdk/android/src/jni/jni_helpers.h"
#include "sdk/android/src/jni/video_codec_info.h"
#include "third_party/jni_zero/jni_zero.h"
+#include "api/video_codecs/video_decoder_factory_template.h"
+#include "api/video_codecs/video_decoder_factory_template_dav1d_adapter.h"
+#include "api/video_codecs/video_decoder_factory_template_libvpx_vp8_adapter.h"
Expand All @@ -552,28 +553,24 @@ index 6e711e8..d7d885f 100644
namespace webrtc {
namespace jni {

-static jlong JNI_SoftwareVideoDecoderFactory_CreateFactory(JNIEnv* env) {
- return webrtc::NativeToJavaPointer(
static jlong JNI_SoftwareVideoDecoderFactory_CreateFactory(JNIEnv* env) {
+ std::unique_ptr<webrtc::VideoDecoderFactory> video_decoder_factory =
+ std::make_unique<webrtc::VideoDecoderFactoryTemplate<
+ webrtc::LibvpxVp8DecoderTemplateAdapter,
+ webrtc::LibvpxVp9DecoderTemplateAdapter,
+ webrtc::OpenH264DecoderTemplateAdapter,
+ webrtc::Dav1dDecoderTemplateAdapter>>();
return webrtc::NativeToJavaPointer(
- CreateBuiltinVideoDecoderFactory().release());
-}
+ static jlong JNI_SoftwareVideoDecoderFactory_CreateFactory(JNIEnv* env) {
+ std::unique_ptr<webrtc::VideoDecoderFactory> video_decoder_factory =
+ std::make_unique<webrtc::VideoDecoderFactoryTemplate<
+ webrtc::LibvpxVp8DecoderTemplateAdapter,
+ webrtc::LibvpxVp9DecoderTemplateAdapter,
+ webrtc::OpenH264DecoderTemplateAdapter,
+ webrtc::Dav1dDecoderTemplateAdapter>>();
+ return webrtc::NativeToJavaPointer(
+ video_decoder_factory.release());
+ }
+ video_decoder_factory.release());
}

jboolean JNI_SoftwareVideoDecoderFactory_IsSupported(
JNIEnv* env,
diff --git a/src/sdk/android/src/jni/software_video_encoder_factory.cc b/src/sdk/android/src/jni/software_video_encoder_factory.cc
index bcd4c1d..7ba74c0 100644
index a2d44d9..19aa60a 100644
--- a/src/sdk/android/src/jni/software_video_encoder_factory.cc
+++ b/src/sdk/android/src/jni/software_video_encoder_factory.cc
@@ -9,19 +9,30 @@
@@ -9,20 +9,31 @@
*/

#include "api/environment/environment.h"
Expand All @@ -584,6 +581,7 @@ index bcd4c1d..7ba74c0 100644
#include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h"
#include "sdk/android/src/jni/video_codec_info.h"
#include "third_party/jni_zero/jni_zero.h"
+#include "api/video_codecs/video_encoder_factory_template.h"
+#include "api/video_codecs/video_encoder_factory_template_libaom_av1_adapter.h"
+#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
Expand All @@ -594,19 +592,19 @@ index bcd4c1d..7ba74c0 100644
namespace jni {

static jlong JNI_SoftwareVideoEncoderFactory_CreateFactory(JNIEnv* env) {
+ std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory =
+ std::make_unique<webrtc::VideoEncoderFactoryTemplate<
+ webrtc::LibvpxVp8EncoderTemplateAdapter,
+ webrtc::LibvpxVp9EncoderTemplateAdapter,
+ webrtc::OpenH264EncoderTemplateAdapter,
+ webrtc::LibaomAv1EncoderTemplateAdapter>>();
+ std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory =
+ std::make_unique<webrtc::VideoEncoderFactoryTemplate<
+ webrtc::LibvpxVp8EncoderTemplateAdapter,
+ webrtc::LibvpxVp9EncoderTemplateAdapter,
+ webrtc::OpenH264EncoderTemplateAdapter,
+ webrtc::LibaomAv1EncoderTemplateAdapter>>();
return webrtc::NativeToJavaPointer(
- CreateBuiltinVideoEncoderFactory().release());
+ video_encoder_factory.release());
+ video_encoder_factory.release());
}

jboolean JNI_SoftwareVideoEncoderFactory_IsSupported(
@@ -55,5 +66,29 @@ JNI_SoftwareVideoEncoderFactory_GetSupportedCodecs(JNIEnv* env,
@@ -56,5 +67,29 @@ JNI_SoftwareVideoEncoderFactory_GetSupportedCodecs(JNIEnv* env,
&webrtc::jni::SdpVideoFormatToVideoCodecInfo);
}

Expand Down
5 changes: 5 additions & 0 deletions scripts/fetch_webrtc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ if [ -f "$WEBRTC_DIR/.gclient" ]; then
git reset --hard;
git clean -xdf;
fi
if [ -d "$WEBRTC_DIR/src/third_party/boringssl/src" ]; then
cd "$WEBRTC_DIR/src/third_party/boringssl/src"
git reset --hard;
git clean -xdf;
fi
else
echo "Getting WebRTC...";
rm -f "$DEPOT_TOOLS_DIR/metrics.cfg"
Expand Down

0 comments on commit 5d175a3

Please sign in to comment.