libs: bufferproxy: add gst_vaapi_buffer_proxy_release_data()

Adds an API to request the user's data release in the buffer proxy.

https://bugzilla.gnome.org/show_bug.cgi?id=755072
This commit is contained in:
Julien Isorce 2016-10-19 15:01:04 +01:00 committed by Víctor Manuel Jáquez Leal
parent fbed3c3366
commit 69a2406a20
2 changed files with 22 additions and 0 deletions

View file

@ -336,3 +336,22 @@ gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy)
return 0;
#endif
}
/**
* gst_vaapi_buffer_proxy_release_data:
* @proxy: a #GstVaapiBufferProxy
*
* Notifies the user to destroy the user's data, though the @proxy is
* not going to be destroyed.
**/
void
gst_vaapi_buffer_proxy_release_data (GstVaapiBufferProxy * proxy)
{
g_return_if_fail (proxy != NULL);
if (proxy->destroy_func) {
proxy->destroy_func (proxy->destroy_data);
proxy->destroy_func = NULL;
proxy->destroy_data = NULL;
}
}

View file

@ -92,6 +92,9 @@ gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy);
gsize
gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy);
void
gst_vaapi_buffer_proxy_release_data (GstVaapiBufferProxy * proxy);
G_END_DECLS
#endif /* GST_VAAPI_BUFFER_PROXY_H */