diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb index c5048c89b..2225dd129 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb @@ -16,10 +16,14 @@ require digi-webkit-examples.inc RDEPENDS_${PN} = " \ cog \ + video-examples \ webglsamples \ ${WEBSERVER_PACKAGE} \ " +VPU_NOTE = "This means that, if the video format is supported by the VPU, WebKit will use the VPU to decode the video." +VPU_NOTE_ccimx8mn = "Since the ConnectCore 8M Nano doesn't have a VPU, WebKit will decode the videos using gstreamer software." + # The package contains static webpages, no need to configure or compile do_configure[noexec] = "1" do_compile[noexec] = "1" @@ -41,4 +45,20 @@ do_install() { SAMPLE_LIST="${SAMPLE_LIST}\n" sed -i s,##WEBGL_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html + + # Add a note regarding the video decoding process, which depends on the + # platform. + sed -i s/##VPU_NOTE##/"${VPU_NOTE}"/g ${D}/${WEBSERVER_ROOT}/index.html + + # Use the same method to dynamically generate the list of video + # examples. + SAMPLE_LIST="" + ENTRY='
  • _name_

  • ' + for sample in ${VIDEO_SAMPLES}; do + SAMPLE_LIST="${SAMPLE_LIST}\n$(echo ${ENTRY} | sed s/_name_/${sample}/g)" + done + + SAMPLE_LIST="${SAMPLE_LIST}\n" + + sed -i s,##VIDEO_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html } diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc index 0289cdcc6..8638a1950 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc @@ -35,6 +35,12 @@ WEBGL_REQUIRED = " \ ${WEBGL_SAMPLE_DEPS} \ " +# List of video samples +VIDEO_SAMPLES = " \ + big_buck_bunny.mov \ + big_buck_bunny.webm \ +" + # All packages involved in the webkit examples install their files in the # webserver directory FILES_${PN} = "/${WEBSERVER_ROOT}/*" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html index 8a60d920f..5e49dbb68 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html @@ -25,5 +25,14 @@ examples have been obtained from +

    Video playback examples

    + +

    WPE WebKit uses gstreamer for multimedia playback. +##VPU_NOTE##

    + +

    You can test video playback with different formats using the links +below:

    + + diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb new file mode 100644 index 000000000..b0ee5f197 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb @@ -0,0 +1,28 @@ +# Copyright (C) 2020 Digi International. + +SUMMARY = "Short videos to demonstrate video playback on the WPE WebKit" +DESCRIPTION = "This package contains fragments of the short film 'Big Buck Bunny', which are used to demonstrate how WebKit makes use of hardware acceleration for video decoding" +HOMEPAGE = "https://peach.blender.org/" +LICENSE = "CC-BY-3.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/CC-BY-3.0;md5=dfa02b5755629022e267f10b9c0a2ab7" + +SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "d22cc0fa20fde187455b27a799d2f9e6" +SRC_URI[sha256sum] = "97389f33d98c52d4311117366f0aa8dc78d00f51a787697af349de4668ccdbf6" + +S = "${WORKDIR}/${PN}-${PV}" + +require digi-webkit-examples.inc + +# The package contains video files, no need to configure or compile +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}/${WEBSERVER_ROOT}/videos + + for sample in ${VIDEO_SAMPLES}; do + install -m 644 ${S}/${sample} ${D}/${WEBSERVER_ROOT}/videos + done +}