FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
ffmpeg_filter.c File Reference
#include <stdint.h>
#include "ffmpeg.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/samplefmt.h"
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavcodec/mathops.h"

Go to the source code of this file.

Data Structures

struct  FilterGraphPriv
 
struct  FilterGraphThread
 
struct  InputFilterPriv
 
struct  FPSConvContext
 
struct  OutputFilterPriv
 
struct  FilterCommand
 

Macros

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

Enumerations

enum  ReinitReason { VIDEO_CHANGED = (1 << 0), AUDIO_CHANGED = (1 << 1), MATRIX_CHANGED = (1 << 2), HWACCEL_CHANGED = (1 << 3) }
 

Functions

static FilterGraphPrivfgp_from_fg (FilterGraph *fg)
 
static const FilterGraphPrivcfgp_from_cfg (const FilterGraph *fg)
 
static InputFilterPrivifp_from_ifilter (InputFilter *ifilter)
 
static OutputFilterPrivofp_from_ofilter (OutputFilter *ofilter)
 
static void filter_command_free (void *opaque, uint8_t *data)
 
static int sub2video_get_blank_frame (InputFilterPriv *ifp)
 
static void sub2video_copy_rect (uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r)
 
static void sub2video_push_ref (InputFilterPriv *ifp, int64_t pts)
 
