FFmpeg
Loading...
Searching...
No Matches
bsfgraph.c File Reference
#include "config.h"
#include <stddef.h>
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "bsf_internal.h"

Go to the source code of this file.

Macros

#define OFFSET(x)
 
#define FLAGS   (AV_OPT_FLAG_BSF_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

AVBitStreamFilterGraphav_bsf_graph_alloc (void)
 Allocate a filter graph.
 
void ff_bsf_graph_remove_filter (AVBitStreamFilterGraph *graph, AVBitStreamFilterContext *filter)
 Remove a filter from a graph;.
 
AVBitStreamFilterContextav_bsf_graph_get_filter (AVBitStreamFilterGraph *graph, const char *name)
 Get a filter instance identified by instance name from graph.
 
void av_bsf_graph_free (AVBitStreamFilterGraph **graphp)
 Free a graph, destroy its links, and set *graph to NULL.
 
int av_bsf_graph_create_filter (AVBitStreamFilterContext **filt_ctx, const AVBitStreamFilter *filt, const char *name, AVDictionary **options, AVBitStreamFilterGraph *graph_ctx)
 A convenience wrapper that allocates and initializes a filter in a single step.
 
int av_bsf_graph_alloc_filter (AVBitStreamFilterContext **filt_ctx, const AVBitStreamFilter *filter, const char *name, AVBitStreamFilterGraph *graph)
 Create a new filter instance in a filter graph.
 
static int graph_check_validity (AVBitStreamFilterGraph *graph, void *log_ctx)
 Check for the validity of graph.
 
static int graph_config_links (AVBitStreamFilterGraph *graph, void *log_ctx)
 Configure all the links of graphctx.
 
static int graph_config_pointers (AVBitStreamFilterGraph *graph, void *log_ctx)
 
int av_bsf_graph_config (AVBitStreamFilterGraph *graphctx, void *log_ctx)
 Check validity and configure all the links and formats in the graph.
 
static void heap_bubble_up (FFBitStreamFilterGraph *graph, BitStreamFilterLinkInternal *li, int index)
 
static void heap_bubble_down (FFBitStreamFilterGraph *graph, BitStreamFilterLinkInternal *li, int index)
 
void ff_bsf_graph_update_heap (AVBitStreamFilterGraph *graph, BitStreamFilterLinkInternal *li)
 
int ff_bsf_graph_run_once (AVBitStreamFilterGraph *graph)
 Run one round of processing on a filter graph.
 
int av_bsf_graph_source_needs_input (const AVBitStreamFilterGraph *graph)
 Get the index of the source filter in the filtergraph that reported needing input more urgently.
 

Variables

static const AVOption filtergraph_options []
 
static const AVClass filtergraph_class
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 32 of file bsfgraph.c.

◆ FLAGS

Definition at line 33 of file bsfgraph.c.

Function Documentation

◆ ff_bsf_graph_remove_filter()

void ff_bsf_graph_remove_filter ( AVBitStreamFilterGraph * graph,
AVBitStreamFilterContext * filter )

Remove a filter from a graph;.

Definition at line 64 of file bsfgraph.c.

Referenced by ff_bsf_free().

◆ graph_check_validity()

static int graph_check_validity ( AVBitStreamFilterGraph * graph,
void * log_ctx )
static

Check for the validity of graph.

A graph is considered valid if all its input and output pads are connected.

Returns
>= 0 in case of success, a negative value otherwise

Definition at line 177 of file bsfgraph.c.

Referenced by av_bsf_graph_config().

◆ graph_config_links()

static int graph_config_links ( AVBitStreamFilterGraph * graph,
void * log_ctx )
static

Configure all the links of graphctx.

Returns
>= 0 in case of success, a negative value otherwise

Definition at line 215 of file bsfgraph.c.

Referenced by av_bsf_graph_config().

◆ graph_config_pointers()

static int graph_config_pointers ( AVBitStreamFilterGraph * graph,
void * log_ctx )
static

Definition at line 232 of file bsfgraph.c.

Referenced by av_bsf_graph_config().

◆ heap_bubble_up()

static void heap_bubble_up ( FFBitStreamFilterGraph * graph,
BitStreamFilterLinkInternal * li,
int index )
static

Definition at line 310 of file bsfgraph.c.

Referenced by ff_bsf_graph_update_heap().

◆ heap_bubble_down()

static void heap_bubble_down ( FFBitStreamFilterGraph * graph,
BitStreamFilterLinkInternal * li,
int index )
static

Definition at line 329 of file bsfgraph.c.

Referenced by ff_bsf_graph_update_heap().

◆ ff_bsf_graph_update_heap()

void ff_bsf_graph_update_heap ( AVBitStreamFilterGraph * graph,
BitStreamFilterLinkInternal * li )

Definition at line 353 of file bsfgraph.c.

Referenced by update_link_current_pts().

◆ ff_bsf_graph_run_once()

int ff_bsf_graph_run_once ( AVBitStreamFilterGraph * graph)

Run one round of processing on a filter graph.

Definition at line 361 of file bsfgraph.c.

Referenced by av_bsf_sink_get_packet(), and push_packet().

Variable Documentation

◆ filtergraph_options

const AVOption filtergraph_options[]
static
Initial value:
= {
{"max_buffered_packets" , "maximum number of buffered packets allowed", OFFSET(max_buffered_packets),
AV_OPT_TYPE_UINT, {.i64 = 0}, 0, UINT_MAX, FLAGS },
{ NULL },
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
Definition opt.h:334

Definition at line 34 of file bsfgraph.c.

◆ filtergraph_class

const AVClass filtergraph_class
static
Initial value:
= {
.class_name = "AVBitStreamFilterGraph",
.item_name = av_default_item_name,
}
static const AVOption filtergraph_options[]
Definition bsfgraph.c:34
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
@ AV_CLASS_CATEGORY_BITSTREAM_FILTER
Definition log.h:37

Definition at line 40 of file bsfgraph.c.

Referenced by av_bsf_graph_alloc(), and avfilter_graph_alloc().