Libav
Data Structures | Macros | Functions
internal.h File Reference

internal API functions More...

#include "libavutil/internal.h"
#include "avfilter.h"
#include "thread.h"
#include "version.h"

Go to the source code of this file.

Data Structures

struct  AVFilterGraphInternal
 
struct  AVFilterInternal
 

Macros

#define FF_DPRINTF_START(ctx, func)   av_dlog(NULL, "%-16s: ", #func)
 

Functions

void ff_avfilter_default_free_buffer (AVFilterBuffer *buf)
 default handler for freeing audio/video buffer when there are no references left More...
 
int ff_fmt_is_in (int fmt, const int *fmts)
 Tell is a format is contained in the provided list terminated by -1. More...
 
void ff_dlog_link (void *ctx, AVFilterLink *link, int end)
 
void ff_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad)
 Insert a new pad. More...
 
static void ff_insert_inpad (AVFilterContext *f, unsigned index, AVFilterPad *p)
 Insert a new input pad for the filter. More...
 
static void ff_insert_outpad (AVFilterContext *f, unsigned index, AVFilterPad *p)
 Insert a new output pad for the filter. More...
 
int ff_poll_frame (AVFilterLink *link)
 Poll a frame from the filter chain. More...
 
int ff_request_frame (AVFilterLink *link)
 Request an input frame from the filter at the other end of the link. More...
 
int ff_filter_frame (AVFilterLink *link, AVFrame *frame)
 Send a frame of data to the next filter. More...
 
AVFilterContextff_filter_alloc (const AVFilter *filter, const char *inst_name)
 Allocate a new filter context and return it. More...
 
void ff_filter_graph_remove_filter (AVFilterGraph *graph, AVFilterContext *filter)
 Remove a filter from a graph;. More...
 

Detailed Description

internal API functions

Definition in file internal.h.

Macro Definition Documentation

#define FF_DPRINTF_START (   ctx,
  func 
)    av_dlog(NULL, "%-16s: ", #func)

Definition at line 148 of file internal.h.

Referenced by ff_filter_frame(), ff_get_video_buffer(), and ff_request_frame().

Function Documentation

void ff_avfilter_default_free_buffer ( AVFilterBuffer *  buf)

default handler for freeing audio/video buffer when there are no references left

Definition at line 30 of file buffer.c.

Referenced by avfilter_get_audio_buffer_ref_from_arrays(), and avfilter_get_video_buffer_ref_from_arrays().

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 154 of file formats.c.

Referenced by config_props().

void ff_dlog_link ( void ctx,
AVFilterLink link,
int  end 
)

Definition at line 225 of file avfilter.c.

Referenced by ff_filter_frame(), ff_get_video_buffer(), and ff_request_frame().

void ff_insert_pad ( unsigned  idx,
unsigned *  count,
size_t  padidx_off,
AVFilterPad **  pads,
AVFilterLink ***  links,
AVFilterPad newpad 
)

Insert a new pad.

Parameters
idxInsertion point. Pad is inserted at the end if this point is beyond the end of the list of pads.
countPointer to the number of pads in the list
padidx_offOffset within an AVFilterLink structure to the element to increment when inserting a new pad causes link numbering to change
padsPointer to the pointer to the beginning of the list of pads
linksPointer to the pointer to the beginning of the list of links
newpadThe new pad to add. A copy is made when adding.

Definition at line 54 of file avfilter.c.

Referenced by ff_insert_inpad(), and ff_insert_outpad().

static void ff_insert_inpad ( AVFilterContext f,
unsigned  index,
AVFilterPad p 
)
inlinestatic

Insert a new input pad for the filter.

Definition at line 170 of file internal.h.

Referenced by init(), and join_init().

static void ff_insert_outpad ( AVFilterContext f,
unsigned  index,
AVFilterPad p 
)
inlinestatic

Insert a new output pad for the filter.

Definition at line 183 of file internal.h.

Referenced by init(), and split_init().

int ff_poll_frame ( AVFilterLink link)

Poll a frame from the filter chain.

Parameters
linkthe input link
Returns
the number of immediately available frames, a negative number in case of error

Definition at line 260 of file avfilter.c.

Referenced by compat_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.

Parameters
linkthe input link
Returns
zero on success

Definition at line 249 of file avfilter.c.

Referenced by av_buffersink_get_frame(), av_buffersink_get_samples(), ff_request_frame(), join_request_frame(), poll_frame(), request_frame(), request_samples(), and return_audio_frame().

int ff_filter_frame ( AVFilterLink link,
AVFrame frame 
)

Send a frame of data to the next filter.

Parameters
linkthe output link over which the data is being sent
framea 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.
Returns
>= 0 on success, a negative AVERROR on error. The receiving filter is responsible for unreferencing frame in case of error.

Definition at line 733 of file avfilter.c.

Referenced by channelmap_filter_frame(), color_request_frame(), compand_delay(), compand_drain(), compand_nodelay(), default_filter_frame(), filter_frame(), join_request_frame(), output_frame(), request_frame(), return_audio_frame(), return_frame(), shuffleplanes_filter_frame(), and source_request_frame().

AVFilterContext* ff_filter_alloc ( const AVFilter filter,
const char *  inst_name 
)

Allocate a new filter context and return it.

Parameters
filterwhat filter to create an instance of
inst_namename to give to the new filter context
Returns
newly created filter context or NULL on failure

Definition at line 395 of file avfilter.c.

Referenced by avfilter_graph_alloc_filter(), and avfilter_open().

void ff_filter_graph_remove_filter ( AVFilterGraph graph,
AVFilterContext filter 
)

Remove a filter from a graph;.

Definition at line 89 of file avfiltergraph.c.

Referenced by avfilter_free().