FFmpeg
Enumerations | Functions

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(). More...

Enumerations

enum  { AV_BSF_SINK_FLAG_PEEK = 1 << 0, AV_BSF_SINK_FLAG_NO_REQUEST = 1 << 1 }
 

Functions

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. More...
 
AVRational av_bsf_sink_get_time_base (const AVBitStreamFilterContext *ctx)
 
const AVCodecParametersav_bsf_sink_get_parameters (const AVBitStreamFilterContext *ctx)
 

Detailed Description

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().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AV_BSF_SINK_FLAG_PEEK 

Tell av_buffersink_get_buffer_ref() to read video/samples buffer reference, but not remove it from the buffer.

This is useful if you need only to read a video/samples buffer, without to fetch it.

AV_BSF_SINK_FLAG_NO_REQUEST 

Tell av_bsf_sink_get_packet() not to request a packet from its input.

If a packet is already buffered, it is read (and removed from the buffer), but if no packet is present, return AVERROR(EAGAIN).

Definition at line 664 of file bsf.h.

Function Documentation

◆ av_bsf_sink_get_packet()

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.

Parameters
ctxpointer to a sink filter context.
packetpointer to an allocated packet that will be filled with data. The data must be freed using av_packet_unref() / av_packet_free()
flagsa combination of AV_BSF_SINK_FLAG_* flags
Return values
AVERROR(EAGAIN)output could not be produced. if AV_BSF_SINK_FLAG_NO_REQUEST was not set, av_bsf_graph_needs_input can be called to know which source needs input more urgently.
>=0 success
another negative error codelegitimate error

Definition at line 52 of file sink.c.

Referenced by do_bsf_graph().

◆ av_bsf_sink_get_time_base()

AVRational av_bsf_sink_get_time_base ( const AVBitStreamFilterContext ctx)

Definition at line 126 of file sink.c.

Referenced by do_bsf_graph().

◆ av_bsf_sink_get_parameters()

const AVCodecParameters* av_bsf_sink_get_parameters ( const AVBitStreamFilterContext ctx)

Definition at line 132 of file sink.c.