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.

https://bugzilla.gnome.org/show_bug.cgi?id=782212
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-09-28 17:35:01 +02:00
parent dcf135e2a5
commit 4e9de44ba2
2 changed files with 3 additions and 8 deletions

View file

@ -839,7 +839,7 @@ gst_vaapi_display_create_unlocked (GstVaapiDisplay * display,
GST_VAAPI_DISPLAY_GET_CLASS (display); GST_VAAPI_DISPLAY_GET_CLASS (display);
GstVaapiDisplayInfo info = { GstVaapiDisplayInfo info = {
.display = display, .display = display,
.display_type = priv->display_type, .display_type = klass->display_type,
}; };
switch (init_type) { switch (init_type) {
@ -870,7 +870,6 @@ gst_vaapi_display_create_unlocked (GstVaapiDisplay * display,
if (!klass->get_display || !klass->get_display (display, &info)) if (!klass->get_display || !klass->get_display (display, &info))
return FALSE; return FALSE;
priv->display = info.va_display; priv->display = info.va_display;
priv->display_type = info.display_type;
priv->native_display = info.native_display; priv->native_display = info.native_display;
if (klass->get_size) if (klass->get_size)
klass->get_size (display, &priv->width, &priv->height); klass->get_size (display, &priv->width, &priv->height);
@ -921,7 +920,6 @@ gst_vaapi_display_init (GstVaapiDisplay * display)
gst_vaapi_display_get_instance_private (display); gst_vaapi_display_get_instance_private (display);
display->priv = priv; display->priv = priv;
priv->display_type = GST_VAAPI_DISPLAY_TYPE_ANY;
priv->par_n = 1; priv->par_n = 1;
priv->par_d = 1; priv->par_d = 1;
@ -1824,9 +1822,7 @@ get_render_mode_VADisplayAttribDirectSurface (GstVaapiDisplay * display,
static gboolean static gboolean
get_render_mode_default (GstVaapiDisplay * display, GstVaapiRenderMode * pmode) get_render_mode_default (GstVaapiDisplay * display, GstVaapiRenderMode * pmode)
{ {
GstVaapiDisplayPrivate *const priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display); switch (GST_VAAPI_DISPLAY_VADISPLAY_TYPE (display)) {
switch (priv->display_type) {
#if USE_WAYLAND #if USE_WAYLAND
case GST_VAAPI_DISPLAY_TYPE_WAYLAND: case GST_VAAPI_DISPLAY_TYPE_WAYLAND:
/* wl_buffer mapped from VA surface through vaGetSurfaceBufferWl() */ /* wl_buffer mapped from VA surface through vaGetSurfaceBufferWl() */

View file

@ -94,7 +94,7 @@ typedef enum _GstVaapiDisplayInitType GstVaapiDisplayInitType;
*/ */
#undef GST_VAAPI_DISPLAY_VADISPLAY_TYPE #undef GST_VAAPI_DISPLAY_VADISPLAY_TYPE
#define GST_VAAPI_DISPLAY_VADISPLAY_TYPE(display) \ #define GST_VAAPI_DISPLAY_VADISPLAY_TYPE(display) \
(GST_VAAPI_DISPLAY_GET_PRIVATE (display)->display_type) (GST_VAAPI_DISPLAY_GET_CLASS (display)->display_type)
/** /**
* GST_VAAPI_DISPLAY_HAS_VPP: * GST_VAAPI_DISPLAY_HAS_VPP:
@ -110,7 +110,6 @@ typedef enum _GstVaapiDisplayInitType GstVaapiDisplayInitType;
struct _GstVaapiDisplayPrivate struct _GstVaapiDisplayPrivate
{ {
GRecMutex mutex; GRecMutex mutex;
GstVaapiDisplayType display_type;
gchar *display_name; gchar *display_name;
VADisplay display; VADisplay display;
gpointer native_display; gpointer native_display;