diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index d29e817c69..e4f1c586ad 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -333,7 +333,8 @@ gst_vaapi_plugin_base_ensure_display (GstVaapiPluginBase * plugin) return TRUE; gst_vaapi_display_replace (&plugin->display, NULL); - if (!gst_vaapi_ensure_display (plugin, plugin->display_type_req)) + if (!gst_vaapi_ensure_display (GST_ELEMENT (plugin), + plugin->display_type_req)) return FALSE; plugin->display_type = gst_vaapi_display_get_display_type (plugin->display); diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index cb490601b9..64bc3ba2fb 100644 --- a/gst/vaapi/gstvaapipluginutil.c +++ b/gst/vaapi/gstvaapipluginutil.c @@ -247,18 +247,14 @@ gst_vaapi_create_display_from_gl_context (GstObject * gl_context_object) } gboolean -gst_vaapi_ensure_display (gpointer element, GstVaapiDisplayType type) +gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type) { GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (element); GstVaapiDisplay *display; - GstVideoContext *context; - g_return_val_if_fail (GST_IS_VIDEO_CONTEXT (element), FALSE); + g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); - context = GST_VIDEO_CONTEXT (element); - g_return_val_if_fail (context != NULL, FALSE); - - gst_vaapi_video_context_prepare (context, display_types); + gst_vaapi_video_context_prepare (element, display_types); /* Neighbour found and it updated the display */ if (gst_vaapi_plugin_base_has_display_type (plugin, type)) @@ -272,7 +268,7 @@ gst_vaapi_ensure_display (gpointer element, GstVaapiDisplayType type) if (!display) return FALSE; - gst_vaapi_video_context_propagate (context, display); + gst_vaapi_video_context_propagate (element, display); GST_VAAPI_PLUGIN_BASE_DISPLAY_REPLACE (plugin, display); gst_vaapi_display_unref (display); return TRUE; diff --git a/gst/vaapi/gstvaapipluginutil.h b/gst/vaapi/gstvaapipluginutil.h index 0209d08d91..5b437c7678 100644 --- a/gst/vaapi/gstvaapipluginutil.h +++ b/gst/vaapi/gstvaapipluginutil.h @@ -31,7 +31,7 @@ G_GNUC_INTERNAL gboolean -gst_vaapi_ensure_display (gpointer element, GstVaapiDisplayType type); +gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type); G_GNUC_INTERNAL gboolean diff --git a/gst/vaapi/gstvaapivideocontext.h b/gst/vaapi/gstvaapivideocontext.h index 0c8797edb7..1f052be8bc 100644 --- a/gst/vaapi/gstvaapivideocontext.h +++ b/gst/vaapi/gstvaapivideocontext.h @@ -31,12 +31,6 @@ #define GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME "gst.vaapi.Display" -/* Fake GstVideoContext symbols */ -#define GST_VIDEO_CONTEXT(obj) (GST_ELEMENT (obj)) -#define GST_IS_VIDEO_CONTEXT(obj) (GST_IS_ELEMENT (obj)) -#define GstVideoContext GstElement -#define gst_video_context_prepare gst_vaapi_video_context_prepare - G_GNUC_INTERNAL GstContext * gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,