chromium/third_party/ffmpeg/libavutil/fifo.c

/*
 * a very simple circular buffer FIFO implementation
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
 * Copyright (c) 2006 Roman Shaposhnik
 *
 * 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 <stdint.h>
#include <string.h>

#include "avassert.h"
#include "error.h"
#include "fifo.h"
#include "macros.h"
#include "mem.h"

// by default the FIFO can be auto-grown to 1MB
#define AUTO_GROW_DEFAULT_BYTES

struct AVFifo {};

AVFifo *av_fifo_alloc2(size_t nb_elems, size_t elem_size,
                       unsigned int flags)
{}

void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems)
{}

size_t av_fifo_elem_size(const AVFifo *f)
{}

size_t av_fifo_can_read(const AVFifo *f)
{}

size_t av_fifo_can_write(const AVFifo *f)
{}

int av_fifo_grow2(AVFifo *f, size_t inc)
{}

static int fifo_check_space(AVFifo *f, size_t to_write)
{}

static int fifo_write_common(AVFifo *f, const uint8_t *buf, size_t *nb_elems,
                             AVFifoCB read_cb, void *opaque)
{}

int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
{}

int av_fifo_write_from_cb(AVFifo *f, AVFifoCB read_cb,
                          void *opaque, size_t *nb_elems)
{}

static int fifo_peek_common(const AVFifo *f, uint8_t *buf, size_t *nb_elems,
                            size_t offset, AVFifoCB write_cb, void *opaque)
{}

int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
{}

int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb,
                       void *opaque, size_t *nb_elems)
{}

int av_fifo_peek(const AVFifo *f, void *buf, size_t nb_elems, size_t offset)
{}

int av_fifo_peek_to_cb(const AVFifo *f, AVFifoCB write_cb, void *opaque,
                       size_t *nb_elems, size_t offset)
{}

void av_fifo_drain2(AVFifo *f, size_t size)
{}

void av_fifo_reset2(AVFifo *f)
{}

void av_fifo_freep2(AVFifo **f)
{}