Loading...
Searching...
No Matches
decode_filter_video.c File Reference

API example for decoding and filtering. More...

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <libavcodec/avcodec.h>`
`#include <libavformat/avformat.h>`
`#include <libavfilter/buffersink.h>`
`#include <libavfilter/buffersrc.h>`
`#include <libavutil/mem.h>`
`#include <libavutil/opt.h>`
`#include <libavutil/time.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 | 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 AVFormatContext * | fmt_ctx
static AVCodecContext * | dec_ctx
AVFilterContext * | buffersink_ctx
AVFilterContext * | buffersrc_ctx
AVFilterGraph * | filter_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 decode_filter_video.c.

## Function Documentation

## open_input_file()

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

static

Definition at line 54 of file decode_filter_video.c.

## init_filters()

int init_filters | ( | const char * | filters_descr | ) |

static

Definition at line 92 of file decode_filter_video.c.

## display_frame()

void display_frame | ( | const AVFrame * | frame,
|  | AVRational | time_base )

static

Examples
  decode_filter_video.c.

Definition at line 184 of file decode_filter_video.c.

Referenced by main().

## main()

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

Definition at line 215 of file decode_filter_video.c.

## Variable Documentation

## filter_descr

const char* filter_descr = "scale=78:24,transpose=cclock"

Definition at line 41 of file decode_filter_video.c.

## fmt_ctx

AVFormatContext* fmt_ctx

static

Definition at line 46 of file decode_filter_video.c.

## dec_ctx

AVCodecContext* dec_ctx

static

Definition at line 47 of file decode_filter_video.c.

## buffersink_ctx

AVFilterContext* buffersink_ctx

Definition at line 48 of file decode_filter_video.c.

## buffersrc_ctx

AVFilterContext* buffersrc_ctx

Definition at line 49 of file decode_filter_video.c.

## filter_graph

AVFilterGraph* filter_graph

Definition at line 50 of file decode_filter_video.c.

## video_stream_index

int video_stream_index = -1

static

Examples
  decode_filter_video.c.

Definition at line 51 of file decode_filter_video.c.

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

## last_pts

int64_t last_pts = AV_NOPTS_VALUE

static

Examples
  decode_filter_video.c.

Definition at line 52 of file decode_filter_video.c.

Referenced by display_frame().