Title: [292473] trunk/Source
Revision
292473
Author
you...@apple.com
Date
2022-04-06 09:16:15 -0700 (Wed, 06 Apr 2022)

Log Message

[Cocoa] Use GCD webrtc task queue
https://bugs.webkit.org/show_bug.cgi?id=238861

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/webrtc/api/create_peerconnection_factory.cc:
* Source/webrtc/api/create_peerconnection_factory.h:
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Covered by existing tests.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::createPeerConnectionFactory):

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2022-04-06 16:16:15 UTC (rev 292473)
@@ -1,3 +1,17 @@
+2022-04-06  Youenn Fablet  <you...@apple.com>
+
+        [Cocoa] Use GCD webrtc task queue
+        https://bugs.webkit.org/show_bug.cgi?id=238861
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/libwebrtc.iOS.exp:
+        * Configurations/libwebrtc.iOSsim.exp:
+        * Configurations/libwebrtc.mac.exp:
+        * Source/webrtc/api/create_peerconnection_factory.cc:
+        * Source/webrtc/api/create_peerconnection_factory.h:
+        * libwebrtc.xcodeproj/project.pbxproj:
+
 2022-04-05  Elliott Williams  <e...@apple.com>
 
         Reland "[XCBuild] libwebrtc's headers are copied via rsync and do not emit task outputs"

Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp	2022-04-06 16:16:15 UTC (rev 292473)
@@ -318,7 +318,6 @@
 __ZNK6webrtc23RtpTransceiverInterface8stoppingEv
 __ZNK3rtc9IPAddresseqERKS0_
 __ZN3rtc14RTCCertificateD1Ev
-__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorE
 __ZNK6webrtc23RtpTransceiverInterface26HeaderExtensionsNegotiatedEv
 __ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENS_26PeerConnectionDependenciesE
 __ZNK3rtc13SocketAddress4HashEv
@@ -336,3 +335,5 @@
 __ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
 __ZN6webrtc20copyVideoFrameBufferERNS_16VideoFrameBufferEPh
 __ZN6webrtc32createPixelBufferFromFrameBufferERNS_16VideoFrameBufferERKNSt3__18functionIFP10__CVBuffermmNS_10BufferTypeEEEE
+__ZN6webrtc25CreateTaskQueueGcdFactoryEv
+__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorENSB_INS_16TaskQueueFactoryENSD_ISP_EEEE

Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp	2022-04-06 16:16:15 UTC (rev 292473)
@@ -318,7 +318,6 @@
 __ZNK6webrtc23RtpTransceiverInterface8stoppingEv
 __ZNK3rtc9IPAddresseqERKS0_
 __ZN3rtc14RTCCertificateD1Ev
-__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorE
 __ZNK6webrtc23RtpTransceiverInterface26HeaderExtensionsNegotiatedEv
 __ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENS_26PeerConnectionDependenciesE
 __ZNK3rtc13SocketAddress4HashEv
@@ -336,3 +335,5 @@
 __ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
 __ZN6webrtc20copyVideoFrameBufferERNS_16VideoFrameBufferEPh
 __ZN6webrtc32createPixelBufferFromFrameBufferERNS_16VideoFrameBufferERKNSt3__18functionIFP10__CVBuffermmNS_10BufferTypeEEEE
+__ZN6webrtc25CreateTaskQueueGcdFactoryEv
+__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorENSB_INS_16TaskQueueFactoryENSD_ISP_EEEE

Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp	2022-04-06 16:16:15 UTC (rev 292473)
@@ -318,7 +318,6 @@
 __ZNK6webrtc23RtpTransceiverInterface8stoppingEv
 __ZNK3rtc9IPAddresseqERKS0_
 __ZN3rtc14RTCCertificateD1Ev
-__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorE
 __ZNK6webrtc23RtpTransceiverInterface26HeaderExtensionsNegotiatedEv
 __ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENS_26PeerConnectionDependenciesE
 __ZNK3rtc13SocketAddress4HashEv
@@ -336,3 +335,5 @@
 __ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
 __ZN6webrtc20copyVideoFrameBufferERNS_16VideoFrameBufferEPh
 __ZN6webrtc32createPixelBufferFromFrameBufferERNS_16VideoFrameBufferERKNSt3__18functionIFP10__CVBuffermmNS_10BufferTypeEEEE
