#include <stddef.h>
#include <stdint.h>
#include "common.h"
Go to the source code of this file.
◆ dav1d_data_create()
Allocate data.
- Parameters
-
data | Input context. |
sz | Size of the data that should be allocated. |
- Returns
- Pointer to the allocated buffer on success. NULL on error.
◆ dav1d_data_unref()
Free the data reference.
- Parameters
-
◆ dav1d_data_wrap()
DAV1D_API int dav1d_data_wrap |
( |
Dav1dData * |
data, |
|
|
const uint8_t * |
buf, |
|
|
size_t |
sz, |
|
|
void(*)(const uint8_t *buf, void *user_data) |
free_callback, |
|
|
void * |
user_data |
|
) |
| |
Wrap an existing data array.
- Parameters
-
data | Input context. |
buf | The data to be wrapped. |
sz | Size of the data. |
free_callback | Function to be called when we release our last reference to this data. In this callback, $buf will be the $buf argument to this function, and $user_data will be the $user_data input argument to this function. |
user_data | Opaque parameter passed to free_callback(). |
- Returns
- 0 on success. A negative errno value on error.