FFmpeg
Functions
buffer.c File Reference
#include <stdatomic.h>
#include <stdint.h>
#include <string.h>
#include "avassert.h"
#include "buffer_internal.h"
#include "common.h"
#include "mem.h"
#include "thread.h"

Go to the source code of this file.

Functions

static AVBufferRefbuffer_create (AVBuffer *buf, uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
 
AVBufferRefav_buffer_create (uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
  Create an AVBuffer from an existing array. More...
 
void  av_buffer_default_free (void *opaque, uint8_t *data)
  Default free callback, which calls av_free() on the buffer data. More...
 
  Allocate an AVBuffer of the given size using av_malloc(). More...
 
  Same as av_buffer_alloc(), except the returned buffer will be initialized to zero. More...
 
  Create a new reference to an AVBuffer. More...
 
 
  Free a given reference and automatically free the buffer if there are no more references to it. More...
 
 
void *  av_buffer_get_opaque (const AVBufferRef *buf)
 
 
  Create a writable reference from a given buffer reference, avoiding data copy if possible. More...
 
int  av_buffer_realloc (AVBufferRef **pbuf, size_t size)
  Reallocate a given buffer. More...
 
  Ensure dst refers to the same data as src. More...
 
AVBufferPoolav_buffer_pool_init2 (size_t size, void *opaque, AVBufferRef *(*alloc)(void *opaque, size_t size), void(*pool_free)(void *opaque))
  Allocate and initialize a buffer pool with a more complex allocator. More...
 
AVBufferPoolav_buffer_pool_init (size_t size, AVBufferRef *(*alloc)(size_t size))
  Allocate and initialize a buffer pool. More...
 
static void  buffer_pool_flush (AVBufferPool *pool)
 
static void  buffer_pool_free (AVBufferPool *pool)
 
  Mark the pool as being available for freeing. More...
 
static void  pool_release_buffer (void *opaque, uint8_t *data)
 
 
  Allocate a new AVBuffer, reusing an old buffer from the pool when available. More...
 
  Query the original opaque parameter of an allocated buffer in the pool. More...
 

Function Documentation

buffer_create()

static AVBufferRef* buffer_create ( AVBufferbuf,
uint8_t *  data,
size_t  size,
void(*)(void *opaque, uint8_t *datafree,
void *  opaque,
int  flags 
)
static

Definition at line 29 of file buffer.c.

Referenced by av_buffer_create(), and av_buffer_pool_get().

buffer_replace()

static void buffer_replace ( AVBufferRef **  dst,
AVBufferRef **  src 
)
static

Definition at line 117 of file buffer.c.

Referenced by av_buffer_make_writable(), av_buffer_realloc(), and av_buffer_unref().

buffer_pool_flush()

static void buffer_pool_flush ( AVBufferPoolpool )
static

Definition at line 302 of file buffer.c.

Referenced by av_buffer_pool_uninit(), and buffer_pool_free().

buffer_pool_free()

static void buffer_pool_free ( AVBufferPoolpool )
static

Definition at line 317 of file buffer.c.

Referenced by av_buffer_pool_uninit(), and pool_release_buffer().

pool_release_buffer()

static void pool_release_buffer ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 345 of file buffer.c.

Referenced by av_buffer_pool_get(), and pool_alloc_buffer().

pool_alloc_buffer()

static AVBufferRef* pool_alloc_buffer ( AVBufferPoolpool )
static

Definition at line 361 of file buffer.c.

Referenced by av_buffer_pool_get().


Generated on Fri Aug 22 2025 14:00:13 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /