73 s->nb_failed_requests = 0;
80 s->last_pts =
pkt->pts +
pkt->duration;
106 if (
s->warning_limit &&
109 "%d buffers queued in %s, something may be wrong.\n",
112 s->warning_limit *= 10;
152 if (
av_q2d(
c->time_base) <= 0) {
157 c->warning_limit = 100;
166#define OFFSET(x) offsetof(SourceContext, x)
167#define FLAGS (AV_OPT_FLAG_BSF_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_VIDEO_PARAM)
203 c->nb_failed_requests++;
216 .p.priv_class = &buffer_class,
const FFBitStreamFilter ff_source_bsf
int ff_bsf_filter_packet(AVBitStreamFilterLink *link, AVPacket *pkt)
Send a packet of data to the next filter.
int ff_bsf_outlink_get_status(AVBitStreamFilterLink *link)
void ff_bsf_link_set_in_status(AVBitStreamFilterLink *link, int status, int64_t pts)
static BitStreamFilterLinkInternal * ff_link_internal(AVBitStreamFilterLink *link)
int ff_bsf_graph_run_once(AVBitStreamFilterGraph *graph)
Run one round of processing on a filter graph.
#define flags(name, subs,...)
AVCodecParameters * avcodec_parameters_alloc(void)
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
void avcodec_parameters_free(AVCodecParameters **ppar)
size_t av_container_fifo_can_read(const AVContainerFifo *cf)
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_RATIONAL
Underlying C type is AVRational.
int av_bsf_source_close(AVBitStreamFilterContext *ctx, int64_t pts, unsigned flags)
Close the source after EOF.
int av_bsf_source_get_status(AVBitStreamFilterContext *ctx)
Returns 0 or a negative AVERROR code.
int av_bsf_source_parameters_set(AVBitStreamFilterContext *ctx, const AVCodecParameters *par)
Initialize the source filter with the provided parameters.
int attribute_align_arg av_bsf_source_add_packet(AVBitStreamFilterContext *ctx, AVPacket *pkt, int flags)
Add a packet to the buffer source.
@ AV_BSF_SOURCE_FLAG_PUSH
Immediately push the packet to the output.
@ AV_BSF_SOURCE_FLAG_KEEP_REF
Keep a reference to the packet.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
#define AVERROR_EOF
End of file.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static double av_q2d(AVRational a)
Convert an AVRational to a double.
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
#define BSF_DEFINE_CLASS(fname)
#define BSFILTER_OUTPUTS(array)
#define FFERROR_SOURCE_EMPTY
#define AVPACKET_IS_EMPTY(pkt)
#define attribute_align_arg
static av_cold int preinit(AVBitStreamFilterContext *ctx)
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static const AVBitStreamFilterPad source_outputs[]
static const AVOption buffer_options[]
static int config_props(AVBitStreamFilterLink *link)
static int push_packet(AVBitStreamFilterGraph *graph)
static int activate(AVBitStreamFilterContext *ctx)
unsigned ff_bsf_source_get_nb_failed_requests(const AVBitStreamFilterContext *buffer_src)
Get the number of failed requests.
void * priv_data
Opaque filter-specific private data.
Link properties exposed to filter code, but not external callers.
AVBitStreamFilterContext * src
source filter
A filter pad used for either input or output.
Describe the class of an AVClass context structure.
This struct describes the properties of an encoded stream.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
AVContainerFifo * fifo
Queue of packets waiting to be filtered.
unsigned nb_failed_requests
AVRational time_base
time_base to set in the output link
static AVFormatContext * ctx
static void copy(const float *p1, float *p2, const int length)