chromium/third_party/ffmpeg/libavutil/buffer.c

/*
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#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"

static AVBufferRef *buffer_create(AVBuffer *buf, uint8_t *data, size_t size,
                                  void (*free)(void *opaque, uint8_t *data),
                                  void *opaque, int flags)
{}

AVBufferRef *av_buffer_create(uint8_t *data, size_t size,
                              void (*free)(void *opaque, uint8_t *data),
                              void *opaque, int flags)
{}

void av_buffer_default_free(void *opaque, uint8_t *data)
{}

AVBufferRef *av_buffer_alloc(size_t size)
{}

AVBufferRef *av_buffer_allocz(size_t size)
{}

AVBufferRef *av_buffer_ref(const AVBufferRef *buf)
{}

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

void av_buffer_unref(AVBufferRef **buf)
{}

int av_buffer_is_writable(const AVBufferRef *buf)
{}

void *av_buffer_get_opaque(const AVBufferRef *buf)
{}

int av_buffer_get_ref_count(const AVBufferRef *buf)
{}

int av_buffer_make_writable(AVBufferRef **pbuf)
{}

int av_buffer_realloc(AVBufferRef **pbuf, size_t size)
{}

int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
{}

AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque,
                                   AVBufferRef* (*alloc)(void *opaque, size_t size),
                                   void (*pool_free)(void *opaque))
{}

AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t size))
{}

static void buffer_pool_flush(AVBufferPool *pool)
{}

/*
 * This function gets called when the pool has been uninited and
 * all the buffers returned to it.
 */
static void buffer_pool_free(AVBufferPool *pool)
{}

void av_buffer_pool_uninit(AVBufferPool **ppool)
{}

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

/* allocate a new buffer and override its free() callback so that
 * it is returned to the pool on free */
static AVBufferRef *pool_alloc_buffer(AVBufferPool *pool)
{}

AVBufferRef *av_buffer_pool_get(AVBufferPool *pool)
{}

void *av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref)
{}