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

API example for demuxing, decoding, filtering, encoding and muxing. More...

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfiltergraph.h>
#include <libavfilter/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.h>

Go to the source code of this file.

Data Structures

struct  FilteringContext
 

Functions

static int open_input_file (const char *filename)
 
static int open_output_file (const char *filename)
 
static int init_filter (FilteringContext *fctx, AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, const char *filter_spec)
 
static int init_filters (void)
 
static int encode_write_frame (AVFrame *filt_frame, unsigned int stream_index, int *got_frame)
 
static int filter_encode_write_frame (AVFrame *frame, unsigned int stream_index)
 
static int flush_encoder (unsigned int stream_index)
 
int main (int argc, char **argv)
 

Variables

static AVFormatContextifmt_ctx
 
static AVFormatContextofmt_ctx
 
static FilteringContextfilter_ctx
 

Detailed Description

API example for demuxing, decoding, filtering, encoding and muxing.

Definition in file transcoding.c.

Function Documentation

static int open_input_file ( const char *  filename)
static

Definition at line 49 of file transcoding.c.

Referenced by main().

static int open_output_file ( const char *  filename)
static

Definition at line 87 of file transcoding.c.

Referenced by main().

static int init_filter ( FilteringContext fctx,
AVCodecContext dec_ctx,
AVCodecContext enc_ctx,
const char *  filter_spec 
)
static
Examples:
transcoding.c.

Definition at line 183 of file transcoding.c.

Referenced by init_filters().

static int init_filters ( void  )
static

Definition at line 332 of file transcoding.c.

Referenced by main().

static int encode_write_frame ( AVFrame filt_frame,
unsigned int  stream_index,
int *  got_frame 
)
static
Examples:
transcoding.c.

Definition at line 362 of file transcoding.c.

Referenced by filter_encode_write_frame(), and flush_encoder().

static int filter_encode_write_frame ( AVFrame frame,
unsigned int  stream_index 
)
static
Examples:
transcoding.c.

Definition at line 398 of file transcoding.c.

Referenced by main().

static int flush_encoder ( unsigned int  stream_index)
static
Examples:
transcoding.c.

Definition at line 442 of file transcoding.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 462 of file transcoding.c.

Variable Documentation

AVFormatContext* ifmt_ctx
static
Examples:
remuxing.c, and transcoding.c.

Definition at line 40 of file transcoding.c.

Referenced by main().

AVFormatContext* ofmt_ctx
static
Examples:
remuxing.c, and transcoding.c.

Definition at line 41 of file transcoding.c.

Referenced by main().

FilteringContext* filter_ctx
static
Examples:
transcoding.c.

Definition at line 47 of file transcoding.c.

Referenced by default_filter_name(), main(), and print_digraph().