libs: window: remove custom ref() and unref()

Use gst_object_ref() and gst_object_unref() instead.
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-12-22 18:07:35 +01:00
parent 8ef95a7dc2
commit e4ae7d9879
8 changed files with 11 additions and 44 deletions

View file

@ -258,7 +258,7 @@ gst_vaapi_window_new_internal (GType type, GstVaapiDisplay * display,
/* ERRORS */
error:
{
gst_vaapi_window_unref (window);
gst_object_unref (window);
return NULL;
}
}
@ -331,33 +331,6 @@ gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height)
height);
}
/**
* gst_vaapi_window_ref:
* @window: a #GstVaapiWindow
*
* Atomically increases the reference count of the given @window by one.
*
* Returns: The same @window argument
*/
GstVaapiWindow *
gst_vaapi_window_ref (GstVaapiWindow * window)
{
return (GstVaapiWindow *) gst_object_ref (window);
}
/**
* gst_vaapi_window_unref:
* @window: a #GstVaapiWindow
*
* Atomically decreases the reference count of the @window by one. If
* the reference count reaches zero, the window will be free'd.
*/
void
gst_vaapi_window_unref (GstVaapiWindow * window)
{
gst_object_unref (window);
}
/**
* gst_vaapi_window_replace:
* @old_window_ptr: a pointer to a #GstVaapiWindow

View file

@ -48,12 +48,6 @@ gst_vaapi_window_get_type (void) G_GNUC_CONST;
GstVaapiWindow *
gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height);
GstVaapiWindow *
gst_vaapi_window_ref (GstVaapiWindow * window);
void
gst_vaapi_window_unref (GstVaapiWindow * window);
void
gst_vaapi_window_replace (GstVaapiWindow ** old_window_ptr,
GstVaapiWindow * new_window);

View file

@ -353,7 +353,7 @@ gst_vaapi_window_glx_new (GstVaapiDisplay * display, guint width, guint height)
/* ERRORS */
error:
{
gst_vaapi_window_unref (window);
gst_object_unref (window);
return NULL;
}
}
@ -390,7 +390,7 @@ gst_vaapi_window_glx_new_with_xid (GstVaapiDisplay * display, Window xid)
/* ERRORS */
error:
{
gst_vaapi_window_unref (window);
gst_object_unref (window);
return NULL;
}
}

View file

@ -134,7 +134,7 @@ main (int argc, char *argv[])
gst_vaapi_pixmap_unref (pixmap);
gst_vaapi_surface_proxy_unref (proxy);
gst_object_unref (decoder);
gst_vaapi_window_unref (window);
gst_object_unref (window);
gst_object_unref (display);
gst_object_unref (display2);
g_free (g_codec_str);

View file

@ -443,7 +443,7 @@ main (int argc, char *argv[])
gst_object_unref (filter);
gst_vaapi_object_unref (dst_surface);
gst_vaapi_object_unref (src_surface);
gst_vaapi_window_unref (window);
gst_object_unref (window);
gst_object_unref (display);
video_output_exit ();
g_free (g_src_format_str);

View file

@ -164,7 +164,7 @@ main (int argc, char *argv[])
gst_video_overlay_composition_unref (compo);
gst_vaapi_surface_proxy_unref (proxy);
gst_object_unref (decoder);
gst_vaapi_window_unref (window);
gst_object_unref (window);
gst_object_unref (display);
g_free (g_codec_str);
video_output_exit ();

View file

@ -172,7 +172,7 @@ main (int argc, char *argv[])
gst_vaapi_texture_unref (textures[1]);
glDeleteTextures (1, &texture_id);
gst_vaapi_window_unref (window);
gst_object_unref (window);
gst_object_unref (display);
gst_deinit ();
return 0;

View file

@ -131,7 +131,7 @@ main (int argc, char *argv[])
g_error ("could not render surface");
pause ();
gst_vaapi_window_unref (window);
gst_object_unref (window);
}
gst_vaapi_object_unref (surface);
@ -161,7 +161,7 @@ main (int argc, char *argv[])
g_error ("could not render surface");
pause ();
gst_vaapi_window_unref (window);
gst_object_unref (window);
}
g_print ("#\n");
@ -194,7 +194,7 @@ main (int argc, char *argv[])
g_error ("could not render surface");
pause ();
gst_vaapi_window_unref (window);
gst_object_unref (window);
XUnmapWindow (dpy, win);
XDestroyWindow (dpy, win);
}
@ -226,7 +226,7 @@ main (int argc, char *argv[])
g_error ("could not render surface");
pause ();
gst_vaapi_window_unref (window);
gst_object_unref (window);
}
gst_vaapi_object_unref (surface);