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

Go to the source code of this file.

## Macros

#define | DEF_CHOOSE_FORMAT(name, type, var, supported_list, none, printf_format, get_name)
#define | AUTO_INSERT_FILTER(opt_name, filter_name, arg)
#define | AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg)

## Functions

static enum AVPixelFormat * | get_compliance_normal_pix_fmts (const AVCodec *codec, const enum AVPixelFormat default_formats[])
enum AVPixelFormat | choose_pixel_fmt (const AVCodec *codec, enum AVPixelFormat target, int strict_std_compliance)
static const char * | choose_pix_fmts (OutputFilter *ofilter, AVBPrint *bprint)
| DEF_CHOOSE_FORMAT (sample_fmts, enum AVSampleFormat, format, formats, AV_SAMPLE_FMT_NONE, "%s", av_get_sample_fmt_name) DEF_CHOOSE_FORMAT(sample_rates
static void | choose_channel_layouts (OutputFilter *ofilter, AVBPrint *bprint)
int | init_simple_filtergraph (InputStream *ist, OutputStream *ost)
static char * | describe_filter_link (FilterGraph *fg, AVFilterInOut *inout, int in)
static void | init_input_filter (FilterGraph *fg, AVFilterInOut *in)
static int | read_binary (const char *path, uint8_t **data, int *len)
static int | filter_opt_apply (AVFilterContext *f, const char *key, const char *val)
static int | graph_opts_apply (AVFilterGraphSegment *seg)
static int | graph_parse (AVFilterGraph *graph, const char *desc, AVFilterInOut **inputs, AVFilterInOut **outputs)
int | init_complex_filtergraph (FilterGraph *fg)
static int | insert_trim (int64_t start_time, int64_t duration, AVFilterContext **last_filter, int *pad_idx, const char *filter_name)
static int | insert_filter (AVFilterContext **last_filter, int *pad_idx, const char *filter_name, const char *args)
static int | configure_output_video_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
static int | configure_output_audio_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
int | configure_output_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
void | check_filter_outputs (void)
static int | sub2video_prepare (InputStream *ist, InputFilter *ifilter)
static int | configure_input_video_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
static int | configure_input_audio_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
static int | configure_input_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
static void | cleanup_filtergraph (FilterGraph *fg)
static int | filter_is_buffersrc (const AVFilterContext *f)
static int | graph_is_meta (AVFilterGraph *graph)
int | configure_filtergraph (FilterGraph *fg)
int | ifilter_parameters_from_frame (InputFilter *ifilter, const AVFrame *frame)
int | filtergraph_is_simple (FilterGraph *fg)

## Variables

| int
| sample_rate
| sample_rates
| d

## Macro Definition Documentation

## AUTO_INSERT_FILTER

#define AUTO_INSERT_FILTER | ( |  | opt_name,
|  |  | filter_name,
|  |  | arg
| ) |  |

Value:
do { \
AVFilterContext *filt_ctx; \
\
av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
"similarly to -af " filter_name "=%s.\n", arg); \
\
ret = avfilter_graph_create_filter(&filt_ctx, \
avfilter_get_by_name(filter_name), \
filter_name, arg, NULL, fg->graph); \
if (ret < 0) \
goto fail; \
\
ret = avfilter_link(last_filter, pad_idx, filt_ctx, 0); \
if (ret < 0) \
goto fail; \
\
last_filter = filt_ctx; \
pad_idx = 0; \
} while (0)

## AUTO_INSERT_FILTER_INPUT

#define AUTO_INSERT_FILTER_INPUT | ( |  | opt_name,
|  |  | filter_name,
|  |  | arg
| ) |  |

Value:
do { \
AVFilterContext *filt_ctx; \
\
av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
"similarly to -af " filter_name "=%s.\n", arg); \
\
snprintf(name, sizeof(name), "graph_%d_%s_in_%d_%d", \
fg->index, filter_name, ist->file_index, ist->st->index); \
ret = avfilter_graph_create_filter(&filt_ctx, \
avfilter_get_by_name(filter_name), \
name, arg, NULL, fg->graph); \
if (ret < 0) \
return ret; \
\
ret = avfilter_link(last_filter, 0, filt_ctx, 0); \
if (ret < 0) \
return ret; \
\
last_filter = filt_ctx; \
} while (0)

