diff options
author | Julien Isorce <j.isorce@samsung.com> | 2016-10-19 15:01:04 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2017-02-02 20:33:36 +0100 |
commit | 69a2406a20335ce045c4c67a9ff98e2c96d143c9 (patch) | |
tree | 89ac9c7851a83b7d9146b7659949e31a4347e0d6 /gst-libs/gst | |
parent | fbed3c3366da9a544069d2d472949d5f31b63e5d (diff) |
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
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapibufferproxy.c | 19 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapibufferproxy.h | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.c b/gst-libs/gst/vaapi/gstvaapibufferproxy.c index a9b34858..75cbe929 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.c +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.c @@ -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; + } +} diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.h b/gst-libs/gst/vaapi/gstvaapibufferproxy.h index a70d33f4..7d611cf3 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.h +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.h @@ -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 */ |