Go to the documentation of this file.
388 #define AV_BSF_FLAG_DYNAMIC_INPUTS (1 << 0)
394 #define AV_BSF_FLAG_DYNAMIC_OUTPUTS (1 << 1)
406 #define AV_BSF_FLAG_METADATA_ONLY (1 << 2)
708 #endif // AVCODEC_BSF_H
AVCodecParameters * par_in
Parameters of the input stream.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
This struct describes the properties of an encoded stream.
A filter pad used for either input or output.
const AVCodecParameters * av_bsf_sink_get_parameters(const AVBitStreamFilterContext *ctx)
struct AVBitStreamFilterGraph * graph
filtergraph this filter belongs to
const struct AVBitStreamFilter * filter
The bitstream filter this context is an instance of.
const AVClass * av_class
A class for logging and AVOptions.
void(* filter)(uint8_t *src, int stride, int qscale)
const AVClass * av_class
A class for logging and AVOptions.
void av_bsf_free(AVBSFContext **ctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
The bitstream filter state.
int av_bsf_source_close(AVBitStreamFilterContext *ctx, int64_t pts, unsigned flags)
Close the source after EOF.
AVBitStreamFilterLink ** inputs
array of pointers to input links
AVCodecParameters * par_out
Parameters of the output stream.
const char * av_bsf_pad_get_name(const AVBitStreamFilterPad *pads, int pad_idx)
Get the name of an AVBitStreamFilterPad.
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.
@ AV_BSF_SINK_FLAG_NO_REQUEST
Tell av_bsf_sink_get_packet() not to request a packet from its input.
void av_bsf_flush(AVBSFContext *ctx)
Reset the internal bitstream filter state.
AVBitStreamFilterPad * input_pads
array of input pads
@ AV_BSF_SOURCE_FLAG_PUSH
Immediately push the packet to the output.
void av_bsf_list_free(AVBSFList **lst)
Free list of bitstream filters.
unsigned max_buffered_packets
Sets the maximum number of buffered packets in the filtergraph combined.
static AVFormatContext * ctx
AVRational time_base_in
The timebase used for the timestamps of the input packets.
AVRational av_bsf_sink_get_time_base(const AVBitStreamFilterContext *ctx)
int av_bsf_link(AVBitStreamFilterContext *src, unsigned srcpad, AVBitStreamFilterContext *dst, unsigned dstpad)
Link two filters together.
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx)
Allocate a context for a given bitstream filter.
enum AVCodecID * codec_ids
A list of codec ids supported by the filter, terminated by AV_CODEC_ID_NONE.
int av_bsf_source_parameters_set(AVBitStreamFilterContext *ctx, const AVCodecParameters *par)
Initialize the source filter with the provided parameters.
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.
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Describe the class of an AVClass context structure.
const AVClass * av_bsf_get_class(void)
Get the AVClass for AVBSFContext.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
Rational number (pair of numerator and denominator).
AVBitStreamFilterContext ** filters
const AVClass * priv_class
A class for the private data, used to declare bitstream filter private AVOptions.
AVBitStreamFilterGraph * av_bsf_graph_alloc(void)
Allocate a filter graph.
@ AV_BSF_SOURCE_FLAG_KEEP_REF
Keep a reference to the packet.
AVCodecID
Identify the syntax and semantics of the bitstream.
char * name
name of this filter instance
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
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.
int av_bsf_source_get_status(AVBitStreamFilterContext *ctx)
Returns 0 or a negative AVERROR code.
int av_bsf_list_append2(AVBSFList *lst, const char *bsf_name, AVDictionary **options)
Construct new bitstream filter context given it's name and options and append it to the list of bitst...
enum AVCodecID * av_bsf_pad_get_codec_ids(const AVBitStreamFilterPad *pads, int pad_idx)
Get the codec ids supported by an AVBitStreamFilterPad.
unsigned nb_inputs
number of input pads
int av_bsf_graph_config(AVBitStreamFilterGraph *graphctx, void *log_ctx)
Check validity and configure all the links and formats in the graph.
void av_bsf_graph_free(AVBitStreamFilterGraph **graph)
Free a graph, destroy its links, and set *graph to NULL.
static const int8_t filt[NUMTAPS *2]
AVRational time_base_out
The timebase used for the timestamps of the output packets.
AVBSFList * av_bsf_list_alloc(void)
Allocate empty list of bitstream filters.
void * priv_data
Opaque filter-specific private data.
const AVBitStreamFilter * av_bsf_iterate(void **opaque)
Iterate over all registered bitstream filters.
int av_bsf_get_null_filter(AVBSFContext **bsf)
Get null/pass-through bitstream filter.
int av_bsf_sink_get_packet(AVBitStreamFilterContext *ctx, AVPacket *pkt, int flags)
Get a packet with filtered data from sink and put it in packet.
Structure for chain/list of bitstream filters.
unsigned nb_outputs
number of output pads
void * priv_data
Opaque filter-specific private data.
Link properties exposed to filter code, but not external callers.
AVBitStreamFilterPad * output_pads
array of output pads
int av_bsf_init_str(AVBitStreamFilterContext *ctx, const char *args)
Initialize a filter with the supplied parameters.
const struct AVBitStreamFilter * filter
The bitstream filter this context is an instance of.
int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf)
Parse string describing list of bitstream filters and create single AVBSFContext describing the whole...
@ AV_BSF_SINK_FLAG_PEEK
Tell av_buffersink_get_buffer_ref() to read video/samples buffer reference, but not remove it from th...
int av_bsf_init_dict(AVBitStreamFilterContext *ctx, AVDictionary **options)
Initialize a filter with the supplied dictionary of options.
AVBitStreamFilterLink ** outputs
array of pointers to output links
This structure stores compressed data.
int av_bsf_list_finalize(AVBSFList **lst, AVBSFContext **bsf)
Finalize list of bitstream filters.
AVBitStreamFilterContext * av_bsf_graph_get_filter(AVBitStreamFilterGraph *graph, const char *name)
Get a filter instance identified by instance name from graph.
#define av_warn_unused_result
av_warn_unused_result int av_bsf_source_add_packet(AVBitStreamFilterContext *ctx, AVPacket *pkt, int flags)
Add a packet to the buffer source.
int av_bsf_list_append(AVBSFList *lst, AVBSFContext *bsf)
Append bitstream filter to the list of bitstream filters.
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)