GNOME Bugzilla – Bug 764256
gstreamer-vaapi fails with 30-bit colour depth display
Last modified: 2016-04-29 08:38:59 UTC
Created attachment 324831 [details] [review] Allows 30-bit colour depth to be used gstreamer-vaapi fails to open a window when the display is set to 30-bit colour depth. Here's the output: [stephen@localhost ~]$ gst-launch-1.0 playbin uri=rtsp://192.168.0.13/ch0_0.h264 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Progress: (open) Opening Stream Progress: (connect) Connecting to rtsp://192.168.0.13/ch0_0.h264 Progress: (open) Retrieving server options Progress: (open) Retrieving media info Progress: (request) SETUP stream 0 Progress: (open) Opened Stream Setting pipeline to PLAYING ... New clock: GstSystemClock Progress: (request) Sending PLAY request Progress: (request) Sending PLAY request Progress: (request) Sent PLAY request libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so libva info: Found init function __vaDriverInit_0_38 libva info: va_openDriver() returns 0 Got context from element 'vaapidecode': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)NULL; Redistribute latency... X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 1 (X_CreateWindow) Serial number of failed request: 25 Current serial number in output stream: 28 I tracked down the error to this bit of code in gstvaapiutils_x11.c: XGetWindowAttributes (dpy, rootwin, &wattr); depth = wattr.depth; if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24; which clamps the colour depth to 24, which fails with the NVIDIA binary driver as it doesn't advertise a TrueColor visual with a depth of 24 (only 30 and 32). Allowing the depth to be 30, lets everything work as expected.
Review of attachment 324831 [details] [review]: The patch looks good. I would like it to be in git format-patch (author and comment).