FFmpeg
Functions | Variables
decode_filter_audio.c File Reference
#include <unistd.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/channel_layout.h>
#include <libavutil/opt.h>

Go to the source code of this file.

Functions

static int open_input_file (const char *filename)
 
static int init_filters (const char *filters_descr)
 
static void print_frame (const AVFrame *frame)
 
int main (int argc, char **argv)
 

Variables

static const char * filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"
 
static const char * player = "ffplay -f s16le -ar 8000 -ac 1 -"
 
static AVFormatContextfmt_ctx
 
static AVCodecContextdec_ctx
 
AVFilterContextbuffersink_ctx
 
AVFilterContextbuffersrc_ctx
 
AVFilterGraphfilter_graph
 
static int audio_stream_index = -1
 

Function Documentation

◆ open_input_file()

static int open_input_file ( const char *  filename)
static
Examples
decode_filter_audio.c.

Definition at line 52 of file decode_filter_audio.c.

Referenced by main().

◆ init_filters()

static int init_filters ( const char *  filters_descr)
static
Examples
decode_filter_audio.c.

Definition at line 90 of file decode_filter_audio.c.

Referenced by main().

◆ print_frame()

static void print_frame ( const AVFrame frame)
static
Examples
decode_filter_audio.c.

Definition at line 203 of file decode_filter_audio.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)
Examples
decode_filter_audio.c.

Definition at line 217 of file decode_filter_audio.c.

Variable Documentation

◆ filter_descr

const char* filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"
static

Definition at line 42 of file decode_filter_audio.c.

Referenced by main().

◆ player

const char* player = "ffplay -f s16le -ar 8000 -ac 1 -"
static
Examples
decode_filter_audio.c.

Definition at line 43 of file decode_filter_audio.c.

Referenced by main().

◆ fmt_ctx

AVFormatContext* fmt_ctx
static

◆ dec_ctx

AVCodecContext* dec_ctx
static

◆ buffersink_ctx

AVFilterContext* buffersink_ctx
Examples
decode_filter_audio.c, and transcode.c.

Definition at line 47 of file decode_filter_audio.c.

Referenced by init_filter(), init_filters(), and main().

◆ buffersrc_ctx

AVFilterContext* buffersrc_ctx
Examples
decode_filter_audio.c, and transcode.c.

Definition at line 48 of file decode_filter_audio.c.

Referenced by init_filter(), init_filters(), and main().

◆ filter_graph

AVFilterGraph* filter_graph

◆ audio_stream_index

int audio_stream_index = -1
static
Examples
decode_filter_audio.c.

Definition at line 50 of file decode_filter_audio.c.

Referenced by init_filters(), main(), and open_input_file().