21 #ifndef AVRESAMPLE_AUDIO_DATA_H
22 #define AVRESAMPLE_AUDIO_DATA_H
78 int read_only,
const char *
name);
unsigned int buffer_size
allocated buffer size
const char * name
name for debug logging
void ff_audio_data_free(AudioData **a)
Free AudioData.
Audio buffer used for intermediate storage between conversion phases.
int allow_realloc
realloc is allowed
int ff_audio_data_combine(AudioData *dst, int dst_offset, AudioData *src, int src_offset, int nb_samples)
Append data from one AudioData to the end of another.
int nb_samples
current number of samples
int ff_audio_data_set_channels(AudioData *a, int channels)
int sample_size
bytes per sample
int allocated_channels
allocated channel count
int ff_audio_data_realloc(AudioData *a, int nb_samples)
Reallocate AudioData.
int read_only
data is read-only
struct AudioData AudioData
Audio buffer used for intermediate storage between conversion phases.
void ff_audio_data_drain(AudioData *a, int nb_samples)
Drain samples from the start of the AudioData.
int stride
sample byte offset within a plane
int channels
channel count
int is_planar
sample format is planar
int ff_audio_data_copy(AudioData *out, AudioData *in)
Copy data from one AudioData to another.
uint8_t * buffer
data buffer
AudioData * ff_audio_data_alloc(int channels, int nb_samples, enum AVSampleFormat sample_fmt, const char *name)
Allocate AudioData.
int ff_audio_data_read_from_fifo(AVAudioFifo *af, AudioData *a, int nb_samples)
Read samples from an AVAudioFifo to AudioData.
#define AVRESAMPLE_MAX_CHANNELS
int ff_audio_data_add_to_fifo(AVAudioFifo *af, AudioData *a, int offset, int nb_samples)
Add samples in AudioData to an AVAudioFifo.
Describe the class of an AVClass context structure.
int samples_align
allocated samples alignment
AVSampleFormat
Audio Sample Formats.
int allocated_samples
number of samples the buffer can hold
enum AVSampleFormat sample_fmt
sample format
int ptr_align
minimum data pointer alignment
int planes
number of data planes
int ff_audio_data_init(AudioData *a, uint8_t **src, int plane_size, int channels, int nb_samples, enum AVSampleFormat sample_fmt, int read_only, const char *name)
Initialize AudioData using a given source.
uint8_t * data[AVRESAMPLE_MAX_CHANNELS]
data plane pointers