+__ZN6webrtc25CreateTaskQueueGcdFactoryEv
+__ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorENSB_INS_16TaskQueueFactoryENSD_ISP_EEEE

Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.cc (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.cc	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.cc	2022-04-06 16:16:15 UTC (rev 292473)
@@ -38,12 +38,20 @@
     std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
     rtc::scoped_refptr<AudioMixer> audio_mixer,
     rtc::scoped_refptr<AudioProcessing> audio_processing,
-    AudioFrameProcessor* audio_frame_processor) {
+    AudioFrameProcessor* audio_frame_processor
+#if defined(WEBRTC_WEBKIT_BUILD)
+    , std::unique_ptr<TaskQueueFactory> task_queue_factory
+#endif
+    ) {
   PeerConnectionFactoryDependencies dependencies;
   dependencies.network_thread = network_thread;
   dependencies.worker_thread = worker_thread;
   dependencies.signaling_thread = signaling_thread;
+#if defined(WEBRTC_WEBKIT_BUILD)
+  dependencies.task_queue_factory = task_queue_factory ? std::move(task_queue_factory) : CreateDefaultTaskQueueFactory();
+#else
   dependencies.task_queue_factory = CreateDefaultTaskQueueFactory();
+#endif
   dependencies.call_factory = CreateCallFactory();
   dependencies.event_log_factory = std::make_unique<RtcEventLogFactory>(
       dependencies.task_queue_factory.get());

Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.h (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.h	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/create_peerconnection_factory.h	2022-04-06 16:16:15 UTC (rev 292473)
@@ -49,7 +49,11 @@
     std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
     rtc::scoped_refptr<AudioMixer> audio_mixer,
     rtc::scoped_refptr<AudioProcessing> audio_processing,
-    AudioFrameProcessor* audio_frame_processor = nullptr);
+    AudioFrameProcessor* audio_frame_processor = nullptr
+#if defined(WEBRTC_WEBKIT_BUILD)
+    , std::unique_ptr<TaskQueueFactory> task_queue_factory = nullptr
+#endif
+    );
 
 }  // namespace webrtc
 

Modified: trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj (292472 => 292473)


--- trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj	2022-04-06 16:16:15 UTC (rev 292473)
@@ -3,7 +3,7 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 46;
+	objectVersion = 52;
 	objects = {
 
 /* Begin PBXBuildFile section */
@@ -1641,6 +1641,8 @@
 		417953F8216984BE0028266B /* RTCCodecSpecificInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 417953F4216984BD0028266B /* RTCCodecSpecificInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		417953F9216984BE0028266B /* RTCI420Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 417953F5216984BD0028266B /* RTCI420Buffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		417953FA216984BE0028266B /* RTCEncodedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 417953F6216984BD0028266B /* RTCEncodedImage.m */; };
+		417B013A27FDA4CF00C74DE3 /* task_queue_gcd.cc in Sources */ = {isa = PBXBuildFile; fileRef = 417B013927FDA4CB00C74DE3 /* task_queue_gcd.cc */; };
+		417B013C27FDA7E000C74DE3 /* gcd_helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 417B013B27FDA7DF00C74DE3 /* gcd_helpers.m */; };
 		417C037323B210C400DE5D8B /* main_noop.c in Sources */ = {isa = PBXBuildFile; fileRef = 417C037223B210C400DE5D8B /* main_noop.c */; };
 		41889D75216BB7B9004614DD /* RTCRtpEncodingParameters+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 41889D74216BB7B6004614DD /* RTCRtpEncodingParameters+Private.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		41889D76216BC4EC004614DD /* RTCRtpEncodingParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 414FB869216BB767001F5492 /* RTCRtpEncodingParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -6672,6 +6674,8 @@
 		41795402216985200028266B /* RTCVideoDecoderVP8.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCVideoDecoderVP8.mm; sourceTree = "<group>"; };
 		41795403216985200028266B /* RTCWrappedNativeVideoDecoder.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCWrappedNativeVideoDecoder.mm; sourceTree = "<group>"; };
 		41795404216985200028266B /* RTCWrappedNativeVideoEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCWrappedNativeVideoEncoder.h; sourceTree = "<group>"; };
+		417B013927FDA4CB00C74DE3 /* task_queue_gcd.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = task_queue_gcd.cc; path = rtc_base/task_queue_gcd.cc; sourceTree = "<group>"; };
+		417B013B27FDA7DF00C74DE3 /* gcd_helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = gcd_helpers.m; sourceTree = "<group>"; };
 		417C037223B210C400DE5D8B /* main_noop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main_noop.c; sourceTree = "<group>"; };
 		41889D74216BB7B6004614DD /* RTCRtpEncodingParameters+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RTCRtpEncodingParameters+Private.h"; sourceTree = "<group>"; };
 		418938BA242A3D37007FDC41 /* VQ_WMat_EC_sse4_1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VQ_WMat_EC_sse4_1.c; path = silk/x86/VQ_WMat_EC_sse4_1.c; sourceTree = "<group>"; };
@@ -10695,6 +10699,7 @@
 				4131C0CA234B89D80028A615 /* task_queue.cc */,
 				4131C0D7234B89DB0028A615 /* task_queue.h */,
 				DDF30AD327C5A3A3006A526F /* task_queue_for_test.h */,
