Loading...
Searching...
No Matches
transcode.c File Reference
`#include <libavcodec/avcodec.h>`
`#include <libavformat/avformat.h>`
`#include <libavfilter/buffersink.h>`
`#include <libavfilter/buffersrc.h>`
`#include <libavutil/channel_layout.h>`
`#include <libavutil/mem.h>`
`#include <libavutil/opt.h>`
`#include <libavutil/pixdesc.h>`

Go to the source code of this file.

## Data Structures

struct | FilteringContext
struct | StreamContext

## 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 (unsigned int stream_index, int flush)
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 AVFormatContext * | ifmt_ctx
static AVFormatContext * | ofmt_ctx
static FilteringContext * | filter_ctx
static StreamContext * | stream_ctx

## Function Documentation

## open_input_file()

static int open_input_file | ( | const char * | filename | ) |

static

Definition at line 62 of file transcode.c.

## open_output_file()

static int open_output_file | ( | const char * | filename | ) |

static

Definition at line 129 of file transcode.c.

## init_filter()

static int init_filter | ( | FilteringContext * | fctx,
|  | AVCodecContext * | dec_ctx,
|  | AVCodecContext * | enc_ctx,
|  | const char * | filter_spec
| ) |  |

static

Examples
  transcode.c.

Definition at line 245 of file transcode.c.

Referenced by init_filters().

## init_filters()

static int init_filters | ( | void |  | ) |

static

Examples
  decode_filter_audio.c, decode_filter_video.c, and transcode.c.

Definition at line 395 of file transcode.c.

Referenced by main().

## encode_write_frame()

static int encode_write_frame | ( | unsigned int | stream_index,
|  | int | flush
| ) |  |

static

Examples
  transcode.c.

Definition at line 433 of file transcode.c.

Referenced by filter_encode_write_frame(), and flush_encoder().

## filter_encode_write_frame()

static int filter_encode_write_frame | ( | AVFrame * | frame,
|  | unsigned int | stream_index
| ) |  |

static

Examples
  transcode.c.

Definition at line 474 of file transcode.c.

Referenced by main().

## flush_encoder()

static int flush_encoder | ( | unsigned int | stream_index | ) |

static

Examples
  transcode.c.

Definition at line 514 of file transcode.c.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 524 of file transcode.c.

## Variable Documentation

## ifmt_ctx

AVFormatContext* ifmt_ctx

static

Examples
  qsv_transcode.c, remux.c, transcode.c, and vaapi_transcode.c.

Definition at line 42 of file transcode.c.

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

## ofmt_ctx

AVFormatContext* ofmt_ctx

static

Examples
  qsv_transcode.c, remux.c, transcode.c, and vaapi_transcode.c.

Definition at line 43 of file transcode.c.

Referenced by dec_enc(), dec_enc(), encode_write(), encode_write(), encode_write_frame(), main(), and open_output_file().

## filter_ctx

FilteringContext* filter_ctx

static

Examples
  transcode.c.

Definition at line 52 of file transcode.c.

Referenced by encode_write_frame(), filter_encode_write_frame(), init_filters(), and main().

## stream_ctx

StreamContext* stream_ctx

static

Examples
  transcode.c.

Definition at line 60 of file transcode.c.

Referenced by encode_write_frame(), flush_encoder(), init_filters(), main(), open_input_file(), and open_output_file().