## DEF_CHOOSE_FORMAT

#define DEF_CHOOSE_FORMAT | ( |  | name,
|  |  | type,
|  |  | var,
|  |  | supported_list,
|  |  | none,
|  |  | printf_format,
|  |  | get_name
| ) |  |

Value:
static void choose_ ## name (OutputFilter *ofilter, AVBPrint *bprint) \
{ \
if (ofilter->var == none && !ofilter->supported_list) \
return; \
av_bprintf(bprint, #name "="); \
if (ofilter->var != none) { \
av_bprintf(bprint, printf_format, get_name(ofilter->var)); \
} else { \
const type *p; \
\
for (p = ofilter->supported_list; *p != none; p++) { \
av_bprintf(bprint, printf_format "|", get_name(*p)); \
} \
if (bprint->len > 0) \
bprint->str[--bprint->len] = '\0'; \
} \
av_bprint_chars(bprint, ':', 1); \
}
OutputFilter
Definition fftools_ffmpeg.h:344

Definition at line 154 of file fftools_ffmpeg_filter.c.

## Function Documentation

## check_filter_outputs()

void check_filter_outputs | ( | void |  | ) |

Definition at line 822 of file fftools_ffmpeg_filter.c.

## choose_channel_layouts()

static void choose_channel_layouts | ( | OutputFilter * | ofilter,
|  | AVBPrint * | bprint
| ) |  |

static

Definition at line 183 of file fftools_ffmpeg_filter.c.

## choose_pix_fmts()

static const char * choose_pix_fmts | ( | OutputFilter * | ofilter,
|  | AVBPrint * | bprint
| ) |  |

static

Definition at line 114 of file fftools_ffmpeg_filter.c.

## choose_pixel_fmt()

enum AVPixelFormat choose_pixel_fmt | ( | const AVCodec * | codec,
|  | enum AVPixelFormat | target,
|  | int | strict_std_compliance
| ) |  |

Definition at line 80 of file fftools_ffmpeg_filter.c.

## cleanup_filtergraph()

static void cleanup_filtergraph | ( | FilterGraph * | fg | ) |

static

Definition at line 1102 of file fftools_ffmpeg_filter.c.

## configure_filtergraph()

int configure_filtergraph | ( | FilterGraph * | fg | ) |

Definition at line 1136 of file fftools_ffmpeg_filter.c.

## configure_input_audio_filter()

static int configure_input_audio_filter | ( | FilterGraph * | fg,
|  | InputFilter * | ifilter,
|  | AVFilterInOut * | in
| ) |  |

static

Definition at line 1009 of file fftools_ffmpeg_filter.c.

## configure_input_filter()

static int configure_input_filter | ( | FilterGraph * | fg,
|  | InputFilter * | ifilter,
|  | AVFilterInOut * | in
| ) |  |

static

Definition at line 1086 of file fftools_ffmpeg_filter.c.

## configure_input_video_filter()

static int configure_input_video_filter | ( | FilterGraph * | fg,
|  | InputFilter * | ifilter,
|  | AVFilterInOut * | in
| ) |  |

static

Definition at line 884 of file fftools_ffmpeg_filter.c.

## configure_output_audio_filter()

static int configure_output_audio_filter | ( | FilterGraph * | fg,
|  | OutputFilter * | ofilter,
|  | AVFilterInOut * | out
| ) |  |

static

Definition at line 696 of file fftools_ffmpeg_filter.c.

## configure_output_filter()

int configure_output_filter | ( | FilterGraph * | fg,
|  | OutputFilter * | ofilter,
|  | AVFilterInOut * | out
| ) |  |

Definition at line 807 of file fftools_ffmpeg_filter.c.

## configure_output_video_filter()

static int configure_output_video_filter | ( | FilterGraph * | fg,
|  | OutputFilter * | ofilter,
|  | AVFilterInOut * | out
| ) |  |

static

Definition at line 602 of file fftools_ffmpeg_filter.c.

## DEF_CHOOSE_FORMAT()

DEF_CHOOSE_FORMAT | ( | sample_fmts | ,
|  | enum | AVSampleFormat,
|  | format | ,
|  | formats | ,
|  | AV_SAMPLE_FMT_NONE | ,
|  | "%s" | ,
|  | av_get_sample_fmt_name |
| ) |  |

## describe_filter_link()

static char * describe_filter_link | ( | FilterGraph * | fg,
|  | AVFilterInOut * | inout,
|  | int | in
| ) |  |

static

Definition at line 238 of file fftools_ffmpeg_filter.c.

## filter_is_buffersrc()

static int filter_is_buffersrc | ( | const AVFilterContext * | f | ) |

static

Definition at line 1112 of file fftools_ffmpeg_filter.c.

## filter_opt_apply()

static int filter_opt_apply | ( | AVFilterContext * | f,
|  | const char * | key,
|  | const char * | val
| ) |  |

static

Definition at line 387 of file fftools_ffmpeg_filter.c.

## filtergraph_is_simple()

int filtergraph_is_simple | ( | FilterGraph * | fg | ) |

Definition at line 1331 of file fftools_ffmpeg_filter.c.

## get_compliance_normal_pix_fmts()

static enum AVPixelFormat * get_compliance_normal_pix_fmts | ( | const AVCodec * | codec,
|  | const enum AVPixelFormat | default_formats[]
| ) |  |

static

Definition at line 66 of file fftools_ffmpeg_filter.c.

## graph_is_meta()

static int graph_is_meta | ( | AVFilterGraph * | graph | ) |

static

Definition at line 1119 of file fftools_ffmpeg_filter.c.

## graph_opts_apply()

static int graph_opts_apply | ( | AVFilterGraphSegment * | seg | ) |

static

Definition at line 442 of file fftools_ffmpeg_filter.c.

## graph_parse()

static int graph_parse | ( | AVFilterGraph * | graph,
|  | const char * | desc,
|  | AVFilterInOut ** | inputs,
|  | AVFilterInOut ** | outputs
| ) |  |

static

Definition at line 466 of file fftools_ffmpeg_filter.c.

## ifilter_parameters_from_frame()

int ifilter_parameters_from_frame | ( | InputFilter * | ifilter,
|  | const AVFrame * | frame
| ) |  |

Definition at line 1299 of file fftools_ffmpeg_filter.c.

## init_complex_filtergraph()

int init_complex_filtergraph | ( | FilterGraph * | fg | ) |

Definition at line 491 of file fftools_ffmpeg_filter.c.

## init_input_filter()

static void init_input_filter | ( | FilterGraph * | fg,
|  | AVFilterInOut * | in
| ) |  |

static

Definition at line 255 of file fftools_ffmpeg_filter.c.

## init_simple_filtergraph()

int init_simple_filtergraph | ( | InputStream * | ist,
|  | OutputStream * | ost
| ) |  |

Definition at line 203 of file fftools_ffmpeg_filter.c.

## insert_filter()

static int insert_filter | ( | AVFilterContext ** | last_filter,
|  | int * | pad_idx,
|  | const char * | filter_name,
|  | const char * | args
| ) |  |

static

Definition at line 580 of file fftools_ffmpeg_filter.c.

## insert_trim()

static int insert_trim | ( | int64_t | start_time,
|  | int64_t | duration,
|  | AVFilterContext ** | last_filter,
|  | int * | pad_idx,
|  | const char * | filter_name
| ) |  |

static

Definition at line 529 of file fftools_ffmpeg_filter.c.

## read_binary()

static int read_binary | ( | const char * | path,
|  | uint8_t ** | data,
|  | int * | len
| ) |  |

static

Definition at line 341 of file fftools_ffmpeg_filter.c.

## sub2video_prepare()

static int sub2video_prepare | ( | InputStream * | ist,
|  | InputFilter * | ifilter
| ) |  |

static

Definition at line 837 of file fftools_ffmpeg_filter.c.

## Variable Documentation

## d

d

Definition at line 181 of file fftools_ffmpeg_filter.c.

## int

int

Definition at line 180 of file fftools_ffmpeg_filter.c.

## sample_rate

sample_rate

Definition at line 180 of file fftools_ffmpeg_filter.c.

## sample_rates

sample_rates

Definition at line 180 of file fftools_ffmpeg_filter.c.