From 4e9de44ba24e1da27278b2d43a4887403dd0e17d Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 28 Sep 2017 17:35:01 +0200 Subject: [PATCH] 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 --- gst-libs/gst/vaapi/gstvaapidisplay.c | 8 ++------ gst-libs/gst/vaapi/gstvaapidisplay_priv.h | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index d8c2c58..ba5e550 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -839,7 +839,7 @@ gst_vaapi_display_create_unlocked (GstVaapiDisplay * display, GST_VAAPI_DISPLAY_GET_CLASS (display); GstVaapiDisplayInfo info = { .display = display, - .display_type = priv->display_type, + .display_type = klass->display_type, }; switch (init_type) { @@ -870,7 +870,6 @@ gst_vaapi_display_create_unlocked (GstVaapiDisplay * display, if (!klass->get_display || !klass->get_display (display, &info)) return FALSE; priv->display = info.va_display; - priv->display_type = info.display_type; priv->native_display = info.native_display; if (klass->get_size) 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); display->priv = priv; - priv->display_type = GST_VAAPI_DISPLAY_TYPE_ANY; priv->par_n = 1; priv->par_d = 1; @@ -1824,9 +1822,7 @@ get_render_mode_VADisplayAttribDirectSurface (GstVaapiDisplay * display, static gboolean get_render_mode_default (GstVaapiDisplay * display, GstVaapiRenderMode * pmode) { - GstVaapiDisplayPrivate *const priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display); - - switch (priv->display_type) { + switch (GST_VAAPI_DISPLAY_VADISPLAY_TYPE (display)) { #if USE_WAYLAND case GST_VAAPI_DISPLAY_TYPE_WAYLAND: /* wl_buffer mapped from VA surface through vaGetSurfaceBufferWl() */ diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_priv.h b/gst-libs/gst/vaapi/gstvaapidisplay_priv.h index 4d8e01e..20b2bce 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay_priv.h +++ b/gst-libs/gst/vaapi/gstvaapidisplay_priv.h @@ -94,7 +94,7 @@ typedef enum _GstVaapiDisplayInitType GstVaapiDisplayInitType; */ #undef GST_VAAPI_DISPLAY_VADISPLAY_TYPE #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: @@ -110,7 +110,6 @@ typedef enum _GstVaapiDisplayInitType GstVaapiDisplayInitType; struct _GstVaapiDisplayPrivate { GRecMutex mutex; - GstVaapiDisplayType display_type; gchar *display_name; VADisplay display; gpointer native_display; -- 2.7.4