Libav
audio_fifo.h
Go to the documentation of this file.
1 /*
2  * Audio FIFO
3  * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
27 #ifndef AVUTIL_AUDIO_FIFO_H
28 #define AVUTIL_AUDIO_FIFO_H
29 
30 #include "avutil.h"
31 #include "fifo.h"
32 #include "samplefmt.h"
33 
46 typedef struct AVAudioFifo AVAudioFifo;
47 
54 
64  int nb_samples);
65 
74 
90 int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
91 
104 int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
105 
116 
125 
133 
141 
146 #endif /* AVUTIL_AUDIO_FIFO_H */
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
Write data to an AVAudioFifo.
Definition: audio_fifo.c:113
int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples)
Reallocate an AVAudioFifo.
Definition: audio_fifo.c:97
external API header
void av_audio_fifo_free(AVAudioFifo *af)
Free an AVAudioFifo.
Definition: audio_fifo.c:45
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
Read data from an AVAudioFifo.
Definition: audio_fifo.c:139
const char data[16]
Definition: mxf.c:66
int av_audio_fifo_size(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for reading.
Definition: audio_fifo.c:186
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
Allocate an AVAudioFifo.
Definition: audio_fifo.c:60
Context for an Audio FIFO Buffer.
Definition: audio_fifo.c:34
int av_audio_fifo_space(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for writing.
Definition: audio_fifo.c:191
int nb_samples
number of samples currently in the FIFO
Definition: audio_fifo.c:37
sample_fmt
Definition: avconv_filter.c:68
int channels
number of channels
Definition: audio_fifo.c:40
a very simple circular buffer FIFO implementation
int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples)
Drain data from an AVAudioFifo.
Definition: audio_fifo.c:159
void av_audio_fifo_reset(AVAudioFifo *af)
Reset the AVAudioFifo buffer.
Definition: audio_fifo.c:176
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49