Skip to contentSkip to conversation

package/wpewebkit: add option to enable media-stream

PATCH Applied James Hilliard 4 participants 6 messages Sep 24, 2021 – Oct 10, 2021

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/wpewebkit: add option to enable media-stream

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

---
 package/wpewebkit/Config.in    | 6 ++++++
 package/wpewebkit/wpewebkit.mk | 7 +++++++
 2 files changed, 13 insertions(+)
package/wpewebkit/Config.in +6 -0
index 04b2bf3beb..df1c900d9f 100644
@@ -105,6 +105,12 @@ config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 	  This option pulls in all of the required dependencies
 	  to enable multimedia (video/audio) support.
 
+config BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM
+	bool "media-stream support"
+	depends on BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
+	help
+	  This option enables media-stream support.
+
 if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 
 config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL
package/wpewebkit/wpewebkit.mk +7 -0
index 5c5e6625f8..9ad569a472 100644
@@ -46,6 +46,13 @@ WPEWEBKIT_CONF_OPTS += \
 	-DENABLE_WEB_AUDIO=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=ON
+WPEWEBKIT_DEPENDENCIES += gst1-plugins-bad
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
 WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
 else
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi James, all,

Quoted 31 lines · On Fri, 24 Sep 2021 04:53:40 -0600 James Hilliard <[email protected]>…

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

---
 package/wpewebkit/Config.in    | 6 ++++++
 package/wpewebkit/wpewebkit.mk | 7 +++++++
 2 files changed, 13 insertions(+)
package/wpewebkit/Config.in +6 -0
index 04b2bf3beb..df1c900d9f 100644
@@ -105,6 +105,12 @@ config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 	  This option pulls in all of the required dependencies
 	  to enable multimedia (video/audio) support.
 
+config BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM
+	bool "media-stream support"
+	depends on BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
+	help
+	  This option enables media-stream support.
+
 if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 
 config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL
package/wpewebkit/wpewebkit.mk +0 -0
index 5c5e6625f8..9ad569a472 100644

package/wpewebkit/wpewebkit.mk WPEWEBKIT_CONF_OPTS += \ · line 53

Quoted 8 lines
package/wpewebkit/wpewebkit.mk +5 -0
@@ -46,6 +46,13 @@ WPEWEBKIT_CONF_OPTS += \
 	-DENABLE_WEB_AUDIO=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=ON
+WPEWEBKIT_DEPENDENCIES += gst1-plugins-bad
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=OFF

The problem I see here is that we are forcing to disable a feature which wildly popular web sites (e.g. YouTube) use more and more and being able to disable it is likely to do more harm than good. Sites will break and people will wrongly blame WPE WebKit :-\

The right approach here would be to break the circular dependency is doing two passes on the gst1-plugins-bad build: one basic build which has the things that WebKit needs (i.e. codecparsers), then use that to build WebKit, then rebuild with all the options enabled. This second gst1-plugins-bad build would be the one to install to the target image.

Unfortunately, I think the “good” solution it is not trivial to achieve with Buildroot. What comes to mind is having a new gst1-plugins-bad-minimal package which is used only as a throwaway dependency to build wpewebkit. If somebody has a better suggestion, I would love to know :)

Quoted 8 lines
package/wpewebkit/wpewebkit.mk +2 -0
+endif
+
 ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
 WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
 else
Signature · 1 line
2.25.1

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 38 lines · Adrian Perez de Castro

Hi James, all,

Quoted 34 lines · On Fri, 24 Sep 2021 04:53:40 -0600 James Hilliard <[email protected]>…

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

---
 package/wpewebkit/Config.in    | 6 ++++++
 package/wpewebkit/wpewebkit.mk | 7 +++++++
 2 files changed, 13 insertions(+)
package/wpewebkit/Config.in +6 -0
index 04b2bf3beb..df1c900d9f 100644
@@ -105,6 +105,12 @@ config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
        This option pulls in all of the required dependencies
        to enable multimedia (video/audio) support.
 
+config BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM
+     bool "media-stream support"
+     depends on BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
+     help
+       This option enables media-stream support.
+
 if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 
 config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL
