#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
#include "libavutil/rational.h"
#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "audio.h"
Go to the source code of this file.
Defines | |
#define | LICENSE_PREFIX "libavfilter license: " |
#define | MAX_REGISTERED_AVFILTERS_NB 128 |
Functions | |
char * | ff_get_ref_perms_string (char *buf, size_t buf_size, int perms) |
void | ff_tlog_ref (void *ctx, AVFilterBufferRef *ref, int end) |
unsigned | avfilter_version (void) |
Return the LIBAVFILTER_VERSION_INT constant. | |
const char * | avfilter_configuration (void) |
Return the libavfilter build-time configuration. | |
const char * | avfilter_license (void) |
Return the libavfilter license. | |
void | ff_command_queue_pop (AVFilterContext *filter) |
void | ff_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad) |
Insert a new pad. | |
int | avfilter_link (AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) |
Link two filters together. | |
void | avfilter_link_free (AVFilterLink **link) |
Free the link in *link, and set its pointer to NULL. | |
void | avfilter_link_set_closed (AVFilterLink *link, int closed) |
Set the closed field of a link. | |
int | avfilter_insert_filter (AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx) |
Insert a filter in the middle of an existing link. | |
int | avfilter_config_links (AVFilterContext *filter) |
Negotiate the media format, dimensions, etc of all inputs to a filter. | |
void | ff_tlog_link (void *ctx, AVFilterLink *link, int end) |
int | ff_request_frame (AVFilterLink *link) |
Request an input frame from the filter at the other end of the link. | |
int | ff_poll_frame (AVFilterLink *link) |
Poll a frame from the filter chain. | |
void | ff_update_link_current_pts (AVFilterLink *link, int64_t pts) |
int | avfilter_process_command (AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags) |
Make the filter instance process a command. | |
AVFilter * | avfilter_get_by_name (const char *name) |
Get a filter definition matching the given name. | |
int | avfilter_register (AVFilter *filter) |
Register a filter. | |
AVFilter ** | av_filter_next (AVFilter **filter) |
If filter is NULL, returns a pointer to the first registered filter pointer, if filter is non-NULL, returns the next pointer after filter. | |
void | avfilter_uninit (void) |
Uninitialize the filter system. | |
static int | pad_count (const AVFilterPad *pads) |
static const char * | default_filter_name (void *filter_ctx) |
static void * | filter_child_next (void *obj, void *prev) |
static const AVClass * | filter_child_class_next (const AVClass *prev) |
const AVClass * | avfilter_get_class (void) |
Get the class for the AVFilterContext struct. | |
int | avfilter_open (AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name) |
Create a filter instance. | |
void | avfilter_free (AVFilterContext *filter) |
Free a filter context. | |
int | avfilter_init_filter (AVFilterContext *filter, const char *args, void *opaque) |
Initialize a filter. | |
const char * | avfilter_pad_get_name (AVFilterPad *pads, int pad_idx) |
Get the name of an AVFilterPad. | |
enum AVMediaType | avfilter_pad_get_type (AVFilterPad *pads, int pad_idx) |
Get the type of an AVFilterPad. | |
Variables | |
static AVFilter * | registered_avfilters [MAX_REGISTERED_AVFILTERS_NB+1] |
static int | next_registered_avfilter_idx = 0 |
static const AVClass | avfilter_class |
#define LICENSE_PREFIX "libavfilter license: " |
#define MAX_REGISTERED_AVFILTERS_NB 128 |
If filter is NULL, returns a pointer to the first registered filter pointer, if filter is non-NULL, returns the next pointer after filter.
If the returned pointer points to NULL, the last registered filter was already reached.
Definition at line 424 of file avfilter.c.
Referenced by filter_child_class_next(), and show_filters().
int avfilter_config_links | ( | AVFilterContext * | filter | ) |
Negotiate the media format, dimensions, etc of all inputs to a filter.
filter | the filter to negotiate the properties for its inputs |
Definition at line 207 of file avfilter.c.
Referenced by avfilter_config_links(), and graph_config_links().
const char* avfilter_configuration | ( | void | ) |
void avfilter_free | ( | AVFilterContext * | filter | ) |
Free a filter context.
filter | the filter to free |
Definition at line 556 of file avfilter.c.
Referenced by avfilter_graph_create_filter(), avfilter_graph_free(), avfilter_graph_parse(), avfilter_graph_parse2(), create_filter(), and main().
AVFilter* avfilter_get_by_name | ( | const char * | name | ) |
Get a filter definition matching the given name.
name | the filter name to find |
Definition at line 399 of file avfilter.c.
Referenced by configure_input_audio_filter(), configure_input_video_filter(), configure_output_audio_filter(), configure_output_video_filter(), create_filter(), graph_insert_fifos(), init_filters(), insert_conv_filter(), lavfi_read_header(), main(), and query_formats().
const AVClass* avfilter_get_class | ( | void | ) |
Get the class for the AVFilterContext struct.
Definition at line 489 of file avfilter.c.
Referenced by show_help_default().
int avfilter_init_filter | ( | AVFilterContext * | filter, | |
const char * | args, | |||
void * | opaque | |||
) |
Initialize a filter.
filter | the filter to initialize | |
args | A string of parameters to use when initializing the filter. The format and meaning of this string varies by filter. | |
opaque | Any extra non-string data needed by the filter. The meaning of this parameter varies by filter. |
Definition at line 606 of file avfilter.c.
Referenced by avfilter_graph_create_filter(), create_filter(), and main().
int avfilter_insert_filter | ( | AVFilterLink * | link, | |
AVFilterContext * | filt, | |||
unsigned | filt_srcpad_idx, | |||
unsigned | filt_dstpad_idx | |||
) |
Insert a filter in the middle of an existing link.
link | the link into which the filter should be inserted | |
filt | the filter to be inserted | |
filt_srcpad_idx | the input pad on the filter to connect | |
filt_dstpad_idx | the output pad on the filter to connect |
Definition at line 169 of file avfilter.c.
Referenced by graph_insert_fifos(), insert_conv_filter(), and query_formats().
const char* avfilter_license | ( | void | ) |
int avfilter_link | ( | AVFilterContext * | src, | |
unsigned | srcpad, | |||
AVFilterContext * | dst, | |||
unsigned | dstpad | |||
) |
Link two filters together.
src | the source filter | |
srcpad | index of the output pad on the source filter | |
dst | the destination filter | |
dstpad | index of the input pad on the destination filter |
Definition at line 120 of file avfilter.c.
Referenced by avfilter_graph_parse(), avfilter_insert_filter(), configure_input_audio_filter(), configure_input_video_filter(), configure_output_audio_filter(), configure_output_video_filter(), lavfi_read_header(), and link_filter().
void avfilter_link_free | ( | AVFilterLink ** | link | ) |
Free the link in *link, and set its pointer to NULL.
Definition at line 151 of file avfilter.c.
Referenced by avfilter_free().
void avfilter_link_set_closed | ( | AVFilterLink * | link, | |
int | closed | |||
) |
int avfilter_open | ( | AVFilterContext ** | filter_ctx, | |
AVFilter * | filter, | |||
const char * | inst_name | |||
) |
Create a filter instance.
filter_ctx | put here a pointer to the created filter context on success, NULL on failure | |
filter | the filter to create an instance of | |
inst_name | Name to give to the new instance. Can be NULL for none. |
Definition at line 494 of file avfilter.c.
Referenced by avfilter_graph_create_filter(), create_filter(), and main().
const char* avfilter_pad_get_name | ( | AVFilterPad * | pads, | |
int | pad_idx | |||
) |
Get the name of an AVFilterPad.
pads | an array of AVFilterPads | |
pad_idx | index of the pad in the array it; is the caller's responsibility to ensure the index is valid |
Definition at line 617 of file avfilter.c.
enum AVMediaType avfilter_pad_get_type | ( | AVFilterPad * | pads, | |
int | pad_idx | |||
) |
Get the type of an AVFilterPad.
pads | an array of AVFilterPads | |
pad_idx | index of the pad in the array; it is the caller's responsibility to ensure the index is valid |
Definition at line 622 of file avfilter.c.
Referenced by configure_input_filter(), configure_output_filter(), init_input_filter(), init_output_filter(), and opt_output_file().
int avfilter_process_command | ( | AVFilterContext * | filter, | |
const char * | cmd, | |||
const char * | arg, | |||
char * | res, | |||
int | res_len, | |||
int | flags | |||
) |
Make the filter instance process a command.
It is recommended to use avfilter_graph_send_command().
Definition at line 382 of file avfilter.c.
Referenced by avfilter_graph_send_command(), and ff_start_frame().
Register a filter.
This is only needed if you plan to use avfilter_get_by_name later to lookup the AVFilter structure by name. A filter can still by instantiated with avfilter_open even if it is not registered.
filter | the filter to register |
Definition at line 410 of file avfilter.c.
Referenced by avfilter_register_all().
void avfilter_uninit | ( | void | ) |
Uninitialize the filter system.
Unregister all filters.
Definition at line 429 of file avfilter.c.
Referenced by do_exit(), and exit_program().
unsigned avfilter_version | ( | void | ) |
static const char* default_filter_name | ( | void * | filter_ctx | ) | [static] |
Definition at line 446 of file avfilter.c.
void ff_command_queue_pop | ( | AVFilterContext * | filter | ) |
char* ff_get_ref_perms_string | ( | char * | buf, | |
size_t | buf_size, | |||
int | perms | |||
) |
void ff_insert_pad | ( | unsigned | idx, | |
unsigned * | count, | |||
size_t | padidx_off, | |||
AVFilterPad ** | pads, | |||
AVFilterLink *** | links, | |||
AVFilterPad * | newpad | |||
) |
Insert a new pad.
idx | Insertion point. Pad is inserted at the end if this point is beyond the end of the list of pads. | |
count | Pointer to the number of pads in the list | |
padidx_off | Offset within an AVFilterLink structure to the element to increment when inserting a new pad causes link numbering to change | |
pads | Pointer to the pointer to the beginning of the list of pads | |
links | Pointer to the pointer to the beginning of the list of links | |
newpad | The new pad to add. A copy is made when adding. |
Definition at line 99 of file avfilter.c.
Referenced by ff_insert_inpad(), and ff_insert_outpad().
int ff_poll_frame | ( | AVFilterLink * | link | ) |
Poll a frame from the filter chain.
link | the input link |
Definition at line 354 of file avfilter.c.
Referenced by av_buffersink_poll_frame(), ff_buffersink_read_compat(), ff_poll_frame(), and poll_frame().
int ff_request_frame | ( | AVFilterLink * | link | ) |
Request an input frame from the filter at the other end of the link.
link | the input link |
Definition at line 332 of file avfilter.c.
Referenced by av_buffersink_get_buffer_ref(), avfilter_graph_request_oldest(), ff_buffersink_read_compat(), ff_request_frame(), join_request_frame(), poll_frame(), request_frame(), request_samples(), and return_audio_frame().
void ff_tlog_link | ( | void * | ctx, | |
AVFilterLink * | link, | |||
int | end | |||
) |
Definition at line 308 of file avfilter.c.
Referenced by ff_draw_slice(), ff_filter_samples_framed(), ff_get_video_buffer(), ff_request_frame(), and ff_start_frame().
void ff_tlog_ref | ( | void * | ctx, | |
AVFilterBufferRef * | ref, | |||
int | end | |||
) |
Definition at line 46 of file avfilter.c.
Referenced by ff_get_video_buffer(), and ff_start_frame().
void ff_update_link_current_pts | ( | AVFilterLink * | link, | |
int64_t | pts | |||
) |
Definition at line 372 of file avfilter.c.
Referenced by ff_filter_samples_framed(), and ff_start_frame().
Definition at line 460 of file avfilter.c.
static void* filter_child_next | ( | void * | obj, | |
void * | prev | |||
) | [static] |
Definition at line 452 of file avfilter.c.
static int pad_count | ( | const AVFilterPad * | pads | ) | [static] |
const AVClass avfilter_class [static] |
Initial value:
{ .class_name = "AVFilter", .item_name = default_filter_name, .version = LIBAVUTIL_VERSION_INT, .category = AV_CLASS_CATEGORY_FILTER, .child_next = filter_child_next, .child_class_next = filter_child_class_next, }
Definition at line 480 of file avfilter.c.
int next_registered_avfilter_idx = 0 [static] |
Definition at line 397 of file avfilter.c.
Referenced by avfilter_register(), and avfilter_uninit().
AVFilter* registered_avfilters[MAX_REGISTERED_AVFILTERS_NB+1] [static] |
Definition at line 395 of file avfilter.c.