mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
libs: filter: remove custom ref() and unref()
Replacing them by gst_object_ref() and gst_object_unref() https://bugzilla.gnome.org/show_bug.cgi?id=796308
This commit is contained in:
parent
99183e0184
commit
ae46b1a91a
4 changed files with 3 additions and 42 deletions
|
@ -1204,7 +1204,7 @@ gst_vaapi_filter_new (GstVaapiDisplay * display)
|
|||
/* ERRORS */
|
||||
error:
|
||||
{
|
||||
gst_vaapi_filter_unref (filter);
|
||||
gst_object_unref (filter);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
|
@ -1214,39 +1214,6 @@ error:
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_filter_ref:
|
||||
* @filter: a #GstVaapiFilter
|
||||
*
|
||||
* Atomically increases the reference count of the given @filter by one.
|
||||
*
|
||||
* Returns: The same @filter argument
|
||||
*/
|
||||
GstVaapiFilter *
|
||||
gst_vaapi_filter_ref (GstVaapiFilter * filter)
|
||||
{
|
||||
g_return_val_if_fail (filter != NULL, NULL);
|
||||
|
||||
return
|
||||
GST_VAAPI_FILTER (gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT
|
||||
(filter)));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_filter_unref:
|
||||
* @filter: a #GstVaapiFilter
|
||||
*
|
||||
* Atomically decreases the reference count of the @filter by one. If
|
||||
* the reference count reaches zero, the filter will be free'd.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_filter_unref (GstVaapiFilter * filter)
|
||||
{
|
||||
g_return_if_fail (filter != NULL);
|
||||
|
||||
gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (filter));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_filter_replace:
|
||||
* @old_filter_ptr: a pointer to a #GstVaapiFilter
|
||||
|
|
|
@ -180,12 +180,6 @@ gst_vaapi_filter_get_type (void) G_GNUC_CONST;
|
|||
GstVaapiFilter *
|
||||
gst_vaapi_filter_new (GstVaapiDisplay * display);
|
||||
|
||||
GstVaapiFilter *
|
||||
gst_vaapi_filter_ref (GstVaapiFilter * filter);
|
||||
|
||||
void
|
||||
gst_vaapi_filter_unref (GstVaapiFilter * filter);
|
||||
|
||||
void
|
||||
gst_vaapi_filter_replace (GstVaapiFilter ** old_filter_ptr,
|
||||
GstVaapiFilter * new_filter);
|
||||
|
|
|
@ -162,7 +162,7 @@ create_surface_from_egl_image (GstVaapiDisplayEGL * display,
|
|||
goto error_convert_surface;
|
||||
|
||||
gst_vaapi_object_unref (img_surface);
|
||||
gst_vaapi_filter_unref (filter);
|
||||
gst_object_unref (filter);
|
||||
return out_surface;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -440,7 +440,7 @@ main (int argc, char *argv[])
|
|||
|
||||
pause ();
|
||||
|
||||
gst_vaapi_filter_unref (filter);
|
||||
gst_object_unref (filter);
|
||||
gst_vaapi_object_unref (dst_surface);
|
||||
gst_vaapi_object_unref (src_surface);
|
||||
gst_vaapi_window_unref (window);
|
||||
|
|
Loading…
Reference in a new issue