package/wpewebkit/wpewebkit.mk +0 -0
index 5c5e6625f8..9ad569a472 100644
@@ -46,6 +46,13 @@ WPEWEBKIT_CONF_OPTS += \
      -DENABLE_WEB_AUDIO=OFF
 endif
 
Quoted 10 lines

package/wpewebkit/wpewebkit.mk WPEWEBKIT_CONF_OPTS += \ · line 53

Quoted 5 lines
package/wpewebkit/wpewebkit.mk +5 -0
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=ON
+WPEWEBKIT_DEPENDENCIES += gst1-plugins-bad
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=OFF

The problem I see here is that we are forcing to disable a feature which wildly popular web sites (e.g. YouTube) use more and more and being able to disable it is likely to do more harm than good. Sites will break and people will wrongly blame WPE WebKit :-\

But this feature is effectively unconditionally disabled right now since it can not be
built without wpewebkit depending on gst1-plugins-bad at build time, so at least this is an improvement as it would now be possible to enable media stream support.

Quoted 11 lines

The right approach here would be to break the circular dependency is doing two passes on the gst1-plugins-bad build: one basic build which has the things that WebKit needs (i.e. codecparsers), then use that to build WebKit, then rebuild with all the options enabled. This second gst1-plugins-bad build would be the one to install to the target image.

Unfortunately, I think the “good” solution it is not trivial to achieve with Buildroot. What comes to mind is having a new gst1-plugins-bad-minimal package which is used only as a throwaway dependency to build wpewebkit. If somebody has a better suggestion, I would love to know :)

Well apparently if the wpe plugin in gst1-plugins-bad is moved to gst1-plugins-good
that would also solve the issue since wpewebkit does not depend on gst1-plugins-good
at build time, although not sure what's needed upstream to do so.

Quoted 12 lines
Quoted 9 lines
package/wpewebkit/wpewebkit.mk +2 -1
+endif
+
 ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
 WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
 else
--

2.25.1

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to James Hilliard
Quoted 4 lines · James Hilliard

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

Applied to master, thanks.

As James mentioned, the current situation already is that wpewebkit is
compiled without mediastream support. So although this is not a perfect solution, it's at least a step forward.

Regards,
Arnout

Quoted 31 lines
---
  package/wpewebkit/Config.in    | 6 ++++++
  package/wpewebkit/wpewebkit.mk | 7 +++++++
  2 files changed, 13 insertions(+)
package/wpewebkit/Config.in +6 -0
index 04b2bf3beb..df1c900d9f 100644
@@ -105,6 +105,12 @@ config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
  	  This option pulls in all of the required dependencies
  	  to enable multimedia (video/audio) support.
 
+config BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM
+	bool "media-stream support"
+	depends on BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
+	help
+	  This option enables media-stream support.
+
  if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
 
  config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL
package/wpewebkit/wpewebkit.mk +0 -0
index 5c5e6625f8..9ad569a472 100644
@@ -46,6 +46,13 @@ WPEWEBKIT_CONF_OPTS += \
  	-DENABLE_WEB_AUDIO=OFF
  endif
 

package/wpewebkit/wpewebkit.mk WPEWEBKIT_CONF_OPTS += \ · line 58

Quoted 10 lines
package/wpewebkit/wpewebkit.mk +7 -0
+ifeq ($(BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM),y)
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=ON
+WPEWEBKIT_DEPENDENCIES += gst1-plugins-bad
+else
+WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=OFF
+endif
+
  ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
  WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
  else

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 3 lines · James Hilliard

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

Quoted 7 lines
Quoted 1 line

Applied to master, thanks.

As James mentioned, the current situation already is that wpewebkit
is compiled without mediastream support. So although this is not a perfect solution, it's at least a step forward.

Committed to 2021.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Arnout Vandecappelle

Hi,

Quoted 11 lines · On Wed, 06 Oct 2021 21:12:37 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 4 lines · James Hilliard

This has a compile time dependency on gst1-plugins-bad due to the codecparsers dependency.

Applied to master, thanks.

As James mentioned, the current situation already is that wpewebkit is
compiled without mediastream support. So although this is not a perfect solution, it's at least a step forward.

Right, I was under the (erroneous) impression that we were enabling media-stream by default in the build system. Turns out, that is only true for developer builds--I should have double checked instead of relying on my sleepy brain :]

Thanks James for the patch, and Arnout for merging it!

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot