WebKit Bugzilla
Attachment 339746 Details for
Bug 185324
: Activate ARC for libwebrtc Objective C files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185324-20180507133757.patch (text/plain), 15.23 KB, created by
youenn fablet
on 2018-05-07 13:37:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-05-07 13:37:57 PDT
Size:
15.23 KB
patch
obsolete
>Subversion Revision: 231437 >diff --git a/Source/ThirdParty/libwebrtc/ChangeLog b/Source/ThirdParty/libwebrtc/ChangeLog >index 8865a263aa753ffeb43a83d16635ab35293f799b..39b888ab7db8803d4ed47ccde90ea1ec6e27fb48 100644 >--- a/Source/ThirdParty/libwebrtc/ChangeLog >+++ b/Source/ThirdParty/libwebrtc/ChangeLog >@@ -1,3 +1,34 @@ >+2018-05-07 Youenn Fablet <youenn@apple.com> >+ >+ Activate ARC for libwebrtc Objective C files >+ https://bugs.webkit.org/show_bug.cgi?id=185324 >+ >+ Reviewed by David Kilzer. >+ >+ Revert changes made to libwebrtc to accomodate from not using ARC. >+ Use ARC for all libwebrtc objective C files. >+ >+ Remove no longer needed export symbols and stop compiling the related files. >+ >+ * Configurations/libwebrtc.iOS.exp: >+ * Configurations/libwebrtc.iOSsim.exp: >+ * Configurations/libwebrtc.mac.exp: >+ * Configurations/libwebrtc.xcconfig: >+ * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: >+ * Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm: >+ (-[RTCCVPixelBuffer dealloc]): >+ * Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm: >+ (webrtc::ObjCFrameBuffer::~ObjCFrameBuffer): >+ * Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm: >+ (-[RTCVideoDecoderH264 dealloc]): >+ (-[RTCVideoDecoderH264 setCallback:]): >+ (-[RTCVideoDecoderH264 releaseDecoder]): >+ * Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm: >+ (-[RTCVideoEncoderH264 dealloc]): >+ (-[RTCVideoEncoderH264 setCallback:]): >+ (-[RTCVideoEncoderH264 releaseEncoder]): >+ * libwebrtc.xcodeproj/project.pbxproj: >+ > 2018-05-02 Youenn Fablet <youenn@apple.com> > > Disable VCP for iOS until it is fully working >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >index a155e61255dd97f3f7f5ee96427f8712cf73c7f0..d09288397193885408cec4116425a245df20bb46 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >@@ -116,10 +116,6 @@ __ZN3rtc24BasicPacketSocketFactoryC1EPNS_6ThreadE > __ZNK3rtc13SocketAddress15HostAsURIStringEv > __ZN6webrtc32CreateBuiltinAudioDecoderFactoryEv > __ZN6webrtc32CreateBuiltinAudioEncoderFactoryEv >-__ZN6webrtc31VideoToolboxVideoDecoderFactory9SetActiveEb >-__ZN6webrtc31VideoToolboxVideoEncoderFactory9SetActiveEb >-__ZTVN6webrtc31VideoToolboxVideoDecoderFactoryE >-__ZTVN6webrtc31VideoToolboxVideoEncoderFactoryE > __ZN6webrtc27SessionDescriptionInterface16RemoveCandidatesERKNSt3__16vectorIN7cricket9CandidateENS1_9allocatorIS4_EEEE > __ZNK6webrtc21IceCandidateInterface10server_urlEv > __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >index a155e61255dd97f3f7f5ee96427f8712cf73c7f0..d09288397193885408cec4116425a245df20bb46 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >@@ -116,10 +116,6 @@ __ZN3rtc24BasicPacketSocketFactoryC1EPNS_6ThreadE > __ZNK3rtc13SocketAddress15HostAsURIStringEv > __ZN6webrtc32CreateBuiltinAudioDecoderFactoryEv > __ZN6webrtc32CreateBuiltinAudioEncoderFactoryEv >-__ZN6webrtc31VideoToolboxVideoDecoderFactory9SetActiveEb >-__ZN6webrtc31VideoToolboxVideoEncoderFactory9SetActiveEb >-__ZTVN6webrtc31VideoToolboxVideoDecoderFactoryE >-__ZTVN6webrtc31VideoToolboxVideoEncoderFactoryE > __ZN6webrtc27SessionDescriptionInterface16RemoveCandidatesERKNSt3__16vectorIN7cricket9CandidateENS1_9allocatorIS4_EEEE > __ZNK6webrtc21IceCandidateInterface10server_urlEv > __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >index e860bad3cb83b298babac571106ba5a0f57d8c26..d09288397193885408cec4116425a245df20bb46 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >@@ -116,11 +116,6 @@ __ZN3rtc24BasicPacketSocketFactoryC1EPNS_6ThreadE > __ZNK3rtc13SocketAddress15HostAsURIStringEv > __ZN6webrtc32CreateBuiltinAudioDecoderFactoryEv > __ZN6webrtc32CreateBuiltinAudioEncoderFactoryEv >-__ZN6webrtc31VideoToolboxVideoDecoderFactory9SetActiveEb >-__ZN6webrtc31VideoToolboxVideoEncoderFactory9SetActiveEb >-__ZN6webrtc31VideoToolboxVideoEncoderFactory29setH264HardwareEncoderAllowedEb >-__ZTVN6webrtc31VideoToolboxVideoDecoderFactoryE >-__ZTVN6webrtc31VideoToolboxVideoEncoderFactoryE > __ZN6webrtc27SessionDescriptionInterface16RemoveCandidatesERKNSt3__16vectorIN7cricket9CandidateENS1_9allocatorIS4_EEEE > __ZNK6webrtc21IceCandidateInterface10server_urlEv > __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig >index 210c316edbf972d6cf332eee12acff4444fc31a4..5058dbb1bf0ccfd0bb9a17023f8fabccb67cab91 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig >@@ -17,6 +17,8 @@ DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = @loader_path/../../../ > DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(DYLIB_INSTALL_NAME_BASE); > DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../; > >+CLANG_ENABLE_OBJC_ARC = YES; >+ > CLANG_WARN_BOOL_CONVERSION = YES; > CLANG_WARN_ENUM_CONVERSION = YES; > CLANG_WARN_INT_CONVERSION = YES; >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h >index 3d599128b3a876e8e0b3eb0d4d541a2ba81a4a40..4e5019dd4d8271d3f6a5a29f1cc69e35316b8bef 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h >@@ -100,7 +100,7 @@ > { \ > void** pointer = static_cast<void**>(dlsym(framework##Library(), #name)); \ > if (pointer) \ >- pointer##name = static_cast<type>(*pointer); \ >+ pointer##name = (__bridge type)(*pointer); \ > get##name = name##Function; \ > return pointer##name; \ > } >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm >index 537a65e17d3f8c8d474b0b65e6bf0d8ac3b74782..203896758e833fe6dc6b83e81305d82bcee882ba 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm >@@ -73,7 +73,6 @@ - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer > > - (void)dealloc { > CVBufferRelease(_pixelBuffer); >- [super dealloc]; > } > > - (int)width { >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm >index 0586b0664c736d9dd5cc9c51ee0c7c5740641cf6..3658562eb2957f027c4a4fd2d09d6e97be8caf23 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm >@@ -50,10 +50,7 @@ class ObjCI420FrameBuffer : public I420BufferInterface { > ObjCFrameBuffer::ObjCFrameBuffer(id<RTCVideoFrameBuffer> frame_buffer) > : frame_buffer_(frame_buffer), width_(frame_buffer.width), height_(frame_buffer.height) {} > >-ObjCFrameBuffer::~ObjCFrameBuffer() { >- // FIXME: Activate ARC. >- [frame_buffer_ release]; >-} >+ObjCFrameBuffer::~ObjCFrameBuffer() {} > > VideoFrameBuffer::Type ObjCFrameBuffer::type() const { > return Type::kNative; >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm >index 34d08db0e3b8c02ef895a7d32ae345fda143e7f7..1e102cf62a74f39d704a77e4f46b65878f5ea209 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm >@@ -90,10 +90,6 @@ - (instancetype)init { > - (void)dealloc { > [self destroyDecompressionSession]; > [self setVideoFormat:nullptr]; >- if (_callback) { >- Block_release(_callback); >- } >- [super dealloc]; > } > > - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings >@@ -182,7 +178,7 @@ - (NSInteger)decode:(RTCEncodedImage *)inputImage > } > > - (void)setCallback:(RTCVideoDecoderCallback)callback { >- _callback = Block_copy(callback); >+ _callback = callback; > } > > - (void)setError:(OSStatus)error { >@@ -194,7 +190,6 @@ - (NSInteger)releaseDecoder { > // is safe to null out the callback. > [self destroyDecompressionSession]; > [self setVideoFormat:nullptr]; >- Block_release(_callback); > _callback = nullptr; > return WEBRTC_VIDEO_CODEC_OK; > } >diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm >index dcb4401ca4bde0da3afa1808fb1a1efa74b30a07..42f940426ae6b605102e9e1f8198a25c693eb0e7 100644 >--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm >+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm >@@ -355,10 +355,6 @@ - (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo { > > - (void)dealloc { > [self destroyCompressionSession]; >- if (_callback) { >- Block_release(_callback); >- } >- [super dealloc]; > } > > - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings >@@ -504,7 +500,7 @@ - (NSInteger)encode:(RTCVideoFrame *)frame > } > > - (void)setCallback:(RTCVideoEncoderCallback)callback { >- _callback = Block_copy(callback); >+ _callback = callback; > } > > - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate { >@@ -521,7 +517,6 @@ - (NSInteger)releaseEncoder { > // callback anymore. Do not remove callback until the session is invalidated > // since async encoder callbacks can occur until invalidation. > [self destroyCompressionSession]; >- Block_release(_callback); > _callback = nullptr; > return WEBRTC_VIDEO_CODEC_OK; > } >@@ -695,7 +690,8 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat { > CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, kCFBooleanFalse); > int usageValue = 1; > CFNumberRef usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); >- CFDictionarySetValue(encoderSpecs, getkVTVideoEncoderSpecification_Usage(), usage); >+ CFDictionarySetValue(encoderSpecs, (__bridge CFStringRef)getkVTVideoEncoderSpecification_Usage(), usage); >+ > if (usage) { > CFRelease(usage); > usage = nullptr; >diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj >index 76010f00f0942e707effd700987225db13b2ea46..a8eb3ba15b35e6f1d23de417b76042486c8212e2 100644 >--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj >+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj >@@ -691,14 +691,10 @@ > 419C848F1FE2574D0040C30F /* d1_pkt.cc in Sources */ = {isa = PBXBuildFile; fileRef = 419C84861FE2574C0040C30F /* d1_pkt.cc */; }; > 419C84921FE2591F0040C30F /* err_data.c in Sources */ = {isa = PBXBuildFile; fileRef = 419C84911FE2591E0040C30F /* err_data.c */; }; > 419C849D1FE2FEC00040C30F /* decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84971FE2FEBF0040C30F /* decoder.h */; }; >- 419C849E1FE2FEC00040C30F /* decoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 419C84981FE2FEBF0040C30F /* decoder.mm */; }; >- 419C84A31FE2FFDB0040C30F /* encoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 419C849A1FE2FEC00040C30F /* encoder.mm */; }; > 419C84A41FE300810040C30F /* encoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C849B1FE2FEC00040C30F /* encoder.h */; }; > 419C84AA1FE303DE0040C30F /* h264.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84A81FE303DD0040C30F /* h264.h */; }; > 419C84AB1FE303DE0040C30F /* h264_globals.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84A91FE303DE0040C30F /* h264_globals.h */; }; > 419C84B11FE304C70040C30F /* VideoToolBoxDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84AD1FE304C60040C30F /* VideoToolBoxDecoderFactory.h */; }; >- 419C84B31FE304C70040C30F /* VideoToolBoxDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419C84AF1FE304C70040C30F /* VideoToolBoxDecoderFactory.cpp */; }; >- 419C84B41FE309050040C30F /* VideoToolBoxEncoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419C84AE1FE304C60040C30F /* VideoToolBoxEncoderFactory.cpp */; }; > 419C84B51FE309050040C30F /* VideoToolBoxEncoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84AC1FE304C60040C30F /* VideoToolBoxEncoderFactory.h */; }; > 419C84BC1FE319440040C30F /* audio_encoder_ilbc_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 419C84B71FE319430040C30F /* audio_encoder_ilbc_config.h */; }; > 419C84BD1FE319440040C30F /* audio_encoder_ilbc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 419C84B81FE319430040C30F /* audio_encoder_ilbc.cc */; }; >@@ -13022,7 +13018,6 @@ > 5CDD87B31E43BC0500621E92 /* decode_bwe.c in Sources */, > 41433D0E1F79B33400387B4D /* decode_plc.c in Sources */, > 5CDD8B8D1E43C2B500621E92 /* decode_residual.c in Sources */, >- 419C849E1FE2FEC00040C30F /* decoder.mm in Sources */, > 5CDD8A191E43BFB300621E92 /* decoder_database.cc in Sources */, > 5CDD8B911E43C2B500621E92 /* decoder_interpolate_lsf.c in Sources */, > 5CDD83CA1E439A6F00621E92 /* decoding_state.cc in Sources */, >@@ -13067,7 +13062,6 @@ > 5CDD87B51E43BC0500621E92 /* encode_lpc_swb.c in Sources */, > 5CDD8A951E43C00F00621E92 /* encode_neteq_input.cc in Sources */, > 5CDD83CC1E439A6F00621E92 /* encoded_frame.cc in Sources */, >- 419C84A31FE2FFDB0040C30F /* encoder.mm in Sources */, > 5CDD859F1E43B5C000621E92 /* encoder_rtcp_feedback.cc in Sources */, > 5CDD86511E43B8B500621E92 /* energy.c in Sources */, > 5CDD8B981E43C2B500621E92 /* energy_inverse.c in Sources */, >@@ -13734,8 +13728,6 @@ > 41ECEAFD20646664009D5141 /* VideoProcessingSoftLink.cpp in Sources */, > 5C4B490B1E42C1E3002651C8 /* videosourcebase.cc in Sources */, > 41F9BF8F2051C80100ABF0B9 /* videosourceinterface.cc in Sources */, >- 419C84B31FE304C70040C30F /* VideoToolBoxDecoderFactory.cpp in Sources */, >- 419C84B41FE309050040C30F /* VideoToolBoxEncoderFactory.cpp in Sources */, > 5CD285161E6A60570094FDC8 /* videotrack.cc in Sources */, > 5CD285181E6A60570094FDC8 /* videotracksource.cc in Sources */, > 413A23121FE18E0700373E99 /* virtualsocketserver.cc in Sources */,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185324
:
339594
|
339600
| 339746