libs: display: remove gst_vaapi_display_unref()

Use gst_object_unref() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=796470
parent b1d8c689
......@@ -1208,19 +1208,6 @@ gst_vaapi_display_ref (GstVaapiDisplay * display)
return gst_object_ref (display);
}
/**
* gst_vaapi_display_unref:
* @display: a #GstVaapiDisplay
*
* Atomically decreases the reference count of the @display by one. If
* the reference count reaches zero, the display will be free'd.
*/
void
gst_vaapi_display_unref (GstVaapiDisplay * display)
{
gst_object_unref (display);
}
/**
* gst_vaapi_display_replace:
* @old_display_ptr: a pointer to a #GstVaapiDisplay
......
......@@ -154,9 +154,6 @@ gst_vaapi_display_new_with_display (VADisplay va_display);
GstVaapiDisplay *
gst_vaapi_display_ref (GstVaapiDisplay * display);
void
gst_vaapi_display_unref (GstVaapiDisplay * display);
void
gst_vaapi_display_replace (GstVaapiDisplay ** old_display_ptr,
GstVaapiDisplay * new_display);
......@@ -258,7 +255,7 @@ void
gst_vaapi_display_reset_texture_map (GstVaapiDisplay * display);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplay, gst_vaapi_display_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplay, gst_object_unref)
#endif
G_END_DECLS
......
......@@ -244,7 +244,7 @@ plugin_init (GstPlugin * plugin)
gst_vaapiencode_register (plugin, display);
#endif
gst_vaapi_display_unref (display);
gst_object_unref (display);
return TRUE;
......@@ -258,7 +258,7 @@ error_no_display:
}
unsupported_driver:
{
gst_vaapi_display_unref (display);
gst_object_unref (display);
return TRUE; /* return TRUE to avoid get blacklisted */
}
}
......
......@@ -1085,7 +1085,7 @@ gst_vaapidecode_start (GstVideoDecoder * vdec)
success =
gst_vaapi_plugin_base_ensure_display (GST_VAAPI_PLUGIN_BASE (decode));
if (old_display)
gst_vaapi_display_unref (old_display);
gst_object_unref (old_display);
return success;
}
......
......@@ -530,7 +530,7 @@ gst_vaapiencode_open (GstVideoEncoder * venc)
GST_VAAPI_PLUGIN_BASE_DISPLAY (encode) = NULL;
success = ensure_display (encode);
if (old_display)
gst_vaapi_display_unref (old_display);
gst_object_unref (old_display);
return success;
}
......
......@@ -57,7 +57,7 @@ plugin_set_display (GstVaapiPluginBase * plugin, GstVaapiDisplay * display)
plugin->display_type = gst_vaapi_display_get_display_type (display);
gst_vaapi_plugin_base_set_display_name (plugin, display_name);
}
gst_vaapi_display_unref (display);
gst_object_unref (display);
}
/**
......@@ -1313,7 +1313,7 @@ bail:
g_array_unref (out_formats);
if (surface)
gst_vaapi_object_unref (surface);
gst_vaapi_display_unref (display);
gst_object_unref (display);
return ret;
}
......
......@@ -260,7 +260,7 @@ gst_vaapi_create_display_from_egl (GstGLDisplay * gl_display,
gst_vaapi_create_display_from_handle (display_type, native_display);
if (wrapped_display) {
display = gst_vaapi_display_egl_new (wrapped_display, gles_version);
gst_vaapi_display_unref (wrapped_display);
gst_object_unref (wrapped_display);
}
}
......@@ -397,7 +397,7 @@ gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type)
return FALSE;
gst_vaapi_video_context_propagate (element, display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
return TRUE;
}
......@@ -887,7 +887,7 @@ gst_video_info_force_nv12_if_encoded (GstVideoInfo * vinfo)
* supported features.
*
* Returns: a new #GstVaapiDisplay instances. Free with
* gst_vaapi_display_unref () after use. Or %NULL if no VA display is
* gst_object_unref () after use. Or %NULL if no VA display is
* available.
**/
GstVaapiDisplay *
......
......@@ -182,7 +182,7 @@ video_output_create_display (const gchar * display_name)
if (display) {
if (gst_vaapi_display_get_display (display))
break;
gst_vaapi_display_unref (display);
gst_object_unref (display);
display = NULL;
}
}
......@@ -203,7 +203,7 @@ video_output_create_display (const gchar * display_name)
egl_display = NULL;
g_print ("error: unsupported EGL renderering mode\n");
#endif
gst_vaapi_display_unref (display);
gst_object_unref (display);
if (!egl_display)
return NULL;
display = egl_display;
......
......@@ -302,7 +302,7 @@ app_free (App * app)
}
if (app->display)
gst_vaapi_display_unref (app->display);
gst_object_unref (app->display);
if (app->output_file)
fclose (app->output_file);
......
......@@ -136,8 +136,8 @@ main (int argc, char *argv[])
gst_vaapi_surface_proxy_unref (proxy);
gst_vaapi_decoder_unref (decoder);
gst_vaapi_window_unref (window);
gst_vaapi_display_unref (display);
gst_vaapi_display_unref (display2);
gst_object_unref (display);
gst_object_unref (display2);
g_free (g_codec_str);
video_output_exit ();
return 0;
......
......@@ -222,7 +222,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
}
g_print ("\n");
......@@ -241,7 +241,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
close (drm_device);
}
g_print ("\n");
......@@ -267,7 +267,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
close (drm_device);
}
g_print ("\n");
......@@ -299,7 +299,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
......@@ -325,7 +325,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
......@@ -347,7 +347,7 @@ main (int argc, char *argv[])
g_print ("Pixel aspect ratio: %u/%u\n", par_n, par_d);
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
}
g_print ("\n");
......@@ -366,7 +366,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
......@@ -393,7 +393,7 @@ main (int argc, char *argv[])
g_error ("could not create Gst/VA display");
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
......@@ -416,7 +416,7 @@ main (int argc, char *argv[])
g_print ("Pixel aspect ratio: %u/%u\n", par_n, par_d);
dump_info (display);
gst_vaapi_display_unref (display);
gst_object_unref (display);
}
g_print ("\n");
#endif
......
......@@ -346,7 +346,7 @@ app_free (App * app)
}
if (app->display)
gst_vaapi_display_unref (app->display);
gst_object_unref (app->display);
if (app->output_file)
fclose (app->output_file);
......
......@@ -444,7 +444,7 @@ main (int argc, char *argv[])
gst_vaapi_object_unref (dst_surface);
gst_vaapi_object_unref (src_surface);
gst_vaapi_window_unref (window);
gst_vaapi_display_unref (display);
gst_object_unref (display);
video_output_exit ();
g_free (g_src_format_str);
g_free (g_crop_rect_str);
......
......@@ -166,7 +166,7 @@ main (int argc, char *argv[])
gst_vaapi_surface_proxy_unref (proxy);
gst_vaapi_decoder_unref (decoder);
gst_vaapi_window_unref (window);
gst_vaapi_display_unref (display);
gst_object_unref (display);
g_free (g_codec_str);
video_output_exit ();
return 0;
......
......@@ -98,7 +98,7 @@ main (int argc, char *argv[])
}
/* Unref in random order to check objects are correctly refcounted */
gst_vaapi_display_unref (display);
gst_object_unref (display);
gst_vaapi_video_pool_unref (pool);
gst_vaapi_object_unref (surface);
video_output_exit ();
......
......@@ -173,7 +173,7 @@ main (int argc, char *argv[])
glDeleteTextures (1, &texture_id);
gst_vaapi_window_unref (window);
gst_vaapi_display_unref (display);
gst_object_unref (display);
gst_deinit ();
return 0;
}
......@@ -135,7 +135,7 @@ main (int argc, char *argv[])
}
gst_vaapi_object_unref (surface);
gst_vaapi_display_unref (display);
gst_object_unref (display);
#endif
#if USE_X11
......@@ -200,7 +200,7 @@ main (int argc, char *argv[])
}
gst_vaapi_object_unref (surface);
gst_vaapi_display_unref (display);
gst_object_unref (display);
#endif
#if USE_WAYLAND
......@@ -230,7 +230,7 @@ main (int argc, char *argv[])
}
gst_vaapi_object_unref (surface);
gst_vaapi_display_unref (display);
gst_object_unref (display);
#endif
gst_deinit ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment