After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764256 - gstreamer-vaapi fails with 30-bit colour depth display
gstreamer-vaapi fails with 30-bit colour depth display
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.6.3
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-27 09:11 UTC by Stephen
Modified: 2016-04-29 08:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allows 30-bit colour depth to be used (591 bytes, patch)
2016-03-27 09:11 UTC, Stephen
committed Details | Review

Description Stephen 2016-03-27 09:11:41 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.
Comment 1 Víctor Manuel Jáquez Leal 2016-03-29 08:59:39 UTC
Review of attachment 324831 [details] [review]:

The patch looks good. I would like it to be in git format-patch (author and comment).