FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
audio_fifo.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include "libavutil/mem.h"
#include "libavutil/audio_fifo.c"

Go to the source code of this file.

Data Structures

struct  TestStruct
 

Macros

#define MAX_CHANNELS   32
 

Functions

static void free_data_planes (AVAudioFifo *afifo, void **output_data)
 
static void ERROR (const char *str)
 
static void print_audio_bytes (const TestStruct *test_sample, void **data_planes, int nb_samples)
 
static int read_samples_from_audio_fifo (AVAudioFifo *afifo, void ***output, int nb_samples)
 
static int write_samples_to_audio_fifo (AVAudioFifo *afifo, const TestStruct *test_sample, int nb_samples, int offset)
 
static void test_function (const TestStruct *test_sample)
 
int main (void)
 

Variables

static const uint8_t data_U8 [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
 
static const int16_t data_S16 [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
 
static const float data_FLT [] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}
 
static const TestStruct test_struct []
 

Macro Definition Documentation

#define MAX_CHANNELS   32

Definition at line 25 of file audio_fifo.c.

Referenced by write_samples_to_audio_fifo().

Function Documentation

static void free_data_planes ( AVAudioFifo afifo,
void **  output_data 
)
static

Definition at line 48 of file audio_fifo.c.

Referenced by read_samples_from_audio_fifo(), and test_function().

static void ERROR ( const char *  str)
static

Definition at line 57 of file audio_fifo.c.

Referenced by main(), read_samples_from_audio_fifo(), and test_function().

static void print_audio_bytes ( const TestStruct test_sample,
void **  data_planes,
int  nb_samples 
)
static

Definition at line 63 of file audio_fifo.c.

Referenced by test_function().

static int read_samples_from_audio_fifo ( AVAudioFifo afifo,
void ***  output,
int  nb_samples 
)
static

Definition at line 83 of file audio_fifo.c.

Referenced by test_function().

static int write_samples_to_audio_fifo ( AVAudioFifo afifo,
const TestStruct test_sample,
int  nb_samples,
int  offset 
)
static

Definition at line 105 of file audio_fifo.c.

Referenced by test_function().

static void test_function ( const TestStruct test_sample)
static

Definition at line 126 of file audio_fifo.c.

Referenced by main().

int main ( void  )

Definition at line 191 of file audio_fifo.c.

Variable Documentation

const uint8_t data_U8[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
static

Definition at line 35 of file audio_fifo.c.

const int16_t data_S16[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
static

Definition at line 36 of file audio_fifo.c.

const float data_FLT[] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}
static

Definition at line 37 of file audio_fifo.c.

const TestStruct test_struct[]
static
Initial value:
= {
{.format = AV_SAMPLE_FMT_U8 , .nb_ch = 1, .data_planes = {data_U8 , }, .nb_samples_pch = 12},
{.format = AV_SAMPLE_FMT_U8P , .nb_ch = 2, .data_planes = {data_U8 , data_U8 +6, }, .nb_samples_pch = 6 },
{.format = AV_SAMPLE_FMT_S16 , .nb_ch = 1, .data_planes = {data_S16, }, .nb_samples_pch = 12},
{.format = AV_SAMPLE_FMT_S16P , .nb_ch = 2, .data_planes = {data_S16, data_S16+6, }, .nb_samples_pch = 6 },
{.format = AV_SAMPLE_FMT_FLT , .nb_ch = 1, .data_planes = {data_FLT, }, .nb_samples_pch = 12},
{.format = AV_SAMPLE_FMT_FLTP , .nb_ch = 2, .data_planes = {data_FLT, data_FLT+6, }, .nb_samples_pch = 6 }
}
float, planar
Definition: samplefmt.h:69
AV_SAMPLE_FMT_U8
unsigned 8 bits, planar
Definition: samplefmt.h:66
static const uint8_t data_U8[]
Definition: audio_fifo.c:35
static const float data_FLT[]
Definition: audio_fifo.c:37
signed 16 bits
Definition: samplefmt.h:61
signed 16 bits, planar
Definition: samplefmt.h:67
static const int16_t data_S16[]
Definition: audio_fifo.c:36

Definition at line 39 of file audio_fifo.c.

Referenced by main().