GNOME Bugzilla – Bug 782212
elements get blacklisted in headless systems
Last modified: 2017-10-03 11:28:42 UTC
Created attachment 351177 [details] [review] limit scanning during plugin inspection When the DISPLAY variable is not set, the elements get blacklisted. It is enough to log in to a system over ssh and do a gst-inspect-1.0 to get into this situation. Received a patch on IRC and validated that it resolves the issue.
The problem is gst_vaapi_display_create_unlocked (): it tries to extract the display size when the instantiated display is X11, but if the system is headless, there is no display to query. We have to options here: 1\ Follow the proposed patch and use only the DRM, though some drivers might no support DRM 2\ Refactor the code and avoid the display query when creating the display.
Created attachment 360755 [details] [review] libs: display: remove parent member Parent was a crumb left from display cache.
Created attachment 360756 [details] [review] libs: display: remove display_type member It is not used any more since GstVaapiDisplay was ported as a GstObject-based. This information is part of the class information.
Created attachment 360757 [details] [review] libs: display: remove display_type from display info Since it's no required to pass the display type in the display info, the structure member is removed.
Created attachment 360758 [details] [review] libs: display: egl: avoid two vaDisplay instantiates GstVaapiDisplayEGL is a wrapper of another GstVaapiDisplay, either X11 or Wayland. Nonetheless it created another vaDisplay for it, instead of using the wrapped one. This patch enables the reuse of the wrapped vaDisplay avoiding instantiating two.
Created attachment 360759 [details] [review] libs: display: delay getting screen resolution Instead of extracting the screen resolution at GstVaapiDisplay creation, this patch delay it until the screen size is requested for first time.
Created attachment 360760 [details] [review] pluigns: try to create test display in order When creating the test display for querying capabilites, it try in certain order: DRM, Wayland and finally X11. GLX nor EGL are tried since they are either composited with X11 or Wayland. The reason for this is to reduce the posibility of failure that could blacklist the plugin.
Created attachment 360820 [details] [review] plugins: try to create test display in order When creating the test display for querying capabilites, it try in certain order: DRM, Wayland and finally X11. GLX nor EGL are tried since they are either composited with X11 or Wayland. The reason for this is to reduce the posibility of failure that could blacklist the plugin.
Attachment 360755 [details] pushed as dcf135e - libs: display: remove parent member Attachment 360756 [details] pushed as 4e9de44 - libs: display: remove display_type member Attachment 360757 [details] pushed as 494ac4e - libs: display: remove display_type from display info Attachment 360758 [details] pushed as 66e4593 - libs: display: egl: avoid two vaDisplay instantiates Attachment 360759 [details] pushed as 63a76c9 - libs: display: delay getting screen resolution Attachment 360820 [details] pushed as 68aca50 - plugins: try to create test display in order