diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index d8579959a6..9b7dbd11b7 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -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 diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.h b/gst-libs/gst/vaapi/gstvaapidisplay.h index 319faaa17a..203c78a6f1 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.h +++ b/gst-libs/gst/vaapi/gstvaapidisplay.h @@ -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 diff --git a/gst/vaapi/gstvaapi.c b/gst/vaapi/gstvaapi.c index 9a82454406..7b0066469e 100644 --- a/gst/vaapi/gstvaapi.c +++ b/gst/vaapi/gstvaapi.c @@ -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 */ } } diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index b4a531b048..456ec8b1c5 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -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; } diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c index 159cd85947..97cfd0dcbf 100644 --- a/gst/vaapi/gstvaapiencode.c +++ b/gst/vaapi/gstvaapiencode.c @@ -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; } diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index d23b519ab9..f1359e5e20 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -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; } diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index 0babf83a31..a391978263 100644 --- a/gst/vaapi/gstvaapipluginutil.c +++ b/gst/vaapi/gstvaapipluginutil.c @@ -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 * diff --git a/tests/output.c b/tests/output.c index b15dedec77..3469fd39aa 100644 --- a/tests/output.c +++ b/tests/output.c @@ -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; diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c index 58b0e8c214..9ae63d87db 100644 --- a/tests/simple-encoder.c +++ b/tests/simple-encoder.c @@ -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); diff --git a/tests/test-decode.c b/tests/test-decode.c index 882bfd2e2b..d44ac4388e 100644 --- a/tests/test-decode.c +++ b/tests/test-decode.c @@ -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; diff --git a/tests/test-display.c b/tests/test-display.c index d81e903046..e189ab3272 100644 --- a/tests/test-display.c +++ b/tests/test-display.c @@ -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 diff --git a/tests/test-fei-enc-in.c b/tests/test-fei-enc-in.c index 2f7d698e4a..10d8de7cb3 100644 --- a/tests/test-fei-enc-in.c +++ b/tests/test-fei-enc-in.c @@ -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); diff --git a/tests/test-filter.c b/tests/test-filter.c index 6fdc8b6e95..380ca67b86 100644 --- a/tests/test-filter.c +++ b/tests/test-filter.c @@ -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); diff --git a/tests/test-subpicture.c b/tests/test-subpicture.c index b842572196..588e7a7b59 100644 --- a/tests/test-subpicture.c +++ b/tests/test-subpicture.c @@ -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; diff --git a/tests/test-surfaces.c b/tests/test-surfaces.c index b58c5cf859..2f9a90fae7 100644 --- a/tests/test-surfaces.c +++ b/tests/test-surfaces.c @@ -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 (); diff --git a/tests/test-textures.c b/tests/test-textures.c index a2d2005f46..97c82df527 100644 --- a/tests/test-textures.c +++ b/tests/test-textures.c @@ -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; } diff --git a/tests/test-windows.c b/tests/test-windows.c index aaffb03bba..28b2683a17 100644 --- a/tests/test-windows.c +++ b/tests/test-windows.c @@ -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 ();