FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
filtering_audio.c File Reference

API example for audio decoding and filtering. More...

#include <unistd.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfiltergraph.h>
#include <libavfilter/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.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_samplesref (AVFilterBufferRef *samplesref)
 
int main (int argc, char **argv)
 

Variables

const char * filter_descr = "aresample=8000,aconvert=s16:mono"
 
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
 

Detailed Description

API example for audio decoding and filtering.

Definition in file filtering_audio.c.

Function Documentation

static int open_input_file ( const char *  filename)
static
Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 50 of file filtering_audio.c.

Referenced by main().

static int init_filters ( const char *  filters_descr)
static
Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 83 of file filtering_audio.c.

Referenced by main().

static void print_samplesref ( AVFilterBufferRef samplesref)
static
Examples:
doc/examples/filtering_audio.c.

Definition at line 153 of file filtering_audio.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 168 of file filtering_audio.c.

Variable Documentation

const char* filter_descr = "aresample=8000,aconvert=s16:mono"
Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 40 of file filtering_audio.c.

Referenced by main().

const char* player = "ffplay -f s16le -ar 8000 -ac 1 -"
Examples:
doc/examples/filtering_audio.c.

Definition at line 41 of file filtering_audio.c.

Referenced by main().

AVFormatContext* fmt_ctx
static

Definition at line 43 of file filtering_audio.c.

AVCodecContext* dec_ctx
static
AVFilterContext* buffersink_ctx
Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 45 of file filtering_audio.c.

Referenced by init_filters().

AVFilterContext* buffersrc_ctx
Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 46 of file filtering_audio.c.

Referenced by init_filters().

AVFilterGraph* filter_graph
int audio_stream_index = -1
static
Examples:
doc/examples/filtering_audio.c.

Definition at line 48 of file filtering_audio.c.

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