Bug 167294

Summary: [WebRTC] Introduce libwebrtc abstraction for WK1/WK2 implementations
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, buildbot, commit-queue, ossy, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 167289, 167305, 167306    
Attachments:
Description Flags
Patch
none
Patch
none
Adding PageConfiguration integration
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews101 for mac-elcapitan
none
Trying to fix EFL/GTK builds
none
Patch
none
Patch achristensen: review+

youenn fablet
Reported 2017-01-22 11:16:54 PST
WK1 libwebrtc will do networking on its own while WK2 libwebrtc will delegate that to the network process.
Attachments
Patch (15.57 KB, patch)
2017-01-22 11:27 PST, youenn fablet
no flags
Patch (15.16 KB, patch)
2017-01-23 17:08 PST, youenn fablet
no flags
Adding PageConfiguration integration (18.43 KB, patch)
2017-01-23 17:16 PST, youenn fablet
no flags
Patch (21.95 KB, patch)
2017-01-24 08:43 PST, youenn fablet
no flags
Patch (33.19 KB, patch)
2017-01-24 16:16 PST, youenn fablet
no flags
Patch (33.19 KB, patch)
2017-01-24 16:23 PST, youenn fablet
no flags
Patch (33.19 KB, patch)
2017-01-24 16:28 PST, youenn fablet
no flags
Patch (32.48 KB, patch)
2017-01-25 07:54 PST, youenn fablet
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (855.69 KB, application/zip)
2017-01-25 08:56 PST, Build Bot
no flags
Trying to fix EFL/GTK builds (40.05 KB, patch)
2017-01-25 09:26 PST, youenn fablet
no flags
Patch (35.71 KB, patch)
2017-01-25 11:18 PST, Alex Christensen
no flags
Patch (35.91 KB, patch)
2017-01-25 11:34 PST, Alex Christensen
achristensen: review+
youenn fablet
Comment 1 2017-01-22 11:27:53 PST
youenn fablet
Comment 2 2017-01-23 17:08:27 PST
WebKit Commit Bot
Comment 3 2017-01-23 17:10:10 PST
Attachment 299555 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 4 2017-01-23 17:16:20 PST
Created attachment 299556 [details] Adding PageConfiguration integration
WebKit Commit Bot
Comment 5 2017-01-23 17:19:13 PST
Attachment 299556 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 6 2017-01-23 23:54:58 PST
Comment on attachment 299556 [details] Adding PageConfiguration integration View in context: https://bugs.webkit.org/attachment.cgi?id=299556&action=review > Source/WebCore/page/Page.cpp:205 > + , m_libWebRTCClient(*pageConfiguration.libWebRTCClient) When the PageConfiguration goes out of scope, this will be pointing to freed memory. > Source/WebCore/page/Page.h:642 > + LibWebRTCClient& m_libWebRTCClient; Let's have the Page keep a UniqueRef<PeerConnectionProvider> > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCClient.h:42 > +class WEBCORE_EXPORT LibWebRTCClient { > +public: > + virtual rtc::scoped_refptr<webrtc::PeerConnectionInterface> createPeerConnection(webrtc::PeerConnectionObserver&) = 0; I think this should be called a PeerConnectionProvider. It should be inside of ENABLE(WEBRTC) except the createPeerConnection function, which should be inside a USE(LIBWEBRTC)
youenn fablet
Comment 7 2017-01-24 08:43:42 PST
WebKit Commit Bot
Comment 8 2017-01-24 08:46:07 PST
Attachment 299603 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 9 2017-01-24 11:56:45 PST
Comment on attachment 299603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=299603&action=review > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCClient.h:40 > +class WEBCORE_EXPORT LibWebRTCClient { My review feedback was not addressed.
youenn fablet
Comment 10 2017-01-24 16:16:26 PST
WebKit Commit Bot
Comment 11 2017-01-24 16:18:02 PST
Attachment 299647 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/page/PageConfiguration.cpp:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 12 2017-01-24 16:23:49 PST
WebKit Commit Bot
Comment 13 2017-01-24 16:27:16 PST
Attachment 299648 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/page/PageConfiguration.cpp:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 14 2017-01-24 16:28:17 PST
WebKit Commit Bot
Comment 15 2017-01-24 16:29:49 PST
Attachment 299651 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/page/PageConfiguration.cpp:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 16 2017-01-25 07:54:44 PST
WebKit Commit Bot
Comment 17 2017-01-25 07:57:13 PST
Attachment 299704 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/page/PageConfiguration.cpp:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 18 2017-01-25 08:56:43 PST
Comment on attachment 299704 [details] Patch Attachment 299704 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2947146 New failing tests: imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html
Build Bot
Comment 19 2017-01-25 08:56:46 PST
Created attachment 299709 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
youenn fablet
Comment 20 2017-01-25 09:26:03 PST
Created attachment 299711 [details] Trying to fix EFL/GTK builds
WebKit Commit Bot
Comment 21 2017-01-25 09:28:41 PST
Attachment 299711 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:59: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/page/PageConfiguration.cpp:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 22 2017-01-25 10:43:57 PST
Comment on attachment 299711 [details] Trying to fix EFL/GTK builds View in context: https://bugs.webkit.org/attachment.cgi?id=299711&action=review > Source/WebKit/mac/ChangeLog:3 > + [WebRTC] Add support for WK1 libwebrtc endpoint Duplicate ChangeLog entry. > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:38 > + virtual rtc::scoped_refptr<webrtc::PeerConnectionInterface> createPeerConnection(webrtc::PeerConnectionObserver&) = 0; If we make this not purely virtual, then we can probably get rid of LibWebRTCEmptyProvider and the WebLibWebRTCProvider.h in Source/WebKit. > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:43 > +class LibWebRTCEmptyProvider final : public LibWebRTCProvider { I think this should be in EmptyClients.h/cpp like createEmptyEditorClient > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:60 > + Function<void()> function; Maybe this should be called callback to be consistent. > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:379 > + , makeUniqueRef<WebCore::LibWebRTCEmptyProvider>() I assume the next step is to make this return a LibWebRTCProvider that returns something that makes connection proxies, right?
Alex Christensen
Comment 23 2017-01-25 11:18:54 PST
Alex Christensen
Comment 24 2017-01-25 11:20:52 PST
Comment on attachment 299718 [details] Patch This version removes many of the USE(LIBWEBRTC) macros. If you don't use libwebrtc, you will have a pointer on the Page to an object that does nothing. I think that's worth having much cleaner code everywhere.
Alex Christensen
Comment 25 2017-01-25 11:34:22 PST
Alex Christensen
Comment 26 2017-01-25 13:01:41 PST
Csaba Osztrogonác
Comment 27 2017-01-26 02:20:04 PST
(In reply to comment #26) > http://trac.webkit.org/r211161 It broke the Apple Mac cmake build: /Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WebKit/mac/WebView/WebView.mm:160:9: fatal error: 'WebCore/LibWebRTCProvider.h' file not found #import <WebCore/LibWebRTCProvider.h> ^ 1 warning and 1 error generated. I don't know how Apple Mac cmake build generates this magic forwarding headers, I let you guys to fix the build you broke yourself.
Csaba Osztrogonác
Comment 28 2017-01-26 03:02:20 PST
I found it, here you are - https://trac.webkit.org/changeset/211208
Alex Christensen
Comment 29 2017-01-26 11:12:02 PST
Thanks, Ossy!
Note You need to log in before you can comment on or make changes to this bug.