#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/rational.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Go to the source code of this file.
Macros | |
#define | LICENSE_PREFIX "libavfilter license: " |
#define | MAX_REGISTERED_AVFILTERS_NB 64 |
Functions | |
unsigned | avfilter_version (void) |
Return the LIBAVFILTER_VERSION_INT constant. More... | |
const char * | avfilter_configuration (void) |
Return the libavfilter build-time configuration. More... | |
const char * | avfilter_license (void) |
Return the libavfilter license. More... | |
void | ff_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad) |
Insert a new pad. More... | |
int | avfilter_link (AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) |
Link two filters together. More... | |
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. More... | |
int | avfilter_config_links (AVFilterContext *filter) |
Negotiate the media format, dimensions, etc of all inputs to a filter. More... | |
void | ff_dlog_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. More... | |
int | ff_poll_frame (AVFilterLink *link) |
Poll a frame from the filter chain. More... | |
AVFilter * | avfilter_get_by_name (const char *name) |
Get a filter definition matching the given name. More... | |
int | avfilter_register (AVFilter *filter) |
Register a filter. More... | |
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. More... | |
void | avfilter_uninit (void) |
Uninitialize the filter system. More... | |
static int | pad_count (const AVFilterPad *pads) |
static const char * | filter_name (void *p) |
int | avfilter_open (AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name) |
Create a filter instance. More... | |
void | avfilter_free (AVFilterContext *filter) |
Free a filter context. More... | |
int | avfilter_init_filter (AVFilterContext *filter, const char *args, void *opaque) |
Initialize a filter. More... | |
const char * | avfilter_pad_get_name (AVFilterPad *pads, int pad_idx) |
Get the name of an AVFilterPad. More... | |
enum AVMediaType | avfilter_pad_get_type (AVFilterPad *pads, int pad_idx) |
Get the type of an AVFilterPad. More... | |
static int | default_filter_frame (AVFilterLink *link, AVFilterBufferRef *frame) |
int | ff_filter_frame (AVFilterLink *link, AVFilterBufferRef *frame) |
Send a frame of data to the next filter. More... | |
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 64 |
Definition at line 268 of file avfilter.c.
Referenced by avfilter_register().
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 294 of file avfilter.c.
Referenced by 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 140 of file avfilter.c.
Referenced by avfilter_config_links(), and graph_config_links().
const char* avfilter_configuration | ( | void | ) |
Return the libavfilter build-time configuration.
Definition at line 41 of file avfilter.c.
void avfilter_free | ( | AVFilterContext * | filter) |
Free a filter context.
filter | the filter to free |
Definition at line 391 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 274 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(), main(), and query_formats().
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 435 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 103 of file avfilter.c.
Referenced by graph_insert_fifos(), and query_formats().
const char* avfilter_license | ( | void | ) |
Return the libavfilter license.
Definition at line 46 of file avfilter.c.
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 73 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(), and link_filter().
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 329 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 444 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 449 of file avfilter.c.
Referenced by configure_input_filter(), configure_output_filter(), init_input_filter(), init_output_filter(), and open_output_file().
int avfilter_register | ( | AVFilter * | filter) |
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 285 of file avfilter.c.
Uninitialize the filter system.
Unregister all filters.
Definition at line 299 of file avfilter.c.
Referenced by do_exit(), and exit_program().
unsigned avfilter_version | ( | void | ) |
Return the LIBAVFILTER_VERSION_INT constant.
Definition at line 37 of file avfilter.c.
|
static |
Definition at line 454 of file avfilter.c.
Referenced by ff_filter_frame().
void ff_dlog_link | ( | void * | ctx, |
AVFilterLink * | link, | ||
int | end | ||
) |
Definition at line 215 of file avfilter.c.
Referenced by ff_filter_frame(), ff_get_video_buffer(), and ff_request_frame().
int ff_filter_frame | ( | AVFilterLink * | link, |
AVFilterBufferRef * | frame | ||
) |
Send a frame of data to the next filter.
link | the output link over which the data is being sent |
frame | a reference to the buffer of data being sent. The receiving filter will free this reference when it no longer needs it or pass it on to the next filter. |
Definition at line 459 of file avfilter.c.
Referenced by channelmap_filter_frame(), color_request_frame(), default_filter_frame(), filter_frame(), join_request_frame(), output_frame(), request_frame(), return_audio_frame(), and return_frame().
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 52 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 250 of file avfilter.c.
Referenced by av_buffersink_read(), 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 239 of file avfilter.c.
Referenced by av_buffersink_read(), ff_request_frame(), join_request_frame(), poll_frame(), request_frame(), request_samples(), and return_audio_frame().
|
static |
Definition at line 316 of file avfilter.c.
Referenced by main().
|
static |
Definition at line 305 of file avfilter.c.
Referenced by avfilter_open().
|
static |
Definition at line 322 of file avfilter.c.
Referenced by avfilter_open().
|
static |
Definition at line 272 of file avfilter.c.
Referenced by avfilter_register(), and avfilter_uninit().
|
static |
Definition at line 270 of file avfilter.c.