|
FFmpeg
|
Experimental graph-based API for bitstream filters. More...
Modules | |
| Packet source API | |
| The source filter is there to connect filter graphs to applications They have a single output, connected to the graph, and no input. Packets must be fed to it using av_bsf_source_add_packet(). | |
| Packet sink API | |
| The sink filter is there to connect filter graphs to applications They have a single input, connected to the graph, and no output. Packets must be extracted using av_bsf_sink_get_packet(). | |
Data Structures | |
| struct | AVBitStreamFilterContext |
| An instance of a filter. More... | |
| struct | AVBitStreamFilterGraph |
Macros | |
| #define | AV_BSF_FLAG_DYNAMIC_INPUTS (1 << 0) |
| The number of the filter inputs is not determined just by the filter's static inputs. More... | |
| #define | AV_BSF_FLAG_DYNAMIC_OUTPUTS (1 << 1) |
| The number of the filter outputs is not determined just by the filter's static outputs. More... | |
| #define | AV_BSF_FLAG_METADATA_ONLY (1 << 2) |
| The filter is a "metadata" filter - it does not modify the packet data in any way. More... | |
Functions | |
| const char * | av_bsf_pad_get_name (const AVBitStreamFilterPad *pads, int pad_idx) |
| Get the name of an AVBitStreamFilterPad. More... | |
| enum AVCodecID * | av_bsf_pad_get_codec_ids (const AVBitStreamFilterPad *pads, int pad_idx) |
| Get the codec ids supported by an AVBitStreamFilterPad. More... | |
| int | av_bsf_link (AVBitStreamFilterContext *src, unsigned srcpad, AVBitStreamFilterContext *dst, unsigned dstpad) |
| Link two filters together. More... | |
| int | av_bsf_init_str (AVBitStreamFilterContext *ctx, const char *args) |
| Initialize a filter with the supplied parameters. More... | |
| int | av_bsf_init_dict (AVBitStreamFilterContext *ctx, AVDictionary **options) |
| Initialize a filter with the supplied dictionary of options. More... | |
| AVBitStreamFilterGraph * | av_bsf_graph_alloc (void) |
| Allocate a filter graph. More... | |
| 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. More... | |
| 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. More... | |
| AVBitStreamFilterContext * | av_bsf_graph_get_filter (AVBitStreamFilterGraph *graph, const char *name) |
| Get a filter instance identified by instance name from graph. More... | |
| int | av_bsf_graph_config (AVBitStreamFilterGraph *graphctx, void *log_ctx) |
| Check validity and configure all the links and formats in the graph. More... | |
| 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. More... | |
| void | av_bsf_graph_free (AVBitStreamFilterGraph **graph) |
| Free a graph, destroy its links, and set *graph to NULL. More... | |
Experimental graph-based API for bitstream filters.
| #define AV_BSF_FLAG_DYNAMIC_INPUTS (1 << 0) |
| #define AV_BSF_FLAG_DYNAMIC_OUTPUTS (1 << 1) |
| #define AV_BSF_FLAG_METADATA_ONLY (1 << 2) |
The filter is a "metadata" filter - it does not modify the packet data in any way.
It may only affect the metadata (i.e. those fields copied by av_packet_copy_props()).
More precisely, this means that the data of any packet output by the filter must be exactly equal to some packet that is received on one of its inputs. Furthermore, all packets produced on a given output must correspond to packet received on the same input and their order must be unchanged. Note that the filter may still drop or duplicate the frames.
| const char* av_bsf_pad_get_name | ( | const AVBitStreamFilterPad * | pads, |
| int | pad_idx | ||
| ) |
Get the name of an AVBitStreamFilterPad.
| pads | an array of AVBitStreamFilterPads |
| pad_idx | index of the pad in the array; it is the caller's responsibility to ensure the index is valid |
Definition at line 380 of file bitstreamfilter.c.
| enum AVCodecID* av_bsf_pad_get_codec_ids | ( | const AVBitStreamFilterPad * | pads, |
| int | pad_idx | ||
| ) |
Get the codec ids supported by an AVBitStreamFilterPad.
| pads | an array of AVBitStreamFilterPads |
| pad_idx | index of the pad in the array; it is the caller's responsibility to ensure the index is valid |
Definition at line 385 of file bitstreamfilter.c.
| int av_bsf_link | ( | AVBitStreamFilterContext * | src, |
| unsigned | srcpad, | ||
| AVBitStreamFilterContext * | 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 126 of file bitstreamfilter.c.
Referenced by ist_use().
| int av_bsf_init_str | ( | AVBitStreamFilterContext * | ctx, |
| const char * | args | ||
| ) |
Initialize a filter with the supplied parameters.
| ctx | uninitialized filter context to initialize |
| args | Options to initialize the filter with. This must be a ':'-separated list of options in the 'key=value' form. May be NULL if the options have been set directly using the AVOptions API or there are no options that need to be set. |
Definition at line 352 of file bitstreamfilter.c.
| int av_bsf_init_dict | ( | AVBitStreamFilterContext * | ctx, |
| AVDictionary ** | options | ||
| ) |
Initialize a filter with the supplied dictionary of options.
| ctx | uninitialized filter context to initialize |
| options | An AVDictionary filled with options for this filter. On return this parameter will be destroyed and replaced with a dict containing options that were not found. This dictionary must be freed by the caller. May be NULL, then this function is equivalent to av_bsf_init_str() with the second parameter set to NULL. |
Definition at line 326 of file bitstreamfilter.c.
Referenced by av_bsf_graph_create_filter(), av_bsf_init_str(), and ist_use().
| AVBitStreamFilterGraph* av_bsf_graph_alloc | ( | void | ) |
Allocate a filter graph.
Definition at line 48 of file bsfgraph.c.
Referenced by istg_parse_lcevc().
| 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.
| [out] | filt_ctx | A pointer into which the pointer to the newly-allocated context will be written on success. May be NULL. Note that it is also retrievable directly through AVBitStreamFilterGraph.filters or with av_bsf_graph_get_filter(). |
| [in] | filter | the filter to create an instance of |
| [in] | name | Name to give to the new instance (will be copied to AVBitStreamFilterContext.name). This may be used by the caller to identify different filters, libavcodec itself assigns no semantics to this parameter. May be NULL. |
| [in] | graph | graph in which the new filter will be used |
Definition at line 139 of file bsfgraph.c.
Referenced by av_bsf_graph_create_filter(), and istg_parse_lcevc().
| 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.
The filter instance is created from the filter filt and inited with the parameter args.
| [out] | filt_ctx | A pointer into which the pointer to the newly-allocated context will be written on success. May be NULL. Note that it is also retrievable directly through AVBitStreamFilterGraph.filters or with av_bsf_graph_get_filter(). |
| [in] | name | the instance name to give to the created filter instance |
| [in] | graph_ctx | the filter graph |
Definition at line 113 of file bsfgraph.c.
| AVBitStreamFilterContext* av_bsf_graph_get_filter | ( | AVBitStreamFilterGraph * | graph, |
| const char * | name | ||
| ) |
Get a filter instance identified by instance name from graph.
| graph | filter graph to search through. |
| name | filter instance name (should be unique in the graph). |
Definition at line 82 of file bsfgraph.c.
Referenced by ist_use().
| int av_bsf_graph_config | ( | AVBitStreamFilterGraph * | graphctx, |
| void * | log_ctx | ||
| ) |
Check validity and configure all the links and formats in the graph.
| graphctx | the filter graph |
| log_ctx | context used for logging |
Definition at line 294 of file bsfgraph.c.
Referenced by ist_use().
| 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.
Definition at line 383 of file bsfgraph.c.
| void av_bsf_graph_free | ( | AVBitStreamFilterGraph ** | graph | ) |
Free a graph, destroy its links, and set *graph to NULL.
If *graph is NULL, do nothing.
Definition at line 93 of file bsfgraph.c.
Referenced by istg_free().
1.8.17