WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 178860
[GTK] Make libwebrtc backend buildable for GTK port
https://bugs.webkit.org/show_bug.cgi?id=178860
Summary
[GTK] Make libwebrtc backend buildable for GTK port
Alejandro G. Castro
Reported
2017-10-26 05:26:17 PDT
Add the cmake compilation file, required dependencies and options to make it build for the GTK port.
Attachments
Patch
(2.04 MB, patch)
2017-10-26 06:14 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(2.04 MB, patch)
2018-03-05 04:00 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(2.04 MB, patch)
2018-03-07 08:32 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(1.66 MB, patch)
2018-03-21 08:10 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(814.26 KB, patch)
2018-03-22 01:52 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(814.26 KB, patch)
2018-03-22 02:14 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(814.26 KB, patch)
2018-03-22 02:23 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(813.84 KB, patch)
2018-03-22 05:14 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(813.84 KB, patch)
2018-03-22 07:51 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(831.21 KB, patch)
2018-03-23 09:20 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch for landing
(831.13 KB, patch)
2018-04-02 03:51 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Alejandro G. Castro
Comment 1
2017-10-26 06:14:43 PDT
Created
attachment 325000
[details]
Patch
Alejandro G. Castro
Comment 2
2018-03-05 04:00:19 PST
Created
attachment 334994
[details]
Patch
Alejandro G. Castro
Comment 3
2018-03-07 08:32:22 PST
Created
attachment 335194
[details]
Patch
Michael Catanzaro
Comment 4
2018-03-07 09:56:21 PST
Comment on
attachment 335194
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=335194&action=review
> Source/cmake/OptionsGTK.cmake:90 > +WEBKIT_OPTION_DEFINE(USE_LIBWEBRTC "Whether to use libwebrtc for WebRTC support" PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
I don't think you need a new option, since you set USE_LIBWEBRTC unconditionally below if ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC is enabled. A new build option should only be needed if you were going to allow using ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC with USE_LIBWEBRTC disabled.
> Source/cmake/OptionsGTK.cmake:226 > + set(USE_LIBWEBRTC TRUE) > + SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE)
I don't think you need both
Alejandro G. Castro
Comment 5
2018-03-08 03:09:45 PST
(In reply to Michael Catanzaro from
comment #4
)
> Comment on
attachment 335194
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=335194&action=review
> > > Source/cmake/OptionsGTK.cmake:90 > > +WEBKIT_OPTION_DEFINE(USE_LIBWEBRTC "Whether to use libwebrtc for WebRTC support" PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) > > I don't think you need a new option, since you set USE_LIBWEBRTC > unconditionally below if ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC is enabled. A > new build option should only be needed if you were going to allow using > ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC with USE_LIBWEBRTC disabled. >
We do this for the moment but we could try to use a gstreamer webrtc backend at some point in the future and I guess in that case it makes sense people forcing this backend can keep this option?
> > Source/cmake/OptionsGTK.cmake:226 > > + set(USE_LIBWEBRTC TRUE) > > + SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE) > > I don't think you need both
Right. Thanks for the review!
Alejandro G. Castro
Comment 6
2018-03-12 05:16:11 PDT
Comment on
attachment 335194
[details]
Patch After
r229378
we need to update the patch.
Alejandro G. Castro
Comment 7
2018-03-21 08:10:51 PDT
Created
attachment 336194
[details]
Patch
Alex Christensen
Comment 8
2018-03-21 10:06:37 PDT
Why are we checking in a bunch of generated assembly instead of making the assembly generation part of the build process? You also only include x86_64 assembly. What about other architectures?
Michael Catanzaro
Comment 9
2018-03-21 11:35:31 PDT
There's a configure option to use system OpenSSL instead of BoringSSL... does that not work? Seems like that would be *slightly* less bad.
Michael Catanzaro
Comment 10
2018-03-21 11:50:33 PDT
BTW, I'm talking to GStreamer developers about using GDtlsConnection in GStreamer's WebRTC code, which we'd gain automatically once we dump libwebrtc. Currently it relies on OpenSSL via a wrapper lib. GDtlsConnection is an abstraction that will allow us to switch between different TLS libraries to avoid licensing issues; the default would be GnuTLS, because OpenSSL is unacceptable on desktop Linux, and it can be switched to OpenSSL for embedded systems where GnuTLS is unacceptable. This way, we can delete libwebrtc rather than rewriting its network code to drop the BoringSSL/OpenSSL dependency.
Michael Catanzaro
Comment 11
2018-03-21 12:12:34 PDT
(In reply to Michael Catanzaro from
comment #10
)
> BTW, I'm talking to GStreamer developers about using GDtlsConnection in > GStreamer's WebRTC code, which we'd gain automatically once we dump > libwebrtc.
To be clear: that's a planned near-term enhancement to GStreamer. Currently it relies on OpenSSL via a wrapper lib.
youenn fablet
Comment 12
2018-03-21 20:05:48 PDT
(In reply to Michael Catanzaro from
comment #9
)
> There's a configure option to use system OpenSSL instead of BoringSSL... > does that not work? Seems like that would be *slightly* less bad.
It is supposed to work but I heard that this option is not widely used so probably not very well tested.
Alejandro G. Castro
Comment 13
2018-03-22 00:10:24 PDT
(In reply to Alex Christensen from
comment #8
)
> Why are we checking in a bunch of generated assembly instead of making the > assembly generation part of the build process? You also only include x86_64 > assembly. What about other architectures?
Thanks for the review! Basically I was assuming you did it this way when you pushed libwebrtc the first time because we are not running a complete compilation process of libwebrtc and all its third parties, it is smaller and simpler compilation, that is one of my goals, it really makes live easier for us when updating the code. In this patch I updated the ones I needed in my current setup and decided to start supporting that architecture in our case to add new ones in the future, this is just the first commit. But now that you say it I think it could be simpler if we can avoid this setup, so I'll try the option OPENSSL_NO_ASM. And we will add support for the generation if required. Maybe we should remove all the .S files if you are not using it.
Alejandro G. Castro
Comment 14
2018-03-22 01:52:32 PDT
Created
attachment 336265
[details]
Patch
Alejandro G. Castro
Comment 15
2018-03-22 02:14:50 PDT
Created
attachment 336267
[details]
Patch
Alejandro G. Castro
Comment 16
2018-03-22 02:23:50 PDT
Created
attachment 336268
[details]
Patch
Alejandro G. Castro
Comment 17
2018-03-22 05:14:17 PDT
Created
attachment 336273
[details]
Patch
Alejandro G. Castro
Comment 18
2018-03-22 07:51:18 PDT
Created
attachment 336282
[details]
Patch
youenn fablet
Comment 19
2018-03-22 10:18:44 PDT
Comment on
attachment 336282
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=336282&action=review
> Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.cpp:41 > +Ref<RealtimeIncomingAudioSource> RealtimeIncomingAudioSource::create(rtc::scoped_refptr<webrtc::AudioTrackInterface>&& audioTrack, String&& audioTrackId)
Can we create new files such as RealtimeIncomingAudioSourceGlib.cpp that would contain that implementation and later on other needed stuff, similarly to RealtimeIncomingVideoSourceCocoa.cpp? You will need to specialize OnFrame anyway at some point. Ditto for other classes.
Alejandro G. Castro
Comment 20
2018-03-23 00:07:08 PDT
(In reply to youenn fablet from
comment #19
)
> Comment on
attachment 336282
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=336282&action=review
> > > Source/WebCore/platform/mediastream/RealtimeIncomingAudioSource.cpp:41 > > +Ref<RealtimeIncomingAudioSource> RealtimeIncomingAudioSource::create(rtc::scoped_refptr<webrtc::AudioTrackInterface>&& audioTrack, String&& audioTrackId) > > Can we create new files such as RealtimeIncomingAudioSourceGlib.cpp that > would contain that implementation and later on other needed stuff, similarly > to RealtimeIncomingVideoSourceCocoa.cpp? > You will need to specialize OnFrame anyway at some point. > > Ditto for other classes.
Right, we have those in follow up commits, I can add a smaller version in this commit already. Thanks for the review!
Alejandro G. Castro
Comment 21
2018-03-23 09:20:57 PDT
Created
attachment 336378
[details]
Patch
youenn fablet
Comment 22
2018-03-23 09:24:13 PDT
Comment on
attachment 336378
[details]
Patch r=me as long as the bots are happy
Michael Catanzaro
Comment 23
2018-03-23 09:47:51 PDT
FWIW, I imagine getting rid of the asm will significantly affect performance on small embedded devices. I doubt it would be noticeable on desktops.
youenn fablet
Comment 24
2018-03-23 09:57:01 PDT
(In reply to Michael Catanzaro from
comment #23
)
> FWIW, I imagine getting rid of the asm will significantly affect performance > on small embedded devices. I doubt it would be noticeable on desktops.
Sure, at the same time, when you are doing WebRTC, you are doing so many other things that I am not sure how big the impact will actually be.
Alejandro G. Castro
Comment 25
2018-04-02 03:46:41 PDT
Bots complain when compiling the libvpx dependency, apparently google changes the generated archive files every time you download, so I'll replace that to use the tag in the git repository and try to land. Just pinged the gtk+ and wpe bot admins anyway, because it adds a couple of dependencies and they can cause issues. Thanks everyone for the reviews!
Alejandro G. Castro
Comment 26
2018-04-02 03:49:48 PDT
(In reply to Michael Catanzaro from
comment #23
)
> FWIW, I imagine getting rid of the asm will significantly affect performance > on small embedded devices. I doubt it would be noticeable on desktops.
Yep, you are right. Anyway we are currently not using the asm in the raspberrry pi and we are doing quite well, we will keep this in mind when checking performance on that device for the next steps. Thanks for the comment!
Alejandro G. Castro
Comment 27
2018-04-02 03:51:20 PDT
Created
attachment 336976
[details]
Patch for landing
WebKit Commit Bot
Comment 28
2018-04-02 04:29:10 PDT
Comment on
attachment 336976
[details]
Patch for landing Clearing flags on attachment: 336976 Committed
r230152
: <
https://trac.webkit.org/changeset/230152
>
WebKit Commit Bot
Comment 29
2018-04-02 04:29:12 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 30
2018-04-02 04:30:38 PDT
<
rdar://problem/39102256
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug