diff --git a/VERSION b/VERSION index 09e97c01..25c2bdce 100644 --- a/VERSION +++ b/VERSION @@ -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=123.0.6312.122 +WEBRTC_VERSION=124.0.6367.60 # Look for the concrete revision for WebRTC in: # https://chromium.googlesource.com/chromium/src/+/refs/tags//DEPS -WEBRTC_COMMIT=41b1493ddb5d98e9125d5cb002fd57ce76ebd8a7 +WEBRTC_COMMIT=93e9ac6285bceef08e4c44c221ec57e8f7995b2f PACKAGE_NAMES= \ linux-arm64 \ diff --git a/build.windows.ps1 b/build.windows.ps1 index 7333714d..b2c83957 100644 --- a/build.windows.ps1 +++ b/build.windows.ps1 @@ -117,7 +117,6 @@ Exec { gclient sync --with_branch_heads -r $WEBRTC_COMMIT } Exec { git apply --ignore-space-change -v $PATCH_DIR\add_licenses.patch } Exec { git apply --ignore-space-change -v $PATCH_DIR\4k.patch } Exec { git apply --ignore-space-change -v $PATCH_DIR\webrtc_voice_engine.patch } -Exec { git apply --ignore-space-change -v $PATCH_DIR\fix_deprecated.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 } Pop-Location diff --git a/build/android/Makefile b/build/android/Makefile index 6943ca0d..b0f23898 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -66,6 +66,7 @@ patch: common-patch patch -p2 < $(PATCH_DIR)/android_version.patch && \ patch -p2 < $(PATCH_DIR)/android_use_libunwind.patch && \ patch -p2 < $(PATCH_DIR)/enable_android_scalability_mode.patch && \ + patch -p2 < $(PATCH_DIR)/linux_fix_enable_safe_libstdcxx.patch && \ $(SCRIPTS_DIR)/generate_android_version.sh $(SRC_DIR) $(WEBRTC_COMMIT) $(WEBRTC_VERSION) diff --git a/build/common.mk b/build/common.mk index 70a3f278..348a78fd 100644 --- a/build/common.mk +++ b/build/common.mk @@ -34,7 +34,6 @@ common-patch: echo "apply patches ..." \ && cd $(SRC_DIR) \ && patch -p1 < $(PATCH_DIR)/nacl_armv6_2.patch \ - && patch -p2 < $(PATCH_DIR)/fix_deprecated.patch \ && patch -p2 < $(PATCH_DIR)/add_licenses.patch \ && patch -p2 < $(PATCH_DIR)/4k.patch diff --git a/build/linux-arm64/Makefile b/build/linux-arm64/Makefile index 718baa15..6153631a 100644 --- a/build/linux-arm64/Makefile +++ b/build/linux-arm64/Makefile @@ -37,7 +37,8 @@ patch: common-patch cd $(SRC_DIR) && \ patch -p2 < $(PATCH_DIR)/4k_linux.patch && \ patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch && \ - patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch + patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch && \ + patch -p2 < $(PATCH_DIR)/linux_fix_enable_safe_libstdcxx.patch .PHONY: build build: download patch diff --git a/build/linux-x64/Makefile b/build/linux-x64/Makefile index b17ef510..8dc5c2d0 100644 --- a/build/linux-x64/Makefile +++ b/build/linux-x64/Makefile @@ -37,7 +37,8 @@ patch: common-patch cd $(SRC_DIR) && \ patch -p2 < $(PATCH_DIR)/4k_linux.patch && \ patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch && \ - patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch + patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch && \ + patch -p2 < $(PATCH_DIR)/linux_fix_enable_safe_libstdcxx.patch .PHONY: build build: download patch diff --git a/instrumentisto-libwebrtc-bin.podspec b/instrumentisto-libwebrtc-bin.podspec index c8865300..be5c0e1a 100644 --- a/instrumentisto-libwebrtc-bin.podspec +++ b/instrumentisto-libwebrtc-bin.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "instrumentisto-libwebrtc-bin" - spec.version = "123.0.6312.122" + spec.version = "124.0.6367.60" spec.summary = "Pre-compiled `libwebrtc` library for Darwin used by Medea Flutter-WebRTC." spec.homepage = "https://github.com/instrumentisto/libwebrtc-bin" @@ -8,7 +8,7 @@ Pod::Spec.new do |spec| spec.author = { 'Instrumentisto Team' => 'developer@instrumentisto.com' } spec.ios.deployment_target = '10.0' - spec.source = { :http => "https://github.com/instrumentisto/libwebrtc-bin/releases/download/123.0.6312.122/libwebrtc-ios.zip" } + spec.source = { :http => "https://github.com/instrumentisto/libwebrtc-bin/releases/download/124.0.6367.60/libwebrtc-ios.zip" } spec.vendored_frameworks = "WebRTC.xcframework" spec.pod_target_xcconfig = { diff --git a/patch/enable_android_scalability_mode.patch b/patch/enable_android_scalability_mode.patch index 55156185..884d6fa7 100644 --- a/patch/enable_android_scalability_mode.patch +++ b/patch/enable_android_scalability_mode.patch @@ -1,8 +1,8 @@ diff --git a/src/sdk/android/BUILD.gn b/src/sdk/android/BUILD.gn -index 9aae8b9..496f791 100644 +index 593ed36..eab1b0e 100644 --- a/src/sdk/android/BUILD.gn +++ b/src/sdk/android/BUILD.gn -@@ -191,6 +191,8 @@ if (is_android) { +@@ -192,6 +192,8 @@ if (is_android) { "api/org/webrtc/CapturerObserver.java", "api/org/webrtc/EncodedImage.java", "api/org/webrtc/VideoCodecInfo.java", @@ -11,7 +11,7 @@ index 9aae8b9..496f791 100644 "api/org/webrtc/VideoCodecStatus.java", "api/org/webrtc/VideoDecoder.java", "api/org/webrtc/VideoDecoderFactory.java", -@@ -1305,6 +1307,8 @@ if (current_os == "linux" || is_android) { +@@ -1319,6 +1321,8 @@ if (current_os == "linux" || is_android) { "api/org/webrtc/JavaI420Buffer.java", "api/org/webrtc/TimestampAligner.java", "api/org/webrtc/VideoCodecInfo.java", @@ -22,7 +22,7 @@ index 9aae8b9..496f791 100644 "api/org/webrtc/VideoDecoderFactory.java", diff --git a/src/sdk/android/api/org/webrtc/CodecSupport.java b/src/sdk/android/api/org/webrtc/CodecSupport.java new file mode 100644 -index 0000000..18c0616 +index 0000000..6100236 --- /dev/null +++ b/src/sdk/android/api/org/webrtc/CodecSupport.java @@ -0,0 +1,12 @@ @@ -40,7 +40,7 @@ index 0000000..18c0616 +} diff --git a/src/sdk/android/api/org/webrtc/CodecSupportUtils.java b/src/sdk/android/api/org/webrtc/CodecSupportUtils.java new file mode 100644 -index 0000000..5aa4e6d +index 0000000..41545de --- /dev/null +++ b/src/sdk/android/api/org/webrtc/CodecSupportUtils.java @@ -0,0 +1,13 @@ @@ -162,26 +162,27 @@ index 9ca8311..1fcffe7 100644 @CalledByNative("Encoding") Double getScaleResolutionDownBy() { diff --git a/src/sdk/android/api/org/webrtc/SoftwareVideoEncoderFactory.java b/src/sdk/android/api/org/webrtc/SoftwareVideoEncoderFactory.java -index 7f4c457..98ac43a 100644 +index ad19b4c..ad754ed 100644 --- a/src/sdk/android/api/org/webrtc/SoftwareVideoEncoderFactory.java +++ b/src/sdk/android/api/org/webrtc/SoftwareVideoEncoderFactory.java -@@ -50,9 +50,17 @@ public class SoftwareVideoEncoderFactory implements VideoEncoderFactory { +@@ -49,6 +49,11 @@ public class SoftwareVideoEncoderFactory implements VideoEncoderFactory { return nativeGetSupportedCodecs(nativeFactory).toArray(new VideoCodecInfo[0]); } -+@Override ++ @Override + public CodecSupport queryCodecSupport(VideoCodecInfo format, String scalability_mode) { + return nativeQueryCodecSupport(nativeFactory, format, scalability_mode); + } + private static native long nativeCreateFactory(); - private static native long nativeCreateEncoder(long factory, VideoCodecInfo videoCodecInfo); + private static native boolean nativeIsSupported(long factory, VideoCodecInfo info); +@@ -56,4 +61,6 @@ public class SoftwareVideoEncoderFactory implements VideoEncoderFactory { + private static native long nativeCreate(long factory, long webrtcEnvRef, VideoCodecInfo info); private static native List nativeGetSupportedCodecs(long factory); + + private static native CodecSupport nativeQueryCodecSupport(long factory, VideoCodecInfo format, String scalability_mode); -+ } diff --git a/src/sdk/android/api/org/webrtc/VideoCodecInfo.java b/src/sdk/android/api/org/webrtc/VideoCodecInfo.java index 4f97cf7..715ec6c 100644 @@ -568,15 +569,14 @@ index 6e711e8..d7d885f 100644 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 4b86960..10fa403 100644 +index bcd4c1d..7ba74c0 100644 --- a/src/sdk/android/src/jni/software_video_encoder_factory.cc +++ b/src/sdk/android/src/jni/software_video_encoder_factory.cc -@@ -8,19 +8,30 @@ - * be found in the AUTHORS file in the root of the source tree. +@@ -9,19 +9,30 @@ */ + #include "api/environment/environment.h" -#include "api/video_codecs/builtin_video_encoder_factory.h" #include "api/video_codecs/video_encoder.h" #include "sdk/android/generated_swcodecs_jni/SoftwareVideoEncoderFactory_jni.h" @@ -605,8 +605,8 @@ index 4b86960..10fa403 100644 + video_encoder_factory.release()); } - static jlong JNI_SoftwareVideoEncoderFactory_CreateEncoder( -@@ -49,5 +60,29 @@ JNI_SoftwareVideoEncoderFactory_GetSupportedCodecs(JNIEnv* env, + jboolean JNI_SoftwareVideoEncoderFactory_IsSupported( +@@ -55,5 +66,29 @@ JNI_SoftwareVideoEncoderFactory_GetSupportedCodecs(JNIEnv* env, &webrtc::jni::SdpVideoFormatToVideoCodecInfo); } @@ -637,7 +637,7 @@ index 4b86960..10fa403 100644 } // namespace jni } // namespace webrtc diff --git a/src/sdk/android/src/jni/video_codec_info.cc b/src/sdk/android/src/jni/video_codec_info.cc -index a218a1d..f64f753 100644 +index a218a1d..c5d4cf3 100644 --- a/src/sdk/android/src/jni/video_codec_info.cc +++ b/src/sdk/android/src/jni/video_codec_info.cc @@ -13,15 +13,36 @@ @@ -691,7 +691,7 @@ index a218a1d..f64f753 100644 } // namespace jni diff --git a/src/sdk/android/src/jni/video_encoder_factory_wrapper.cc b/src/sdk/android/src/jni/video_encoder_factory_wrapper.cc -index 7df129b..91d9d9d 100644 +index 78aa145..42b63f5 100644 --- a/src/sdk/android/src/jni/video_encoder_factory_wrapper.cc +++ b/src/sdk/android/src/jni/video_encoder_factory_wrapper.cc @@ -14,6 +14,7 @@ @@ -702,7 +702,7 @@ index 7df129b..91d9d9d 100644 #include "sdk/android/native_api/jni/class_loader.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/video_codec_info.h" -@@ -126,5 +127,27 @@ VideoEncoderFactoryWrapper::GetEncoderSelector() const { +@@ -127,5 +128,27 @@ VideoEncoderFactoryWrapper::GetEncoderSelector() const { return std::make_unique(jni, selector); } @@ -731,10 +731,10 @@ index 7df129b..91d9d9d 100644 } // namespace jni } // namespace webrtc diff --git a/src/sdk/android/src/jni/video_encoder_factory_wrapper.h b/src/sdk/android/src/jni/video_encoder_factory_wrapper.h -index bf6d1e3..d0845c7 100644 +index 9b383a8..4aeb0db 100644 --- a/src/sdk/android/src/jni/video_encoder_factory_wrapper.h +++ b/src/sdk/android/src/jni/video_encoder_factory_wrapper.h -@@ -40,6 +40,9 @@ class VideoEncoderFactoryWrapper : public VideoEncoderFactory { +@@ -41,6 +41,9 @@ class VideoEncoderFactoryWrapper : public VideoEncoderFactory { std::unique_ptr GetEncoderSelector() const override; diff --git a/patch/enable_ios_scalability_mode.patch b/patch/enable_ios_scalability_mode.patch index aeb33d35..ca041288 100644 --- a/patch/enable_ios_scalability_mode.patch +++ b/patch/enable_ios_scalability_mode.patch @@ -1,5 +1,5 @@ diff --git a/src/sdk/BUILD.gn b/src/sdk/BUILD.gn -index e28bdcc..716a516 100644 +index 12584c0..828bfb1 100644 --- a/src/sdk/BUILD.gn +++ b/src/sdk/BUILD.gn @@ -96,6 +96,8 @@ if (is_ios || is_mac) { @@ -19,7 +19,7 @@ index e28bdcc..716a516 100644 ] defines = [] -@@ -1261,6 +1273,7 @@ if (is_ios || is_mac) { +@@ -1271,6 +1274,7 @@ if (is_ios || is_mac) { "objc/base/RTCVideoDecoder.h", "objc/base/RTCVideoDecoderFactory.h", "objc/base/RTCVideoEncoder.h", @@ -27,7 +27,7 @@ index e28bdcc..716a516 100644 "objc/base/RTCVideoEncoderFactory.h", "objc/base/RTCVideoEncoderQpThresholds.h", "objc/base/RTCVideoEncoderSettings.h", -@@ -1334,6 +1350,8 @@ if (is_ios || is_mac) { +@@ -1347,6 +1351,8 @@ if (is_ios || is_mac) { "objc/api/video_codec/RTCVideoEncoderAV1.h", "objc/api/video_frame_buffer/RTCNativeI420Buffer.h", "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h", @@ -36,7 +36,7 @@ index e28bdcc..716a516 100644 ] if (!build_with_chromium) { -@@ -1360,6 +1378,7 @@ if (is_ios || is_mac) { +@@ -1373,6 +1379,7 @@ if (is_ios || is_mac) { ":native_api", ":native_video", ":peerconnectionfactory_base_objc", @@ -44,7 +44,7 @@ index e28bdcc..716a516 100644 ":videocapture_objc", ":videocodec_objc", ":videotoolbox_objc", -@@ -1457,6 +1479,7 @@ if (is_ios || is_mac) { +@@ -1473,6 +1480,7 @@ if (is_ios || is_mac) { "objc/base/RTCVideoDecoder.h", "objc/base/RTCVideoDecoderFactory.h", "objc/base/RTCVideoEncoder.h", @@ -52,7 +52,7 @@ index e28bdcc..716a516 100644 "objc/base/RTCVideoEncoderFactory.h", "objc/base/RTCVideoEncoderQpThresholds.h", "objc/base/RTCVideoEncoderSettings.h", -@@ -1492,6 +1515,7 @@ if (is_ios || is_mac) { +@@ -1508,6 +1516,7 @@ if (is_ios || is_mac) { ":native_api", ":native_video", ":peerconnectionfactory_base_objc", @@ -60,10 +60,12 @@ index e28bdcc..716a516 100644 ":videocapture_objc", ":videocodec_objc", ":videotoolbox_objc", -@@ -1528,6 +1552,10 @@ if (is_ios || is_mac) { - "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm", +@@ -1545,6 +1554,12 @@ if (is_ios || is_mac) { + "objc/api/video_codec/RTCNativeVideoDecoderBuilder+Native.h", "objc/api/video_codec/RTCWrappedNativeVideoEncoder.h", "objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm", ++ "objc/api/video_codec/RTCWrappedNativeVideoDecoder.h", ++ "objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm", + "objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.h", + "objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.mm", + "objc/api/video_codec/RTCWrappedNativeVideoEncoderFactory.h", @@ -71,13 +73,13 @@ index e28bdcc..716a516 100644 ] configs += [ "..:common_objc" ] -@@ -1537,8 +1565,12 @@ if (is_ios || is_mac) { - ":base_objc", +@@ -1555,8 +1570,12 @@ if (is_ios || is_mac) { ":helpers_objc", + "../api/environment", "../api/video_codecs:video_codecs_api", + "../api/video_codecs:video_encoder_factory_template", "../media:codec", - "../media:rtc_media_base", + "../rtc_base:checks", + ":videocodec_objc", + ":videotoolbox_objc", + ":base_native_additions_objc", @@ -195,6 +197,107 @@ index 2eb8d36..5cc28aa 100644 } @end +diff --git a/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.h b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.h +new file mode 100644 +index 0000000..3a9b39e +--- /dev/null ++++ b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.h +@@ -0,0 +1,26 @@ ++/* ++ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. ++ * ++ * Use of this source code is governed by a BSD-style license ++ * that can be found in the LICENSE file in the root of the source ++ * tree. An additional intellectual property rights grant can be found ++ * in the file PATENTS. All contributing project authors may ++ * be found in the AUTHORS file in the root of the source tree. ++ */ ++ ++#import ++ ++#import "base/RTCMacros.h" ++#import "base/RTCVideoDecoder.h" ++ ++#include "api/video_codecs/video_decoder.h" ++#include "media/base/codec.h" ++ ++@interface RTC_OBJC_TYPE (RTCWrappedNativeVideoDecoder) : NSObject ++ ++- (instancetype)initWithNativeDecoder:(std::unique_ptr)decoder; ++ ++/* This moves the ownership of the wrapped decoder to the caller. */ ++- (std::unique_ptr)releaseWrappedDecoder; ++ ++@end +diff --git a/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm +new file mode 100644 +index 0000000..29d2265 +--- /dev/null ++++ b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm +@@ -0,0 +1,63 @@ ++/* ++ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. ++ * ++ * Use of this source code is governed by a BSD-style license ++ * that can be found in the LICENSE file in the root of the source ++ * tree. An additional intellectual property rights grant can be found ++ * in the file PATENTS. All contributing project authors may ++ * be found in the AUTHORS file in the root of the source tree. ++ */ ++ ++#import ++ ++#import "RTCWrappedNativeVideoDecoder.h" ++#import "base/RTCMacros.h" ++#import "helpers/NSString+StdString.h" ++ ++@implementation RTC_OBJC_TYPE (RTCWrappedNativeVideoDecoder) { ++ std::unique_ptr _wrappedDecoder; ++} ++ ++- (instancetype)initWithNativeDecoder:(std::unique_ptr)decoder { ++ if (self = [super init]) { ++ _wrappedDecoder = std::move(decoder); ++ } ++ ++ return self; ++} ++ ++- (std::unique_ptr)releaseWrappedDecoder { ++ return std::move(_wrappedDecoder); ++} ++ ++#pragma mark - RTC_OBJC_TYPE(RTCVideoDecoder) ++ ++- (void)setCallback:(RTCVideoDecoderCallback)callback { ++ RTC_DCHECK_NOTREACHED(); ++} ++ ++- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores { ++ RTC_DCHECK_NOTREACHED(); ++ return 0; ++} ++ ++- (NSInteger)releaseDecoder { ++ RTC_DCHECK_NOTREACHED(); ++ return 0; ++} ++ ++// TODO(bugs.webrtc.org/15444): Remove obsolete missingFrames param. ++- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage ++ missingFrames:(BOOL)missingFrames ++ codecSpecificInfo:(nullable id)info ++ renderTimeMs:(int64_t)renderTimeMs { ++ RTC_DCHECK_NOTREACHED(); ++ return 0; ++} ++ ++- (NSString *)implementationName { ++ RTC_DCHECK_NOTREACHED(); ++ return nil; ++} ++ ++@end diff --git a/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.h b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.h new file mode 100644 index 0000000..ed4745a @@ -233,10 +336,10 @@ index 0000000..ed4745a +NS_ASSUME_NONNULL_END diff --git a/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.mm b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.mm new file mode 100644 -index 0000000..16c6014 +index 0000000..591ef4d --- /dev/null +++ b/src/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoderFactory.mm -@@ -0,0 +1,89 @@ +@@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. + * @@ -259,6 +362,7 @@ index 0000000..16c6014 +#include "api/video_codecs/video_decoder_factory_template_libvpx_vp8_adapter.h" +#include "api/video_codecs/video_decoder_factory_template_libvpx_vp9_adapter.h" +#include "api/video_codecs/video_decoder_factory_template_open_h264_adapter.h" ++#include "api/environment/environment_factory.h" +#import "base/RTCMacros.h" +#import "base/RTCVideoCodecInfo.h" +#import "components/video_codec/RTCVideoDecoderFactoryH264.h" @@ -267,6 +371,7 @@ index 0000000..16c6014 + +@implementation RTC_OBJC_TYPE (RTCWrapperNativeVideoDecoderFactory) { + std::unique_ptr _wrappedFactory; ++ std::unique_ptr _env; +} + +@synthesize HWVideoDecoderFactory = _HWVideoDecoderFactory; @@ -278,6 +383,7 @@ index 0000000..16c6014 + webrtc::LibvpxVp9DecoderTemplateAdapter, + webrtc::OpenH264DecoderTemplateAdapter, + webrtc::Dav1dDecoderTemplateAdapter>>(); ++ _env = std::make_unique(webrtc::CreateEnvironment()); + } + _HWVideoDecoderFactory = [[RTC_OBJC_TYPE(RTCVideoDecoderFactoryH264) alloc] init]; + return self; @@ -302,7 +408,7 @@ index 0000000..16c6014 + parameters); + + return [[RTC_OBJC_TYPE(RTCWrappedNativeVideoDecoder) alloc] -+ initWithNativeDecoder:_wrappedFactory->CreateVideoDecoder(format)]; ++ initWithNativeDecoder:_wrappedFactory->Create(*_env, format)]; +} + +- (NSArray*)supportedCodecs { @@ -1053,6 +1159,29 @@ index 9843849..33229d4 100644 +} + @end +diff --git a/src/sdk/objc/native/src/objc_video_decoder_factory.mm b/src/sdk/objc/native/src/objc_video_decoder_factory.mm +index f9ad401..42f0023 100644 +--- a/src/sdk/objc/native/src/objc_video_decoder_factory.mm ++++ b/src/sdk/objc/native/src/objc_video_decoder_factory.mm +@@ -19,6 +19,7 @@ + #import "sdk/objc/api/peerconnection/RTCEncodedImage+Private.h" + #import "sdk/objc/api/peerconnection/RTCVideoCodecInfo+Private.h" + #import "sdk/objc/api/video_codec/RTCNativeVideoDecoderBuilder+Native.h" ++#import "sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.h" + #import "sdk/objc/helpers/NSString+StdString.h" + + #include "api/video_codecs/sdp_video_format.h" +@@ -94,8 +95,8 @@ std::unique_ptr ObjCVideoDecoderFactory::Create(const Environment + if ([codecName isEqualToString:codecInfo.name]) { + id decoder = [decoder_factory_ createDecoder:codecInfo]; + +- if ([decoder conformsToProtocol:@protocol(RTC_OBJC_TYPE(RTCNativeVideoDecoderBuilder))]) { +- return [((id)decoder) build:env]; ++ if ([decoder isKindOfClass:[RTC_OBJC_TYPE(RTCWrappedNativeVideoDecoder) class]]) { ++ return [(RTC_OBJC_TYPE(RTCWrappedNativeVideoDecoder) *)decoder releaseWrappedDecoder]; + } else { + return std::unique_ptr(new ObjCVideoDecoder(decoder)); + } diff --git a/src/sdk/objc/native/src/objc_video_encoder_factory.h b/src/sdk/objc/native/src/objc_video_encoder_factory.h index 85a1e53..3d8c0ae 100644 --- a/src/sdk/objc/native/src/objc_video_encoder_factory.h @@ -1096,10 +1225,10 @@ index d4ea79c..b4cd12e 100644 + } // namespace webrtc diff --git a/src/sdk/objc/unittests/objc_video_decoder_factory_tests.mm b/src/sdk/objc/unittests/objc_video_decoder_factory_tests.mm -index f44d831..196caa1 100644 +index 33c5089..4b56bbc 100644 --- a/src/sdk/objc/unittests/objc_video_decoder_factory_tests.mm +++ b/src/sdk/objc/unittests/objc_video_decoder_factory_tests.mm -@@ -34,7 +34,9 @@ id CreateDecoderFactoryReturning(int retu +@@ -35,7 +35,9 @@ id CreateDecoderFactoryReturning(int retu id decoderFactoryMock = OCMProtocolMock(@protocol(RTC_OBJC_TYPE(RTCVideoDecoderFactory))); RTC_OBJC_TYPE(RTCVideoCodecInfo)* supported = diff --git a/patch/fix_deprecated.patch b/patch/fix_deprecated.patch deleted file mode 100644 index ef1454de..00000000 --- a/patch/fix_deprecated.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/api/audio_codecs/audio_format.h b/src/api/audio_codecs/audio_format.h -index edccc17..023ddb6 100644 ---- a/src/api/audio_codecs/audio_format.h -+++ b/src/api/audio_codecs/audio_format.h -@@ -25,7 +25,7 @@ namespace webrtc { - - // SDP specification for a single audio codec. - struct RTC_EXPORT SdpAudioFormat { -- using Parameters [[deprecated(("Use webrtc::CodecParameterMap"))]] = -+ using Parameters [[deprecated("Use webrtc::CodecParameterMap")]] = - std::map; - - SdpAudioFormat(const SdpAudioFormat&); -diff --git a/src/api/video_codecs/sdp_video_format.h b/src/api/video_codecs/sdp_video_format.h -index af9537b..9ee3ed1 100644 ---- a/src/api/video_codecs/sdp_video_format.h -+++ b/src/api/video_codecs/sdp_video_format.h -@@ -26,7 +26,7 @@ namespace webrtc { - // SDP specification for a single video codec. - // NOTE: This class is still under development and may change without notice. - struct RTC_EXPORT SdpVideoFormat { -- using Parameters [[deprecated(("Use webrtc::CodecParameterMap"))]] = -+ using Parameters [[deprecated("Use webrtc::CodecParameterMap")]] = - std::map; - - explicit SdpVideoFormat(const std::string& name); diff --git a/patch/linux_fix_enable_safe_libstdcxx.patch b/patch/linux_fix_enable_safe_libstdcxx.patch new file mode 100644 index 00000000..10948b00 --- /dev/null +++ b/patch/linux_fix_enable_safe_libstdcxx.patch @@ -0,0 +1,10 @@ +--- a/src/build_overrides/build.gni ++++ b/src/build_overrides/build.gni +@@ -11,6 +11,7 @@ enable_java_templates = true + + # Enables assertions on safety checks in libc++. + enable_safe_libcxx = true ++enable_safe_libstdcxx = true + + # Don't set this variable to true when building stadalone WebRTC, it is + # only needed to support both WebRTC standalone and Chromium builds.