+				417B013927FDA4CB00C74DE3 /* task_queue_gcd.cc */,
 				DDF30AD127C5A3A3006A526F /* task_queue_gcd.h */,
 				4131C568234CBB480028A615 /* task_queue_libevent.cc */,
 				4131C567234CBB480028A615 /* task_queue_libevent.h */,
@@ -13191,6 +13196,7 @@
 				41F263A3212680A600274F59 /* file_wrapper.cc */,
 				41F263AA212680A800274F59 /* file_wrapper.h */,
 				DDF30AC727C5A364006A526F /* gcd_helpers.h */,
+				417B013B27FDA7DF00C74DE3 /* gcd_helpers.m */,
 				41F263A4212680A600274F59 /* ignore_warnings.h */,
 				41F263A6212680A700274F59 /* inline.h */,
 				415F88CC273AA9540047AD64 /* no_unique_address.h */,
@@ -21704,6 +21710,7 @@
 				5CDD8A9A1E43C00F00621E92 /* input_audio_file.cc in Sources */,
 				5CDD8FD51E43CD6600621E92 /* inter_arrival.cc in Sources */,
 				41323A6626652AD600B38623 /* inter_arrival_delta.cc in Sources */,
+				417B013A27FDA4CF00C74DE3 /* task_queue_gcd.cc in Sources */,
 				5CDD83DD1E439A6F00621E92 /* inter_frame_delay.cc in Sources */,
 				413111CE2552A3BB001B9D95 /* internal_decoder_factory.cc in Sources */,
 				4131C285234B8CC40028A615 /* internal_encoder_factory.cc in Sources */,
@@ -22219,6 +22226,7 @@
 				4131C38D234B957D0028A615 /* stationarity_estimator.cc in Sources */,
 				5CDD8A511E43BFB300621E92 /* statistics_calculator.cc in Sources */,
 				4131BF0D234B88200028A615 /* stats_collector.cc in Sources */,
+				417B013C27FDA7E000C74DE3 /* gcd_helpers.m in Sources */,
 				5CDD85BC1E43B5C000621E92 /* stats_counter.cc in Sources */,
 				4131C342234B8DDF0028A615 /* stats_types.cc in Sources */,
 				4131C156234B89E20028A615 /* stream.cc in Sources */,

Modified: trunk/Source/WebCore/ChangeLog (292472 => 292473)


--- trunk/Source/WebCore/ChangeLog	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/WebCore/ChangeLog	2022-04-06 16:16:15 UTC (rev 292473)
@@ -1,3 +1,15 @@
+2022-04-06  Youenn Fablet  <you...@apple.com>
+
+        [Cocoa] Use GCD webrtc task queue
+        https://bugs.webkit.org/show_bug.cgi?id=238861
+
+        Reviewed by Eric Carlson.
+
+        Covered by existing tests.
+
+        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
+        (WebCore::LibWebRTCProvider::createPeerConnectionFactory):
+
 2022-04-06  Simon Fraser  <simon.fra...@apple.com>
 
         Unify the two ImageBuffer::create() functions, passing RenderingPurpose everywhere

Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp (292472 => 292473)


--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp	2022-04-06 16:02:57 UTC (rev 292472)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp	2022-04-06 16:16:15 UTC (rev 292473)
@@ -50,6 +50,7 @@
 #include <webrtc/pc/peer_connection_factory.h>
 #include <webrtc/pc/peer_connection_factory_proxy.h>
 #include <webrtc/rtc_base/physical_socket_server.h>
+#include <webrtc/rtc_base/task_queue_gcd.h>
 
 ALLOW_UNUSED_PARAMETERS_END
 
@@ -299,7 +300,11 @@
     auto audioModule = rtc::scoped_refptr<LibWebRTCAudioModule>(new rtc::RefCountedObject<LibWebRTCAudioModule>());
     m_audioModule = audioModule.get();
 
-    return webrtc::CreatePeerConnectionFactory(networkThread, signalingThread, signalingThread, WTFMove(audioModule), webrtc::CreateBuiltinAudioEncoderFactory(), webrtc::CreateBuiltinAudioDecoderFactory(), createEncoderFactory(), createDecoderFactory(), nullptr, nullptr, nullptr);
+    return webrtc::CreatePeerConnectionFactory(networkThread, signalingThread, signalingThread, WTFMove(audioModule), webrtc::CreateBuiltinAudioEncoderFactory(), webrtc::CreateBuiltinAudioDecoderFactory(), createEncoderFactory(), createDecoderFactory(), nullptr, nullptr, nullptr
+#if PLATFORM(COCOA)
+        , webrtc::CreateTaskQueueGcdFactory()
+#endif
+    );
 }
 
 std::unique_ptr<webrtc::VideoDecoderFactory> LibWebRTCProvider::createDecoderFactory()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to