[JHBuild] Add gstreamer-vaapi in moduleset
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2018 16:11:57 +0000 (16:11 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2018 16:11:57 +0000 (16:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182283

Reviewed by Carlos Alberto Lopez Perez.

GStreamer-VAAPI is required for hardware-accelerated video
playback support on Intel and AMD (using radeosi driver)
platforms.

* gstreamer/jhbuild.modules: Add gstreamer-vaapi.
* gtk/install-dependencies: Install libva.
* wpe/install-dependencies: Ditto.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server): Disable va-api support when
testing because it's incompatible with Mesa's softGL driver.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227901 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/gtk.py
Tools/gstreamer/jhbuild.modules
Tools/gtk/install-dependencies
Tools/wpe/install-dependencies

index f2bd13e..74c820e 100644 (file)
@@ -1,3 +1,21 @@
+2018-01-31  Philippe Normand  <pnormand@igalia.com>
+
+        [JHBuild] Add gstreamer-vaapi in moduleset
+        https://bugs.webkit.org/show_bug.cgi?id=182283
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        GStreamer-VAAPI is required for hardware-accelerated video
+        playback support on Intel and AMD (using radeosi driver)
+        platforms.
+
+        * gstreamer/jhbuild.modules: Add gstreamer-vaapi.
+        * gtk/install-dependencies: Install libva.
+        * wpe/install-dependencies: Ditto.
+        * Scripts/webkitpy/port/gtk.py:
+        (GtkPort.setup_environ_for_server): Disable va-api support when
+        testing because it's incompatible with Mesa's softGL driver.
+
 2018-01-31  Charlie Turner  <cturner@igalia.com>
 
         [WPE] Update jhbuild dependencies
index 9277f92..c34df2d 100644 (file)
@@ -121,7 +121,6 @@ class GtkPort(Port):
         environment['LIBOVERLAY_SCROLLBAR'] = '0'
         environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
         environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('lib', 'plugins')
-        environment['OWR_USE_TEST_SOURCES'] = '1'
         self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
 
         # Configure the software libgl renderer if jhbuild ready and we test inside a virtualized window system
@@ -130,14 +129,16 @@ class GtkPort(Port):
                                                                   ignore_errors=True).strip()
             dri_libgl_path = os.path.join(llvmpipe_libgl_path, "dri")
             if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")) and os.path.exists(os.path.join(dri_libgl_path, "swrast_dri.so")):
-                    # Force the Gallium llvmpipe software rasterizer
-                    environment['LIBGL_ALWAYS_SOFTWARE'] = "1"
-                    environment['LIBGL_DRIVERS_PATH'] = dri_libgl_path
-                    environment['LD_LIBRARY_PATH'] = llvmpipe_libgl_path
-                    if os.environ.get('LD_LIBRARY_PATH'):
-                            environment['LD_LIBRARY_PATH'] += ':%s' % os.environ.get('LD_LIBRARY_PATH')
+                # Make sure va-api support gets disabled because it's incompatible with Mesa's softGL driver.
+                environment['LIBVA_DRIVER_NAME'] = "null"
+                # Force the Gallium llvmpipe software rasterizer
+                environment['LIBGL_ALWAYS_SOFTWARE'] = "1"
+                environment['LIBGL_DRIVERS_PATH'] = dri_libgl_path
+                environment['LD_LIBRARY_PATH'] = llvmpipe_libgl_path
+                if os.environ.get('LD_LIBRARY_PATH'):
+                    environment['LD_LIBRARY_PATH'] += ':%s' % os.environ.get('LD_LIBRARY_PATH')
             else:
-                    _log.warning("Can't find Gallium llvmpipe driver. Try to run update-webkitgtk-libs")
+                _log.warning("Can't find Gallium llvmpipe driver. Try to run update-webkitgtk-libs")
         if self.get_option("leaks"):
             # Turn off GLib memory optimisations https://wiki.gnome.org/Valgrind.
             environment['G_SLICE'] = 'always-malloc'
index a14dada..807c84f 100644 (file)
@@ -10,6 +10,7 @@
       <dep package="gst-plugins-good"/>
       <dep package="gst-plugins-bad"/>
       <dep package="gst-libav"/>
+      <dep package="gstreamer-vaapi"/>
     </dependencies>
   </metamodule>
 
             hash="sha256:2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62"/>
   </autotools>
 
+  <autotools id="gstreamer-vaapi">
+    <branch module="gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz" version="1.12.4"
+            repo="gstreamer"
+            hash="sha256:1c2d77242e1f30c4d1394636cae9f6877228a017960fca96881e0080d8b6e9c9"/>
+    <dependencies>
+      <dep package="gstreamer"/>
+      <dep package="gst-plugins-base"/>
+      <dep package="gst-plugins-bad"/>
+    </dependencies>
+   </autotools>
+
 </moduleset>
index 0a6a37a..f655d7d 100755 (executable)
@@ -196,6 +196,7 @@ function installDependenciesWithApt {
         libproxy-dev \
         libssl-dev \
         libtiff5-dev \
+        libva-dev \
         libv4l-dev \
         libxcb-composite0-dev \
         libxcb-xfixes0-dev \
@@ -346,6 +347,7 @@ function installDependenciesWithPacman {
         libpciaccess \
         libproxy \
         libtiff \
+        libva \
         libxfixes \
         libxfont \
         libxcb \
@@ -508,6 +510,7 @@ function installDependenciesWithDnf {
         libpciaccess-devel \
         libproxy-devel \
         libtiff-devel \
+        libva-devel \
         libxcb-devel \
         libxkbfile-devel \
         libxkbcommon-x11-devel \
index 89bddaf..3d3e307 100755 (executable)
@@ -118,6 +118,7 @@ function installDependenciesWithApt {
         libsrtp0-dev \
         libtheora-dev \
         libtool-bin \
+        libva-dev \
         libvorbis-dev \
         libvpx-dev \
         libxcb-xkb-dev \
@@ -203,6 +204,7 @@ function installDependenciesWithPacman {
         libsrtp \
         libtheora \
         libv4l-dev \
+        libva \
         libvorbis \
         libvpx \
         libxcb \
@@ -284,6 +286,7 @@ function installDependenciesWithDnf {
         libsrtp-devel \
         libtheora-devel \
         libv4l-devel \
+        libva-devel \
         libvorbis-devel \
         libvpx-devel \
         libxcb-devel \