World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
avfilter.h
См. документацию.
1 /*
2  * filter layer
3  * Copyright (c) 2007 Bobby Bingham
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVFILTER_AVFILTER_H
23 #define AVFILTER_AVFILTER_H
24 
38 #include <stddef.h>
39 
40 #include "libavutil/attributes.h"
41 #include "libavutil/avutil.h"
42 #include "libavutil/buffer.h"
43 #include "libavutil/dict.h"
44 #include "libavutil/frame.h"
45 #include "libavutil/log.h"
46 #include "libavutil/samplefmt.h"
47 #include "libavutil/pixfmt.h"
48 #include "libavutil/rational.h"
49 
50 #include "libavfilter/version.h"
51 
55 unsigned avfilter_version(void);
56 
60 const char *avfilter_configuration(void);
61 
65 const char *avfilter_license(void);
66 
68 typedef struct AVFilterLink AVFilterLink;
69 typedef struct AVFilterPad AVFilterPad;
71 
76 int avfilter_pad_count(const AVFilterPad *pads);
77 
87 const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);
88 
98 enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
99 
105 #define AVFILTER_FLAG_DYNAMIC_INPUTS (1 << 0)
106 
111 #define AVFILTER_FLAG_DYNAMIC_OUTPUTS (1 << 1)
112 
116 #define AVFILTER_FLAG_SLICE_THREADS (1 << 2)
117 
125 #define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC (1 << 16)
126 
133 #define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL (1 << 17)
134 
138 #define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL)
139 
144 typedef struct AVFilter {
148  const char *name;
149 
155  const char *description;
156 
173 
183 
187  int flags;
188 
189  /*****************************************************************
190  * All fields below this line are not part of the public API. They
191  * may not be used outside of libavfilter and can be changed and
192  * removed at will.
193  * New public fields should be added right above.
194  *****************************************************************
195  */
196 
211 
234 
247 
259 
283 
284  int priv_size;
285 
287 
292  struct AVFilter *next;
293 
306  int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
307 
313  int (*init_opaque)(AVFilterContext *ctx, void *opaque);
314 
328 } AVFilter;
329 
333 #define AVFILTER_THREAD_SLICE (1 << 0)
334 
336 
339  const AVClass *av_class;
340 
341  const AVFilter *filter;
342 
343  char *name;
344 
347  unsigned nb_inputs;
348 
351  unsigned nb_outputs;
352 
353  void *priv;
354 
356 
374 
378  AVFilterInternal *internal;
379 
380  struct AVFilterCommand *command_queue;
381 
382  char *enable_str;
383  void *enable;
384  double *var_values;
386 
395 
402 
408  unsigned ready;
409 
425 };
426 
439 struct AVFilterLink {
442 
445 
447 
448  /* These parameters apply only to video */
449  int w;
450  int h;
452  /* These parameters apply only to audio */
455 
456  int format;
457 
466 
467  /*****************************************************************
468  * All fields below this line are not part of the public API. They
469  * may not be used outside of libavfilter and can be changed and
470  * removed at will.
471  * New public fields should be added right above.
472  *****************************************************************
473  */
483 
490  struct AVFilterChannelLayouts *in_channel_layouts;
491  struct AVFilterChannelLayouts *out_channel_layouts;
492 
501 
503  enum {
507  } init_state;
508 
513 
519 
525 
530 
543 
548 
554 
563 
569 
573  int channels;
574 
578  unsigned flags;
579 
584 
588  void *frame_pool;
589 
596 
602 
603 #ifndef FF_INTERNAL_FIELDS
604 
610  char reserved[0xF000];
611 
612 #else /* FF_INTERNAL_FIELDS */
613 
617  FFFrameQueue fifo;
618 
625 
632 
637 
644 
645 #endif /* FF_INTERNAL_FIELDS */
646 
647 };
648 
658 int avfilter_link(AVFilterContext *src, unsigned srcpad,
659  AVFilterContext *dst, unsigned dstpad);
660 
664 void avfilter_link_free(AVFilterLink **link);
665 
666 #if FF_API_FILTER_GET_SET
667 
671 attribute_deprecated
673 #endif
674 
680 attribute_deprecated
681 void avfilter_link_set_closed(AVFilterLink *link, int closed);
682 
690 
691 #define AVFILTER_CMD_FLAG_ONE 1
692 #define AVFILTER_CMD_FLAG_FAST 2
693 
694 
698 int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
699 
709 const AVFilter *av_filter_iterate(void **opaque);
710 
711 #if FF_API_NEXT
712 
713 attribute_deprecated
714 void avfilter_register_all(void);
715 
726 attribute_deprecated
728 
734 attribute_deprecated
735 const AVFilter *avfilter_next(const AVFilter *prev);
736 #endif
737 
745 const AVFilter *avfilter_get_by_name(const char *name);
746 
747 
758 int avfilter_init_str(AVFilterContext *ctx, const char *args);
759 
781 
789 
800  unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
801 
807 const AVClass *avfilter_get_class(void);
808 
810 
823 typedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
824 
838  void *arg, int *ret, int nb_jobs);
839 
840 typedef struct AVFilterGraph {
843  unsigned nb_filters;
844 
846 #if FF_API_LAVR_OPTS
847  attribute_deprecated char *resample_lavr_opts;
848 #endif
849 
863 
870 
875 
881  void *opaque;
882 
896 
898 
908 
910 } AVFilterGraph;
911 
918 
934  const AVFilter *filter,
935  const char *name);
936 
946 
960 int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
961  const char *name, const char *args, void *opaque,
962  AVFilterGraph *graph_ctx);
963 
973 
974 enum {
977 };
978 
986 int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);
987 
992 void avfilter_graph_free(AVFilterGraph **graph);
993 
1003 typedef struct AVFilterInOut {
1005  char *name;
1006 
1009 
1011  int pad_idx;
1012 
1015 } AVFilterInOut;
1016 
1023 
1028 void avfilter_inout_free(AVFilterInOut **inout);
1029 
1048 int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
1049  AVFilterInOut *inputs, AVFilterInOut *outputs,
1050  void *log_ctx);
1051 
1069 int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters,
1070  AVFilterInOut **inputs, AVFilterInOut **outputs,
1071  void *log_ctx);
1072 
1095 int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
1096  AVFilterInOut **inputs,
1097  AVFilterInOut **outputs);
1098 
1114 int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags);
1115 
1131 int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts);
1132 
1133 
1142 char *avfilter_graph_dump(AVFilterGraph *graph, const char *options);
1143 
1163 
1168 #endif /* AVFILTER_AVFILTER_H */
AVFilter::preinit
int(* preinit)(AVFilterContext *ctx)
Definition: avfilter.h:210
avfilter_register_all
attribute_deprecated void avfilter_register_all(void)
AVFilterContext::name
char * name
name of this filter instance
Definition: avfilter.h:343
avfilter_pad_get_name
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
AVFilterContext
Definition: avfilter.h:338
AVFilter::priv_size
int priv_size
size of private data to allocate for the filter
Definition: avfilter.h:284
avfilter_action_func
int() avfilter_action_func(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: avfilter.h:823
AVFilterContext::command_queue
struct AVFilterCommand * command_queue
Definition: avfilter.h:380
rational.h
AVFilterContext::nb_inputs
unsigned nb_inputs
number of input pads
Definition: avfilter.h:347
AVFilterGraph::disable_auto_convert
unsigned disable_auto_convert
Definition: avfilter.h:909
AVFilterGraph::aresample_swr_opts
char * aresample_swr_opts
swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions
Definition: avfilter.h:897
AVFilterContext::graph
struct AVFilterGraph * graph
filtergraph this filter belongs to
Definition: avfilter.h:355
AVFilterContext::filter
const AVFilter * filter
the AVFilter of which this is an instance
Definition: avfilter.h:341
AVFilterGraph::resample_lavr_opts
attribute_deprecated char * resample_lavr_opts
libavresample options to use for the auto-inserted resample filters
Definition: avfilter.h:847
AVFilterGraph::execute
avfilter_execute_func * execute
Definition: avfilter.h:895
avfilter_graph_free
void avfilter_graph_free(AVFilterGraph **graph)
AVFilterFormats
struct AVFilterFormats AVFilterFormats
Definition: avfilter.h:70
AVFilter::query_formats
int(* query_formats)(AVFilterContext *)
Definition: avfilter.h:282
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)
avfilter_graph_alloc_filter
AVFilterContext * avfilter_graph_alloc_filter(AVFilterGraph *graph, const AVFilter *filter, const char *name)
int64_t
__int64 int64_t
Definition: alext.h:31
AVFilterGraph::sink_links_count
int sink_links_count
Definition: avfilter.h:907
avfilter_graph_alloc
AVFilterGraph * avfilter_graph_alloc(void)
avfilter_insert_filter
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx)
av_filter_iterate
const AVFilter * av_filter_iterate(void **opaque)
samplefmt.h
avfilter_config_links
int avfilter_config_links(AVFilterContext *filter)
AVFilterGraph::nb_filters
unsigned nb_filters
Definition: avfilter.h:843
uint64_t
unsigned __int64 uint64_t
Definition: alext.h:32
AVFilterContext::output_pads
AVFilterPad * output_pads
array of output pads
Definition: avfilter.h:349
avfilter_license
const char * avfilter_license(void)
func
GLenum func
Definition: SDL_opengl_glext.h:660
AVFilterGraph::scale_sws_opts
char * scale_sws_opts
sws options to use for the auto-inserted scale filters
Definition: avfilter.h:845
avfilter_inout_free
void avfilter_inout_free(AVFilterInOut **inout)
AVFilterGraph::thread_type
int thread_type
Definition: avfilter.h:862
filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: SDL_opengl_glext.h:1187
avfilter_process_command
int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
AVFilterGraph::av_class
const AVClass * av_class
Definition: avfilter.h:841
avfilter_pad_count
int avfilter_pad_count(const AVFilterPad *pads)
AVFilter::flags_internal
int flags_internal
Additional flags for avfilter internal use only.
Definition: avfilter.h:286
AVFilter::priv_class
const AVClass * priv_class
Definition: avfilter.h:182
AVFilterPad
struct AVFilterPad AVFilterPad
Definition: avfilter.h:69
AVFilterContext::var_values
double * var_values
variable values for the enable expression
Definition: avfilter.h:384
AVFilterContext::av_class
const AVClass * av_class
needed for av_log() and filters common options
Definition: avfilter.h:339
AVFilterInOut
struct AVFilterInOut AVFilterInOut
avfilter_get_by_name
const AVFilter * avfilter_get_by_name(const char *name)
AVFilter::init_dict
int(* init_dict)(AVFilterContext *ctx, AVDictionary **options)
Definition: avfilter.h:246
avfilter_graph_config
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
src
GLenum src
Definition: SDL_opengl_glext.h:1740
avfilter_graph_set_auto_convert
void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags)
AVFilterContext::nb_outputs
unsigned nb_outputs
number of output pads
Definition: avfilter.h:351
log.h
avfilter_link_get_channels
attribute_deprecated int avfilter_link_get_channels(AVFilterLink *link)
avfilter_inout_alloc
AVFilterInOut * avfilter_inout_alloc(void)
avfilter_graph_get_filter
AVFilterContext * avfilter_graph_get_filter(AVFilterGraph *graph, const char *name)
avfilter_graph_request_oldest
int avfilter_graph_request_oldest(AVFilterGraph *graph)
AVFilterGraph
Definition: avfilter.h:840
avfilter_graph_parse2
int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs)
AVFilterContext::extra_hw_frames
int extra_hw_frames
Definition: avfilter.h:424
AVFilterInOut::filter_ctx
AVFilterContext * filter_ctx
Definition: avfilter.h:1008
AVFILTER_AUTO_CONVERT_ALL
@ AVFILTER_AUTO_CONVERT_ALL
Definition: avfilter.h:975
AVFilterContext::ready
unsigned ready
Definition: avfilter.h:408
AVFilterContext::nb_threads
int nb_threads
Definition: avfilter.h:401
AVFilter::description
const char * description
Definition: avfilter.h:155
AVFilterGraph::nb_threads
int nb_threads
Definition: avfilter.h:869
AVMediaType
AVMediaType
Definition: avutil.h:199
ctx
EGLContext ctx
Definition: SDL_egl.h:952
avfilter_link_set_closed
attribute_deprecated void avfilter_link_set_closed(AVFilterLink *link, int closed)
avfilter_execute_func
int() avfilter_execute_func(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: avfilter.h:837
AVFilter::next
struct AVFilter * next
Definition: avfilter.h:292
AVFilterGraph::opaque
void * opaque
Definition: avfilter.h:881
avfilter_link
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
avfilter_graph_queue_command
int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts)
AVFilterContext::enable
void * enable
parsed expression (AVExpr*)
Definition: avfilter.h:383
AVFilter::flags
int flags
Definition: avfilter.h:187
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
AVBufferRef
Definition: buffer.h:81
AVClass
Definition: log.h:67
frame.h
avfilter_link_free
void avfilter_link_free(AVFilterLink **link)
buffer.h
AVFilter::init_opaque
int(* init_opaque)(AVFilterContext *ctx, void *opaque)
Definition: avfilter.h:313
attributes.h
AVFilterInOut::name
char * name
Definition: avfilter.h:1005
avfilter_init_str
int avfilter_init_str(AVFilterContext *ctx, const char *args)
AVFilter::init
int(* init)(AVFilterContext *ctx)
Definition: avfilter.h:233
avfilter_register
attribute_deprecated int avfilter_register(AVFilter *filter)
avfilter_graph_parse_ptr
int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)
void
typedef void(SDLCALL *SDL_AudioFilter)(struct SDL_AudioCVT *cvt
AVFilterGraph::filters
AVFilterContext ** filters
Definition: avfilter.h:842
AVFilter
struct AVFilter AVFilter
name
EGLImageKHR EGLint * name
Definition: SDL_egl.h:1497
pixfmt.h
avfilter_configuration
const char * avfilter_configuration(void)
AVFilterContext::input_pads
AVFilterPad * input_pads
array of input pads
Definition: avfilter.h:345
AVFILTER_AUTO_CONVERT_NONE
@ AVFILTER_AUTO_CONVERT_NONE
Definition: avfilter.h:976
avfilter_graph_dump
char * avfilter_graph_dump(AVFilterGraph *graph, const char *options)
dict.h
AVFilterContext::is_disabled
int is_disabled
the enabled state from the last expression evaluation
Definition: avfilter.h:385
avfilter_pad_get_type
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
AVFilterInOut::next
struct AVFilterInOut * next
Definition: avfilter.h:1014
flags
EGLSyncKHR EGLint flags
Definition: SDL_egl.h:898
AVFilterInOut
Definition: avfilter.h:1003
avfilter_init_dict
int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
AVFilterGraph
struct AVFilterGraph AVFilterGraph
version.h
AVDictionary
struct AVDictionary AVDictionary
Definition: dict.h:86
AVFilterContext::outputs
AVFilterLink ** outputs
array of pointers to output links
Definition: avfilter.h:350
AVFilter::outputs
const AVFilterPad * outputs
Definition: avfilter.h:172
avfilter_graph_parse
int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut *inputs, AVFilterInOut *outputs, void *log_ctx)
avutil.h
AVRational
Definition: rational.h:58
AVFilter
Definition: avfilter.h:144
avfilter_free
void avfilter_free(AVFilterContext *filter)
AVFilter::inputs
const AVFilterPad * inputs
Definition: avfilter.h:164
res
GLuint res
Definition: SDL_opengl_glext.h:7940
AVFilterGraph::sink_links
AVFilterLink ** sink_links
Definition: avfilter.h:906
AVFilterContext::thread_type
int thread_type
Definition: avfilter.h:373
avfilter_graph_send_command
int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags)
AVFilterGraphInternal
struct AVFilterGraphInternal AVFilterGraphInternal
Definition: avfilter.h:809
avfilter_next
const attribute_deprecated AVFilter * avfilter_next(const AVFilter *prev)
AVFilter::name
const char * name
Definition: avfilter.h:148
AVFilterContext::hw_device_ctx
AVBufferRef * hw_device_ctx
Definition: avfilter.h:394
AVFrame
Definition: frame.h:295
AVFilterContext::inputs
AVFilterLink ** inputs
array of pointers to input links
Definition: avfilter.h:346
target
EGLContext EGLenum target
Definition: SDL_egl.h:952
avfilter_version
unsigned avfilter_version(void)
AVFilterContext::enable_str
char * enable_str
enable expression string
Definition: avfilter.h:382
avfilter_get_class
const AVClass * avfilter_get_class(void)
AVFilter::activate
int(* activate)(AVFilterContext *ctx)
Definition: avfilter.h:327
AVFilterInOut::pad_idx
int pad_idx
Definition: avfilter.h:1011
AVFilterContext::priv
void * priv
private data for use by the filter
Definition: avfilter.h:353
AVFilter::process_command
int(* process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags)
Definition: avfilter.h:306
AVFilterInternal
struct AVFilterInternal AVFilterInternal
Definition: avfilter.h:335
AVFilter::uninit
void(* uninit)(AVFilterContext *ctx)
Definition: avfilter.h:258