FFmpeg
|
internal API functions More...
#include "libavutil/internal.h"
#include "avfilter.h"
#include "avfiltergraph.h"
#include "formats.h"
#include "thread.h"
#include "version.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | AVFilterPool |
struct | AVFilterCommand |
struct | AVFilterPad |
A filter pad used for either input or output. More... | |
struct | AVFilterGraphInternal |
struct | AVFilterInternal |
Macros | |
#define | POOL_SIZE 32 |
#define | ff_tlog(pctx,...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0) |
#define | FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func) |
#define | AVFILTER_DEFINE_CLASS(fname) |
#define | FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads)) |
Find the index of a link. | |
#define | FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads)) |
Enumerations | |
enum | { FF_LINK_FLAG_REQUEST_LOOP = 1 } |
Flags for AVFilterLink.flags. More... | |
Functions | |
void | ff_avfilter_graph_update_heap (AVFilterGraph *graph, AVFilterLink *link) |
Update the position of a link in the age heap. | |
int | ff_fmt_is_in (int fmt, const int *fmts) |
Tell is a format is contained in the provided list terminated by -1. | |
int | ff_parse_pixel_format (enum AVPixelFormat *ret, const char *arg, void *log_ctx) |
Parse a pixel format. | |
int | ff_parse_sample_rate (int *ret, const char *arg, void *log_ctx) |
Parse a sample rate. | |
int | ff_parse_time_base (AVRational *ret, const char *arg, void *log_ctx) |
Parse a time base. | |
int | ff_parse_sample_format (int *ret, const char *arg, void *log_ctx) |
Parse a sample format name or a corresponding integer representation. | |
int | ff_parse_channel_layout (int64_t *ret, int *nret, const char *arg, void *log_ctx) |
Parse a channel layout or a corresponding integer representation. | |
void | ff_update_link_current_pts (AVFilterLink *link, int64_t pts) |
void | ff_command_queue_pop (AVFilterContext *filter) |
char * | ff_get_ref_perms_string (char *buf, size_t buf_size, int perms) |
void | ff_tlog_ref (void *ctx, AVFrame *ref, int end) |
void | ff_tlog_link (void *ctx, AVFilterLink *link, int end) |
int | ff_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad) |
Insert a new pad. | |
static int | ff_insert_inpad (AVFilterContext *f, unsigned index, AVFilterPad *p) |
Insert a new input pad for the filter. | |
static int | ff_insert_outpad (AVFilterContext *f, unsigned index, AVFilterPad *p) |
Insert a new output pad for the filter. | |
int | ff_poll_frame (AVFilterLink *link) |
Poll a frame from the filter chain. | |
int | ff_request_frame (AVFilterLink *link) |
Request an input frame from the filter at the other end of the link. | |
AVFilterBufferRef * | ff_copy_buffer_ref (AVFilterLink *outlink, AVFilterBufferRef *ref) |
int | ff_buffersink_read_compat (AVFilterContext *ctx, AVFilterBufferRef **buf) |
int | ff_buffersink_read_samples_compat (AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples) |
int | ff_filter_frame (AVFilterLink *link, AVFrame *frame) |
Send a frame of data to the next filter. | |
AVFilterContext * | ff_filter_alloc (const AVFilter *filter, const char *inst_name) |
Allocate a new filter context and return it. | |
void | ff_filter_graph_remove_filter (AVFilterGraph *graph, AVFilterContext *filter) |
Remove a filter from a graph;. | |
internal API functions
Definition in file internal.h.
#define POOL_SIZE 32 |
Definition at line 35 of file internal.h.
#define ff_tlog | ( | pctx, | |
... | |||
) | do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0) |
Definition at line 238 of file internal.h.
Referenced by ff_filter_frame(), ff_tlog_link(), and ff_tlog_ref().
Definition at line 241 of file internal.h.
Referenced by ff_filter_frame(), ff_get_video_buffer(), and ff_request_frame().
#define AVFILTER_DEFINE_CLASS | ( | fname | ) |
Definition at line 312 of file internal.h.
#define FF_INLINK_IDX | ( | link | ) | ((int)((link)->dstpad - (link)->dst->input_pads)) |
Find the index of a link.
I.e. find i such that link == ctx->(in|out)puts[i]
Definition at line 329 of file internal.h.
Referenced by ff_framesync_filter_frame(), filter_frame(), get_audio_buffer(), get_video_buffer(), and process_frame().
#define FF_OUTLINK_IDX | ( | link | ) | ((int)((link)->srcpad - (link)->src->output_pads)) |
Definition at line 330 of file internal.h.
Referenced by config_output(), movie_config_output_props(), movie_request_frame(), and request_frame().
anonymous enum |
Flags for AVFilterLink.flags.
FF_LINK_FLAG_REQUEST_LOOP |
Frame requests may need to loop in order to be fulfilled. A filter must set this flags on an output link if it may return 0 in request_frame() without filtering a frame. |
Definition at line 351 of file internal.h.
void ff_avfilter_graph_update_heap | ( | AVFilterGraph * | graph, |
AVFilterLink * | link | ||
) |
Update the position of a link in the age heap.
Definition at line 1315 of file avfiltergraph.c.
Referenced by ff_update_link_current_pts().
int ff_fmt_is_in | ( | int | fmt, |
const int * | fmts | ||
) |
Tell is a format is contained in the provided list terminated by -1.
Definition at line 254 of file formats.c.
Referenced by config_input(), config_input_main(), config_input_overlay(), config_out_props(), and config_props().
int ff_parse_pixel_format | ( | enum AVPixelFormat * | ret, |
const char * | arg, | ||
void * | log_ctx | ||
) |
int ff_parse_sample_rate | ( | int * | ret, |
const char * | arg, | ||
void * | log_ctx | ||
) |
int ff_parse_time_base | ( | AVRational * | ret, |
const char * | arg, | ||
void * | log_ctx | ||
) |
Parse a time base.
ret | unsigned AVRational pointer to where the value should be written |
arg | string to parse |
log_ctx | log context |
int ff_parse_sample_format | ( | int * | ret, |
const char * | arg, | ||
void * | log_ctx | ||
) |
Parse a sample format name or a corresponding integer representation.
ret | integer pointer to where the value should be written |
arg | string to parse |
log_ctx | log context |
Definition at line 584 of file formats.c.
Referenced by init().
int ff_parse_channel_layout | ( | int64_t * | ret, |
int * | nret, | ||
const char * | arg, | ||
void * | log_ctx | ||
) |
Parse a channel layout or a corresponding integer representation.
ret | 64bit integer pointer to where the value should be written. |
nret | integer pointer to the number of channels; if not NULL, then unknown channel layouts are accepted |
arg | string to parse |
log_ctx | log context |
Definition at line 622 of file formats.c.
Referenced by init().
void ff_update_link_current_pts | ( | AVFilterLink * | link, |
int64_t | pts | ||
) |
Definition at line 427 of file avfilter.c.
Referenced by ff_filter_frame_framed().
void ff_command_queue_pop | ( | AVFilterContext * | filter | ) |
Definition at line 87 of file avfilter.c.
Referenced by avfilter_free(), and ff_filter_frame_framed().
char* ff_get_ref_perms_string | ( | char * | buf, |
size_t | buf_size, | ||
int | perms | ||
) |
Definition at line 42 of file avfilter.c.
Referenced by ff_filter_frame().
void ff_tlog_link | ( | void * | ctx, |
AVFilterLink * | link, | ||
int | end | ||
) |
Definition at line 311 of file avfilter.c.
Referenced by ff_filter_frame(), ff_get_video_buffer(), and ff_request_frame().
int 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 96 of file avfilter.c.
Referenced by ff_insert_inpad(), and ff_insert_outpad().
|
inlinestatic |
Insert a new input pad for the filter.
Definition at line 268 of file internal.h.
Referenced by decimate_init(), fieldmatch_init(), init(), and join_init().
|
inlinestatic |
Insert a new output pad for the filter.
Definition at line 282 of file internal.h.
Referenced by init(), movie_common_init(), and split_init().
int ff_poll_frame | ( | AVFilterLink * | link | ) |
Poll a frame from the filter chain.
link | the input link |
Definition at line 366 of file avfilter.c.
Referenced by av_buffersink_poll_frame(), and ff_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 335 of file avfilter.c.
Referenced by av_buffersink_get_frame_flags(), avfilter_graph_request_oldest(), ff_framesync_request_frame(), ff_request_frame(), join_request_frame(), request_frame(), request_inlink(), request_samples(), and return_audio_frame().
AVFilterBufferRef* ff_copy_buffer_ref | ( | AVFilterLink * | outlink, |
AVFilterBufferRef * | ref | ||
) |
int ff_buffersink_read_compat | ( | AVFilterContext * | ctx, |
AVFilterBufferRef ** | buf | ||
) |
int ff_buffersink_read_samples_compat | ( | AVFilterContext * | ctx, |
AVFilterBufferRef ** | pbuf, | ||
int | nb_samples | ||
) |
int ff_filter_frame | ( | AVFilterLink * | link, |
AVFrame * | 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 1135 of file avfilter.c.
Referenced by channelmap_filter_frame(), compand_delay(), compand_nodelay(), default_filter_frame(), end_last_frame(), ff_vf_next_put_image(), filter(), filter_frame(), flush(), geq_filter_frame(), join_request_frame(), movie_push_frame(), output_frame(), plot_cqt(), plot_spectrum_column(), pp_filter_frame(), process_frame(), push_frame(), push_samples(), request_frame(), return_audio_frame(), return_frame(), send_out(), send_silence(), and shuffleplanes_filter_frame().
AVFilterContext* ff_filter_alloc | ( | const AVFilter * | filter, |
const char * | inst_name | ||
) |
Allocate a new filter context and return it.
filter | what filter to create an instance of |
inst_name | name to give to the new filter context |
Definition at line 597 of file avfilter.c.
Referenced by avfilter_graph_alloc_filter().
void ff_filter_graph_remove_filter | ( | AVFilterGraph * | graph, |
AVFilterContext * | filter | ||
) |
Remove a filter from a graph;.
Definition at line 94 of file avfiltergraph.c.
Referenced by avfilter_free().