Chromium Blink on Wayland with HW accelerated video playback using Gstreamer Presented by Zoltan Kuscsik, PhD Christophe Priouzeau Date February 2015
Introduction Chromium Browser builds using OE Ozone plugins Gstreamer PPAPI plugin Gstreamer V4L on STM B2120 Wayland on Mali 400 Browser benchmarking
Building Chromium using OE/Yocto OE recipes are provided by meta-browser: https://github.com/ossystems/meta-browser The layer OE layer depends on openembedded-core and meta-openembedded available from http://git.openembedded.org/. meta-browser supports X11 or Wayland enabled OE builds and x86, x86-64, ARMv6, ARMv7 targets. ARMv5 is no longer supported by Chromium.
Debugging Chromium on OE meta-browser is generating Release builds. Debug builds are triggered by ninja build command when the Debug output directory is specified: # ninja -C ${S}/out/Debug chrome The debug binary is huge ~2GB Chromium uses a multi process architecture, you need to find the right process to attach the debugger. Chromium s internal debugger calls can t resolve any symbols if the binaries a stripped and debug info is separated from the main binary. To fix this, use the OE configs vars: INHIBIT_PACKAGE_DEBUG_SPLIT = "1" INHIBIT_PACKAGE_STRIP = "1"
Debugging Chromium on OE Debug scenarios: 1. It is your lucky day. In most of the cases if a Chromium process fails, it generates a backtrace for every process. With enabling some additional command line options, like --trace-to-console and --enable-logging --v=1 you can guess where is the problematic code. 2. It is not your lucky day and no backtrace information provided at crash. In this case, you can generate a core dump for further analysis or add gdb to the OE s IMAGE_INSTALL variable. Alternatively, install the gdbserver. To generate a core dump you have to disable sandbox using --no-sandbox and enable core dumps with # ulimit -c unlimited In general, it is a good practice to do a test run with --disable-gpu flag. If it is a GPU related issue, there may be already a GPU related workaround which you can enable with --gpu-driver-bug-workarounds <ID> It is also possible to attach debugger to individual Chromium processes. More info and detailed Chromium debugging tips on Linux: https://code.google.com/p/chromium/wiki/linuxdebugging
Ozone plugins Platform abstraction layer for low level graphics and input handling, for AURA based builds. Supported graphics subsystems: caca - text based graphics. dri - Full screen-only plugin, with Mesa-GBM backend. It allows hardware accelerated graphics. test - no dependency on hardware specific libraries, allows to test rendering into image dumps. egltest - X11 based plugin. wayland - external project https://github.com/01org/ozone-wayland egl - external project developed by Linaro, GPU accelerated rendering. fb - developed by Linaro for testing on Qemu/ARM builds.
Ozone - new plugins You have to provide an implementation of the following classes: SurfaceFactoryOzone - system specific implementation of surface allocation. Depending on implementation it supports SW based rendering (using Skia) or GPU based rendering (EGL path). SW rendering is provided by implementation of the the CreateCanvasForWidget method (see caca, test plugins). GPU accelerated rendering can be enabled if the GetNativeDisplay, CreateEGLSurfaceForWidget. LoadEGLGLES2Bindings methods of the plugin are implemented (egl, dri plugins). EventFactoryOzone - implementation of the event subsystem. In egl plugin we return the internal EventFactoryEvdev implementation. OzonePlatform - base class of the Ozone plugin
Chromium PPAPI Pepper Plugin Api Plugins way provided by Chromium/Blink Can be compiled inside or outside chromium source tree How to register your Ppapi plugins: /usr/bin/chrome/cefsimple ---register-pepper-plugins="/usr/lib/chrome/libppapi_gstreamer.so; application/x-ppapi-gst" Call the Ppapi via HTML web page: <embed type="application/x-ppapi-gstreamer" src="video uri"></embed>
Ppapi/gstreamer Gstreamer player implementation usage of playbin video hole punching Restriction of solution: chromium MUST be launched on fullscreen
Gstreamer V4L on STM B2120 V4L2 video decoder interface MEM2MEM interface DMA-BUF support Framebase interface Gstreamer V4l2 plugins STM V4l2 decoder plugins Gstreamer v4l2videodec (from plugins good)
Wayland on Mali400 Usage of Weston Compositor Backend from ST based on DRM/KMS with Egl compositor EGL compositor provided by Mali400 userland library Support of DMA-BUF