mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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. https://bugzilla.gnome.org/show_bug.cgi?id=782212
This commit is contained in:
parent
63a76c9dd0
commit
68aca503ce
1 changed files with 22 additions and 2 deletions
|
@ -790,12 +790,32 @@ gst_video_info_force_nv12_if_encoded (GstVideoInfo * vinfo)
|
|||
* supported features.
|
||||
*
|
||||
* Returns: a new #GstVaapiDisplay instances. Free with
|
||||
* gst_vaapi_display_unref () after use.
|
||||
* gst_vaapi_display_unref () after use. Or %NULL if no VA display is
|
||||
* available.
|
||||
**/
|
||||
GstVaapiDisplay *
|
||||
gst_vaapi_create_test_display (void)
|
||||
{
|
||||
return gst_vaapi_create_display (GST_VAAPI_DISPLAY_TYPE_ANY, NULL);
|
||||
guint i;
|
||||
GstVaapiDisplay *display = NULL;
|
||||
const GstVaapiDisplayType test_display_map[] = {
|
||||
#if USE_DRM
|
||||
GST_VAAPI_DISPLAY_TYPE_DRM,
|
||||
#endif
|
||||
#if USE_WAYLAND
|
||||
GST_VAAPI_DISPLAY_TYPE_WAYLAND,
|
||||
#endif
|
||||
#if USE_X11
|
||||
GST_VAAPI_DISPLAY_TYPE_X11,
|
||||
#endif
|
||||
};
|
||||
|
||||
for (i = 0; G_N_ELEMENTS (test_display_map); i++) {
|
||||
display = gst_vaapi_create_display (test_display_map[i], NULL);
|
||||
if (display)
|
||||
break;
|
||||
}
|
||||
return display;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue