FFmpeg
Macros | Functions
api-flac-test.c File Reference
#include "libavcodec/avcodec.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/samplefmt.h"

Go to the source code of this file.

Macros

#define NUMBER_OF_AUDIO_FRAMES   200
 
#define NAME_BUFF_SIZE   100
 

Functions

static int generate_raw_frame (uint16_t *frame_data, int i, int sample_rate, int channels, int frame_size)
 
static int init_encoder (const AVCodec *enc, AVCodecContext **enc_ctx, const AVChannelLayout *ch_layout, int sample_rate)
 
static int init_decoder (const AVCodec *dec, AVCodecContext **dec_ctx, const AVChannelLayout *ch_layout)
 
static int run_test (const AVCodec *enc, const AVCodec *dec, AVCodecContext *enc_ctx, AVCodecContext *dec_ctx)
 
int main (void)
 

Macro Definition Documentation

◆ NUMBER_OF_AUDIO_FRAMES

#define NUMBER_OF_AUDIO_FRAMES   200

Definition at line 36 of file api-flac-test.c.

◆ NAME_BUFF_SIZE

#define NAME_BUFF_SIZE   100

Definition at line 37 of file api-flac-test.c.

Function Documentation

◆ generate_raw_frame()

static int generate_raw_frame ( uint16_t *  frame_data,
int  i,
int  sample_rate,
int  channels,
int  frame_size 
)
static

Definition at line 40 of file api-flac-test.c.

Referenced by run_test().

◆ init_encoder()

static int init_encoder ( const AVCodec enc,
AVCodecContext **  enc_ctx,
const AVChannelLayout ch_layout,
int  sample_rate 
)
static

Definition at line 53 of file api-flac-test.c.

Referenced by main().

◆ init_decoder()

static int init_decoder ( const AVCodec dec,
AVCodecContext **  dec_ctx,
const AVChannelLayout ch_layout 
)
static

Definition at line 83 of file api-flac-test.c.

Referenced by main().

◆ run_test()

static int run_test ( const AVCodec enc,
const AVCodec dec,
AVCodecContext enc_ctx,
AVCodecContext dec_ctx 
)
static

Definition at line 108 of file api-flac-test.c.

Referenced by main().

◆ main()

int main ( void  )

Definition at line 247 of file api-flac-test.c.