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

Adrian Perez de Castro aperez at igalia.com
Fri Oct 1 10:58:41 UTC 2021


Hi James, all,

On Fri, 24 Sep 2021 04:53:40 -0600 James Hilliard <james.hilliard1 at gmail.com> wrote:
> This has a compile time dependency on gst1-plugins-bad due to
> the codecparsers dependency.
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> ---
>  package/wpewebkit/Config.in    | 6 ++++++
>  package/wpewebkit/wpewebkit.mk | 7 +++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> index 04b2bf3beb..df1c900d9f 100644
> --- a/package/wpewebkit/Config.in
> +++ b/package/wpewebkit/Config.in
> @@ -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
> diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
> index 5c5e6625f8..9ad569a472 100644
> --- a/package/wpewebkit/wpewebkit.mk
> +++ b/package/wpewebkit/wpewebkit.mk
> @@ -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 :)

> +endif
> +
>  ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
>  WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
>  else
> -- 
> 2.25.1
> 

Cheers,
—Adrián
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20211001/03381fb3/attachment.asc>


More information about the buildroot mailing list