static void sub2video_update (InputFilterPriv *ifp, int64_t heartbeat_pts, const AVSubtitle *sub)
 
 DEF_CHOOSE_FORMAT (pix_fmts, enum AVPixelFormat, format, formats, AV_PIX_FMT_NONE, "%s", av_get_pix_fmt_name) DEF_CHOOSE_FORMAT(sample_fmts
 
s av_get_sample_fmt_name DEF_CHOOSE_FORMAT (sample_rates, int, sample_rate, sample_rates, 0, "%d")
 
static int read_binary (void *logctx, const char *path, uint8_t **data, int *len)
 
static int filter_opt_apply (void *logctx, AVFilterContext *f, const char *key, const char *val)
 
static int graph_opts_apply (void *logctx, AVFilterGraphSegment *seg)
 
static int graph_parse (void *logctx, AVFilterGraph *graph, const char *desc, AVFilterInOut **inputs, AVFilterInOut **outputs, AVBufferRef *hw_device)
 
static int ifilter_has_all_input_formats (FilterGraph *fg)
 
static int filter_thread (void *arg)
 
static char * describe_filter_link (FilterGraph *fg, AVFilterInOut *inout, int in)
 
static const char * ofilter_item_name (void *obj)
 
static OutputFilterofilter_alloc (FilterGraph *fg, enum AVMediaType type)
 
static int ifilter_bind_ist (InputFilter *ifilter, InputStream *ist, const ViewSpecifier *vs)
 
static int ifilter_bind_dec (InputFilterPriv *ifp, Decoder *dec, const ViewSpecifier *vs)
 
static int set_channel_layout (OutputFilterPriv *f, const AVChannelLayout *layouts_allowed, const AVChannelLayout *layout_requested)
 
int ofilter_bind_enc (OutputFilter *ofilter, unsigned sched_idx_enc, const OutputFilterOptions *opts)
 
static int ofilter_bind_ifilter (OutputFilter *ofilter, InputFilterPriv *ifp, const OutputFilterOptions *opts)
 
static int ifilter_bind_fg (InputFilterPriv *ifp, FilterGraph *fg_src, int out_idx)
 
static InputFilterifilter_alloc (FilterGraph *fg)
 
void fg_free (FilterGraph **pfg)
 
static const char * fg_item_name (void *obj)
 
int fg_create (FilterGraph **pfg, char *graph_desc, Scheduler *sch)
 Create a new filtergraph in the global filtergraph list. More...
 
int fg_create_simple (FilterGraph **pfg, InputStream *ist, char *graph_desc, Scheduler *sch, unsigned sched_idx_enc, const OutputFilterOptions *opts)
 
static int fg_complex_bind_input (FilterGraph *fg, InputFilter *ifilter)
 
static int bind_inputs (FilterGraph *fg)
 
int fg_finalise_bindings (void)
 
static int insert_trim (void *logctx, 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 (FilterGraphPriv *fgp, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_audio_filter (FilterGraphPriv *fgp, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_filter (FilterGraphPriv *fgp, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
static void sub2video_prepare (InputFilterPriv *ifp)
 
static int configure_input_video_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_audio_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static void cleanup_filtergraph (FilterGraph *fg, FilterGraphThread *fgt)
 
static int filter_is_buffersrc (const AVFilterContext *f)
 
static int graph_is_meta (AVFilterGraph *graph)
 
static int sub2video_frame (InputFilter *ifilter, AVFrame *frame, int buffer)
 
static int configure_filtergraph (FilterGraph *fg, FilterGraphThread *fgt)
 
static int ifilter_parameters_from_frame (InputFilter *ifilter, const AVFrame *frame)
 
int filtergraph_is_simple (const FilterGraph *fg)
 
static void send_command (FilterGraph *fg, AVFilterGraph *graph, double time, const char *target, const char *command, const char *arg, int all_filters)
 
static int choose_input (const FilterGraph *fg, const FilterGraphThread *fgt)
 
static int choose_out_timebase (OutputFilterPriv *ofp, AVFrame *frame)
 
static double adjust_frame_pts_to_encoder_tb (void *logctx, AVFrame *frame, AVRational tb_dst, int64_t start_time)
 
static void video_sync_process (OutputFilterPriv *ofp, AVFrame *frame, int64_t *nb_frames, int64_t *nb_frames_prev)
 
static int close_output (OutputFilterPriv *ofp, FilterGraphThread *fgt)
 
static int fg_output_frame (OutputFilterPriv *ofp, FilterGraphThread *fgt, AVFrame *frame)
 
static int fg_output_step (OutputFilterPriv *ofp, FilterGraphThread *fgt, AVFrame *frame)
 
static int read_frames (FilterGraph *fg, FilterGraphThread *fgt, AVFrame *frame)
 
static void sub2video_heartbeat (InputFilter *ifilter, int64_t pts, AVRational tb)
 
static int send_eof (FilterGraphThread *fgt, InputFilter *ifilter, int64_t pts, AVRational tb)
 
static const char * unknown_if_null (const char *str)
 
static int send_frame (FilterGraph *fg, FilterGraphThread *fgt, InputFilter *ifilter, AVFrame *frame)
 
static void fg_thread_set_name (const FilterGraph *fg)
 
static void fg_thread_uninit (FilterGraphThread *fgt)
 
static int fg_thread_init (FilterGraphThread *fgt, const FilterGraph *fg)
 
void fg_send_command (FilterGraph *fg, double time, const char *target, const char *command, const char *arg, int all_filters)
 

Variables

static const AVClass ofilter_class
 
static const AVClass fg_class
 

Macro Definition Documentation

◆ DEF_CHOOSE_FORMAT

#define DEF_CHOOSE_FORMAT (   name,
  type,
  var,
  supported_list,
  none,
  printf_format,
  get_name 
)
Value:
static void choose_ ## name (OutputFilterPriv *ofp, AVBPrint *bprint) \
{ \
if (ofp->var == none && !ofp->supported_list) \
return; \
av_bprintf(bprint, #name "="); \
if (ofp->var != none) { \
av_bprintf(bprint, printf_format, get_name(ofp->var)); \
} else { \
const type *p; \
for (p = ofp->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); \
}

Definition at line 374 of file ffmpeg_filter.c.

◆ AUTO_INSERT_FILTER

#define AUTO_INSERT_FILTER (   opt_name,
  filter_name,
  arg 
)
Value:
do { \
AVFilterContext *filt_ctx; \
av_log(ofilter, 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, 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)

Enumeration Type Documentation

◆ ReinitReason

Enumerator
VIDEO_CHANGED 
AUDIO_CHANGED 
MATRIX_CHANGED 
HWACCEL_CHANGED 

Definition at line 2771 of file ffmpeg_filter.c.

Function Documentation

◆ fgp_from_fg()

static FilterGraphPriv* fgp_from_fg ( FilterGraph fg)
static

◆ cfgp_from_cfg()

static const FilterGraphPriv* cfgp_from_cfg ( const FilterGraph fg)
static

Definition at line 78 of file ffmpeg_filter.c.

Referenced by filtergraph_is_simple().

◆ ifp_from_ifilter()

static InputFilterPriv* ifp_from_ifilter ( InputFilter ifilter)
static

◆ ofp_from_ofilter()

static OutputFilterPriv* ofp_from_ofilter ( OutputFilter ofilter)
static

◆ filter_command_free()

static void filter_command_free ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 253 of file ffmpeg_filter.c.

Referenced by fg_send_command().

◆ sub2video_get_blank_frame()

static int sub2video_get_blank_frame ( InputFilterPriv ifp)
static

Definition at line 264 of file ffmpeg_filter.c.

Referenced by sub2video_update().

◆ sub2video_copy_rect()

static void sub2video_copy_rect ( uint8_t *  dst,
int  dst_linesize,
int  w,
int  h,
AVSubtitleRect r 
)
static

Definition at line 286 of file ffmpeg_filter.c.

Referenced by sub2video_update().

◆ sub2video_push_ref()

static void sub2video_push_ref ( InputFilterPriv ifp,
int64_t  pts 
)
static

Definition at line 317 of file ffmpeg_filter.c.

Referenced by sub2video_heartbeat(), and sub2video_update().

◆ sub2video_update()

static void sub2video_update ( InputFilterPriv ifp,
int64_t  heartbeat_pts,
const AVSubtitle sub 
)
static

Definition at line 333 of file ffmpeg_filter.c.

Referenced by sub2video_frame(), and sub2video_heartbeat().

◆ DEF_CHOOSE_FORMAT() [1/2]

DEF_CHOOSE_FORMAT ( pix_fmts  ,
enum  AVPixelFormat,
format  ,
formats  ,
AV_PIX_FMT_NONE  ,
"%s"  ,
av_get_pix_fmt_name   
)

◆ DEF_CHOOSE_FORMAT() [2/2]

s av_get_sample_fmt_name DEF_CHOOSE_FORMAT ( sample_rates  ,
int  ,
sample_rate  ,
sample_rates  ,
,
"%d"   
)

Definition at line 400 of file ffmpeg_filter.c.

◆ read_binary()

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

Definition at line 429 of file ffmpeg_filter.c.

Referenced by filter_opt_apply().

◆ filter_opt_apply()

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

Definition at line 478 of file ffmpeg_filter.c.

Referenced by graph_opts_apply().

◆ graph_opts_apply()

static int graph_opts_apply ( void *  logctx,
AVFilterGraphSegment seg 
)
static

Definition at line 534 of file ffmpeg_filter.c.

Referenced by graph_parse().

◆ graph_parse()

static int graph_parse ( void *  logctx,
AVFilterGraph graph,
const char *  desc,
AVFilterInOut **  inputs,
AVFilterInOut **  outputs,
AVBufferRef hw_device 
)
static

Definition at line 558 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), and fg_create().

◆ ifilter_has_all_input_formats()

static int ifilter_has_all_input_formats ( FilterGraph fg)
static

Definition at line 603 of file ffmpeg_filter.c.

Referenced by filter_thread(), send_eof(), and send_frame().

◆ filter_thread()

static int filter_thread ( void *  arg)
static

Definition at line 2968 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ describe_filter_link()

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

Definition at line 615 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ ofilter_item_name()

static const char* ofilter_item_name ( void *  obj)
static

Definition at line 627 of file ffmpeg_filter.c.

◆ ofilter_alloc()

static OutputFilter* ofilter_alloc ( FilterGraph fg,
enum AVMediaType  type 
)
static

Definition at line 641 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ ifilter_bind_ist()

static int ifilter_bind_ist ( InputFilter ifilter,
InputStream ist,
const ViewSpecifier vs 
)
static

Definition at line 666 of file ffmpeg_filter.c.

Referenced by fg_complex_bind_input(), and fg_create_simple().

◆ ifilter_bind_dec()

static int ifilter_bind_dec ( InputFilterPriv ifp,
Decoder dec,
const ViewSpecifier vs 
)
static

Definition at line 721 of file ffmpeg_filter.c.

Referenced by fg_complex_bind_input().

◆ set_channel_layout()

static int set_channel_layout ( OutputFilterPriv f,
const AVChannelLayout layouts_allowed,
const AVChannelLayout layout_requested 
)
static

Definition at line 750 of file ffmpeg_filter.c.

Referenced by ofilter_bind_enc().

◆ ofilter_bind_enc()

int ofilter_bind_enc ( OutputFilter ofilter,
unsigned  sched_idx_enc,
const OutputFilterOptions opts 
)

Definition at line 790 of file ffmpeg_filter.c.

Referenced by fg_create_simple(), and ost_bind_filter().

◆ ofilter_bind_ifilter()

static int ofilter_bind_ifilter ( OutputFilter ofilter,
InputFilterPriv ifp,
const OutputFilterOptions opts 
)
static

Definition at line 900 of file ffmpeg_filter.c.

Referenced by ifilter_bind_fg().

◆ ifilter_bind_fg()

static int ifilter_bind_fg ( InputFilterPriv ifp,
FilterGraph fg_src,
int  out_idx 
)
static

Definition at line 920 of file ffmpeg_filter.c.

Referenced by fg_complex_bind_input().

◆ ifilter_alloc()

static InputFilter* ifilter_alloc ( FilterGraph fg)
static

Definition at line 957 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ fg_free()

void fg_free ( FilterGraph **  pfg)

Definition at line 985 of file ffmpeg_filter.c.

Referenced by ffmpeg_cleanup(), and ost_free().

◆ fg_item_name()

static const char* fg_item_name ( void *  obj)
static

Definition at line 1041 of file ffmpeg_filter.c.

◆ fg_create()

int fg_create ( FilterGraph **  pfg,
char *  graph_desc,
Scheduler sch 
)

Create a new filtergraph in the global filtergraph list.

Parameters
graph_descGraph description; an av_malloc()ed string, filtergraph takes ownership of it.

Definition at line 1055 of file ffmpeg_filter.c.

Referenced by fg_create_simple().

◆ fg_create_simple()

int fg_create_simple ( FilterGraph **  pfg,
InputStream ist,
char *  graph_desc,
Scheduler sch,
unsigned  sched_idx_enc,
const OutputFilterOptions opts 
)

Definition at line 1192 of file ffmpeg_filter.c.

Referenced by ost_bind_filter().

◆ fg_complex_bind_input()

static int fg_complex_bind_input ( FilterGraph fg,
InputFilter ifilter 
)
static

Definition at line 1248 of file ffmpeg_filter.c.

Referenced by bind_inputs().

◆ bind_inputs()

static int bind_inputs ( FilterGraph fg)
static

Definition at line 1386 of file ffmpeg_filter.c.

Referenced by fg_finalise_bindings().

◆ fg_finalise_bindings()

int fg_finalise_bindings ( void  )

Definition at line 1404 of file ffmpeg_filter.c.

◆ insert_trim()

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

◆ insert_filter()

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

Definition at line 1484 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_output_video_filter()

static int configure_output_video_filter ( FilterGraphPriv fgp,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1510 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_audio_filter()

static int configure_output_audio_filter ( FilterGraphPriv fgp,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1589 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_filter()

static int configure_output_filter ( FilterGraphPriv fgp,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1671 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ sub2video_prepare()

static void sub2video_prepare ( InputFilterPriv ifp)
static

Definition at line 1681 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_input_video_filter()

static int configure_input_video_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1692 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_audio_filter()

static int configure_input_audio_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1807 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_filter()

static int configure_input_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1848 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ cleanup_filtergraph()

static void cleanup_filtergraph ( FilterGraph fg,
FilterGraphThread fgt 
)
static

Definition at line 1858 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ filter_is_buffersrc()

static int filter_is_buffersrc ( const AVFilterContext f)
static

Definition at line 1867 of file ffmpeg_filter.c.

Referenced by graph_is_meta().

◆ graph_is_meta()

static int graph_is_meta ( AVFilterGraph graph)
static

Definition at line 1874 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ sub2video_frame()

static int sub2video_frame ( InputFilter ifilter,
AVFrame frame,
int  buffer 
)
static

Definition at line 2669 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), and filter_thread().

◆ configure_filtergraph()

static int configure_filtergraph ( FilterGraph fg,
FilterGraphThread fgt 
)
static

Definition at line 1893 of file ffmpeg_filter.c.

Referenced by filter_thread(), send_eof(), and send_frame().

◆ ifilter_parameters_from_frame()

static int ifilter_parameters_from_frame ( InputFilter ifilter,
const AVFrame frame 
)
static

Definition at line 2042 of file ffmpeg_filter.c.

Referenced by send_frame().

◆ filtergraph_is_simple()

int filtergraph_is_simple ( const FilterGraph fg)

◆ send_command()

static void send_command ( FilterGraph fg,
AVFilterGraph graph,
double  time,
const char *  target,
const char *  command,
const char *  arg,
int  all_filters 
)
static

Definition at line 2083 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ choose_input()

static int choose_input ( const FilterGraph fg,
const FilterGraphThread fgt 
)
static

Definition at line 2108 of file ffmpeg_filter.c.

Referenced by read_frames().

◆ choose_out_timebase()

static int choose_out_timebase ( OutputFilterPriv ofp,
AVFrame frame 
)
static

Definition at line 2132 of file ffmpeg_filter.c.

Referenced by fg_output_step().

◆ adjust_frame_pts_to_encoder_tb()

static double adjust_frame_pts_to_encoder_tb ( void *  logctx,
AVFrame frame,
AVRational  tb_dst,
int64_t  start_time 
)
static

Definition at line 2209 of file ffmpeg_filter.c.

Referenced by video_sync_process().

◆ video_sync_process()

static void video_sync_process ( OutputFilterPriv ofp,
AVFrame frame,
int64_t nb_frames,
int64_t nb_frames_prev 
)
static

Definition at line 2252 of file ffmpeg_filter.c.

Referenced by fg_output_frame().

◆ close_output()

static int close_output ( OutputFilterPriv ofp,
FilterGraphThread fgt 
)
static

Definition at line 2375 of file ffmpeg_filter.c.

Referenced by fg_output_frame().

◆ fg_output_frame()

static int fg_output_frame ( OutputFilterPriv ofp,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2425 of file ffmpeg_filter.c.

Referenced by fg_output_step(), and filter_thread().

◆ fg_output_step()

static int fg_output_step ( OutputFilterPriv ofp,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2508 of file ffmpeg_filter.c.

Referenced by read_frames().

◆ read_frames()

static int read_frames ( FilterGraph fg,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2585 of file ffmpeg_filter.c.

Referenced by filter_thread(), and send_frame().

◆ sub2video_heartbeat()

static void sub2video_heartbeat ( InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)
static

Definition at line 2647 of file ffmpeg_filter.c.

Referenced by sub2video_frame().

◆ send_eof()

static int send_eof ( FilterGraphThread fgt,
InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)
static

Definition at line 2716 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ unknown_if_null()

static const char* unknown_if_null ( const char *  str)
static

Definition at line 2778 of file ffmpeg_filter.c.

Referenced by send_frame().

◆ send_frame()

static int send_frame ( FilterGraph fg,
FilterGraphThread fgt,
InputFilter ifilter,
AVFrame frame 
)
static

Definition at line 2783 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_thread_set_name()

static void fg_thread_set_name ( const FilterGraph fg)
static

Definition at line 2908 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_thread_uninit()

static void fg_thread_uninit ( FilterGraphThread fgt)
static

Definition at line 2923 of file ffmpeg_filter.c.

Referenced by fg_thread_init(), and filter_thread().

◆ fg_thread_init()

static int fg_thread_init ( FilterGraphThread fgt,
const FilterGraph fg 
)
static

Definition at line 2941 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_send_command()

void fg_send_command ( FilterGraph fg,
double  time,
const char *  target,
const char *  command,
const char *  arg,
int  all_filters 
)

Definition at line 3085 of file ffmpeg_filter.c.

Referenced by check_keyboard_interaction().

Variable Documentation

◆ ofilter_class

const AVClass ofilter_class
static
Initial value:
= {
.class_name = "OutputFilter",
.item_name = ofilter_item_name,
.parent_log_context_offset = 0x42,
}

Definition at line 633 of file ffmpeg_filter.c.

Referenced by ofilter_alloc().

◆ fg_class

const AVClass fg_class
static
Initial value:
= {
.class_name = "FilterGraph",
.item_name = fg_item_name,
}

Definition at line 1048 of file ffmpeg_filter.c.

Referenced by fg_create().

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
avfilter_graph_create_filter
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx)
A convenience wrapper that allocates and initializes a filter in a single step.
Definition: avfiltergraph.c:138
OutputFilterPriv
Definition: ffmpeg_filter.c:188
fail
#define fail()
Definition: checkasm.h:189
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
ofilter_item_name
static const char * ofilter_item_name(void *obj)
Definition: ffmpeg_filter.c:627
fg_item_name
static const char * fg_item_name(void *obj)
Definition: ffmpeg_filter.c:1041
arg
const char * arg
Definition: jacosubdec.c:67
avfilter_get_by_name
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
Definition: allfilters.c:634
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_CLASS_CATEGORY_FILTER
@ AV_CLASS_CATEGORY_FILTER
Definition: log.h:36
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
avfilter_link
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
Link two filters together.
Definition: avfilter.c:149
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:220
ret
ret
Definition: filter_design.txt:187
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27