mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
libs: window: remove custom ref() and unref()
Use gst_object_ref() and gst_object_unref() instead.
This commit is contained in:
parent
8ef95a7dc2
commit
e4ae7d9879
8 changed files with 11 additions and 44 deletions
|
@ -258,7 +258,7 @@ gst_vaapi_window_new_internal (GType type, GstVaapiDisplay * display,
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
error:
|
error:
|
||||||
{
|
{
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,33 +331,6 @@ gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height)
|
||||||
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:
|
* gst_vaapi_window_replace:
|
||||||
* @old_window_ptr: a pointer to a #GstVaapiWindow
|
* @old_window_ptr: a pointer to a #GstVaapiWindow
|
||||||
|
|
|
@ -48,12 +48,6 @@ gst_vaapi_window_get_type (void) G_GNUC_CONST;
|
||||||
GstVaapiWindow *
|
GstVaapiWindow *
|
||||||
gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height);
|
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
|
void
|
||||||
gst_vaapi_window_replace (GstVaapiWindow ** old_window_ptr,
|
gst_vaapi_window_replace (GstVaapiWindow ** old_window_ptr,
|
||||||
GstVaapiWindow * new_window);
|
GstVaapiWindow * new_window);
|
||||||
|
|
|
@ -353,7 +353,7 @@ gst_vaapi_window_glx_new (GstVaapiDisplay * display, guint width, guint height)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
error:
|
error:
|
||||||
{
|
{
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ gst_vaapi_window_glx_new_with_xid (GstVaapiDisplay * display, Window xid)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
error:
|
error:
|
||||||
{
|
{
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ main (int argc, char *argv[])
|
||||||
gst_vaapi_pixmap_unref (pixmap);
|
gst_vaapi_pixmap_unref (pixmap);
|
||||||
gst_vaapi_surface_proxy_unref (proxy);
|
gst_vaapi_surface_proxy_unref (proxy);
|
||||||
gst_object_unref (decoder);
|
gst_object_unref (decoder);
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
gst_object_unref (display);
|
gst_object_unref (display);
|
||||||
gst_object_unref (display2);
|
gst_object_unref (display2);
|
||||||
g_free (g_codec_str);
|
g_free (g_codec_str);
|
||||||
|
|
|
@ -443,7 +443,7 @@ main (int argc, char *argv[])
|
||||||
gst_object_unref (filter);
|
gst_object_unref (filter);
|
||||||
gst_vaapi_object_unref (dst_surface);
|
gst_vaapi_object_unref (dst_surface);
|
||||||
gst_vaapi_object_unref (src_surface);
|
gst_vaapi_object_unref (src_surface);
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
gst_object_unref (display);
|
gst_object_unref (display);
|
||||||
video_output_exit ();
|
video_output_exit ();
|
||||||
g_free (g_src_format_str);
|
g_free (g_src_format_str);
|
||||||
|
|
|
@ -164,7 +164,7 @@ main (int argc, char *argv[])
|
||||||
gst_video_overlay_composition_unref (compo);
|
gst_video_overlay_composition_unref (compo);
|
||||||
gst_vaapi_surface_proxy_unref (proxy);
|
gst_vaapi_surface_proxy_unref (proxy);
|
||||||
gst_object_unref (decoder);
|
gst_object_unref (decoder);
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
gst_object_unref (display);
|
gst_object_unref (display);
|
||||||
g_free (g_codec_str);
|
g_free (g_codec_str);
|
||||||
video_output_exit ();
|
video_output_exit ();
|
||||||
|
|
|
@ -172,7 +172,7 @@ main (int argc, char *argv[])
|
||||||
gst_vaapi_texture_unref (textures[1]);
|
gst_vaapi_texture_unref (textures[1]);
|
||||||
glDeleteTextures (1, &texture_id);
|
glDeleteTextures (1, &texture_id);
|
||||||
|
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
gst_object_unref (display);
|
gst_object_unref (display);
|
||||||
gst_deinit ();
|
gst_deinit ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -131,7 +131,7 @@ main (int argc, char *argv[])
|
||||||
g_error ("could not render surface");
|
g_error ("could not render surface");
|
||||||
|
|
||||||
pause ();
|
pause ();
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_vaapi_object_unref (surface);
|
gst_vaapi_object_unref (surface);
|
||||||
|
@ -161,7 +161,7 @@ main (int argc, char *argv[])
|
||||||
g_error ("could not render surface");
|
g_error ("could not render surface");
|
||||||
|
|
||||||
pause ();
|
pause ();
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_print ("#\n");
|
g_print ("#\n");
|
||||||
|
@ -194,7 +194,7 @@ main (int argc, char *argv[])
|
||||||
g_error ("could not render surface");
|
g_error ("could not render surface");
|
||||||
|
|
||||||
pause ();
|
pause ();
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
XUnmapWindow (dpy, win);
|
XUnmapWindow (dpy, win);
|
||||||
XDestroyWindow (dpy, win);
|
XDestroyWindow (dpy, win);
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ main (int argc, char *argv[])
|
||||||
g_error ("could not render surface");
|
g_error ("could not render surface");
|
||||||
|
|
||||||
pause ();
|
pause ();
|
||||||
gst_vaapi_window_unref (window);
|
gst_object_unref (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_vaapi_object_unref (surface);
|
gst_vaapi_object_unref (surface);
|
||||||
|
|
Loading…
Reference in a new issue