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

API example for decoding and filtering. More...

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   600 /* for usleep */
 

Functions

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

Variables

const char * filter_descr = "scale=78:24,transpose=cclock"
 
static AVFormatContextfmt_ctx
 
static AVCodecContextdec_ctx
 
AVFilterContextbuffersink_ctx
 
AVFilterContextbuffersrc_ctx
 
AVFilterGraphfilter_graph
 
static int video_stream_index = -1
 
static int64_t last_pts = AV_NOPTS_VALUE
 

Detailed Description

API example for decoding and filtering.

Definition in file filtering_video.c.

Macro Definition Documentation

#define _XOPEN_SOURCE   600 /* for usleep */

Definition at line 30 of file filtering_video.c.

Function Documentation

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

Definition at line 54 of file filtering_video.c.

Referenced by main().

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

Definition at line 92 of file filtering_video.c.

Referenced by main().

static void display_frame ( const AVFrame frame,
AVRational  time_base 
)
static
Examples:
filtering_video.c.

Definition at line 179 of file filtering_video.c.

Referenced by main().

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

Definition at line 210 of file filtering_video.c.

Variable Documentation

const char* filter_descr = "scale=78:24,transpose=cclock"
Examples:
filtering_audio.c, and filtering_video.c.

Definition at line 41 of file filtering_video.c.

Referenced by main().

AVFormatContext* fmt_ctx
static
Examples:
filtering_video.c.

Definition at line 46 of file filtering_video.c.

AVCodecContext* dec_ctx
static
Examples:
filtering_video.c.

Definition at line 47 of file filtering_video.c.

AVFilterContext* buffersink_ctx
Examples:
filtering_video.c.

Definition at line 48 of file filtering_video.c.

Referenced by init_filters().

AVFilterContext* buffersrc_ctx
Examples:
filtering_video.c.

Definition at line 49 of file filtering_video.c.

Referenced by init_filters().

AVFilterGraph* filter_graph
Examples:
filtering_video.c.

Definition at line 50 of file filtering_video.c.

int video_stream_index = -1
static
Examples:
filtering_video.c.

Definition at line 51 of file filtering_video.c.

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

int64_t last_pts = AV_NOPTS_VALUE
static
Examples:
filtering_video.c.

Definition at line 52 of file filtering_video.c.

Referenced by display_frame(), find_and_decode_index(), and write_index().