Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2018-09-28 20:27:07 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-09-28 20:30:03 +0300
commitf53749e12241e6d61d9d2bd51666302c59962fc9 (patch)
tree21862cf534c2639c45c82c9e7f6426416cba379e /include
parentf4e88f25f56f5c3ae6650d4c42afc265428f0459 (diff)
Wrappable data structure
Diffstat (limited to 'include')
-rw-r--r--include/dav1d/data.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dav1d/data.h b/include/dav1d/data.h
index 9a351ea..cbfa4c7 100644
--- a/include/dav1d/data.h
+++ b/include/dav1d/data.h
@@ -45,6 +45,18 @@ typedef struct Dav1dData {
DAV1D_API int dav1d_data_create(Dav1dData *data, size_t sz);
/**
+ * Wrap an existing data packet.
+ * $ptr/$sz are the pointer and size of the data to be wrapped.
+ * $free_callback/$user_data are a function and function argument to be
+ * called when we release our last reference to this data. In this callback,
+ * $data will be the $ptr argument to this function, and $user_data will be
+ * the $user_data input argument to this function.
+ */
+DAV1D_API int dav1d_data_wrap(Dav1dData *data, uint8_t *ptr, size_t sz,
+ void (*free_callback)(uint8_t *data, void *user_data),
+ void *user_data);
+
+/**
* Free data.
*/
DAV1D_API void dav1d_data_unref(Dav1dData *buf);