GstVaapiDisplayClass *klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
if (klass->open_display && !klass->open_display(display))
return FALSE;
- if (klass->get_display)
+ if (klass->get_display) {
priv->display = klass->get_display(display);
+ if (!priv->display)
+ return FALSE;
+ }
if (klass->get_size)
klass->get_size(display, &priv->width, &priv->height);
if (klass->get_size_mm)
gchar *display_name;
Display *x11_display;
int x11_screen;
- VADisplay *va_display;
};
enum {
return FALSE;
priv->x11_screen = DefaultScreen(priv->x11_display);
- priv->va_display = vaGetDisplay(priv->x11_display);
- return priv->va_display != NULL;
+ return TRUE;
}
static void
g_free(priv->display_name);
priv->display_name = NULL;
}
-
- priv->va_display = NULL;
}
static VADisplay
gst_vaapi_display_x11_get_va_display(GstVaapiDisplay *display)
{
- return GST_VAAPI_DISPLAY_X11(display)->priv->va_display;
+ return vaGetDisplay(GST_VAAPI_DISPLAY_XDISPLAY(display));
}
static void