Go to the documentation of this file.
19 #ifndef AVFILTER_BUFFERSRC_H
20 #define AVFILTER_BUFFERSRC_H
@ AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT
Do not check for format changes.
This structure describes decoded (raw) audio or video data.
av_warn_unused_result int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
Add a frame to the buffer source.
AVRational sample_aspect_ratio
Video only, the sample (pixel) aspect ratio.
uint64_t channel_layout
Audio only, the audio channel layout.
Rational number (pair of numerator and denominator).
AVRational frame_rate
Video only, the frame rate of the input video.
int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags)
Close the buffer source after EOF.
AVBufferSrcParameters * av_buffersrc_parameters_alloc(void)
Allocate a new AVBufferSrcParameters instance.
AVBufferRef * hw_frames_ctx
Video with a hwaccel pixel format only.
int sample_rate
Audio only, the audio sampling rate in samples per second.
AVRational time_base
The timebase to be used for the timestamps on the input frames.
@ AV_BUFFERSRC_FLAG_PUSH
Immediately push the frame to the output.
#define av_warn_unused_result
int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param)
Initialize the buffersrc or abuffersrc filter with the provided parameters.
int width
Video only, the display dimensions of the input frames.
av_warn_unused_result int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src, AVFrame *frame, int flags)
Add a frame to the buffer source.
@ AV_BUFFERSRC_FLAG_KEEP_REF
Keep a reference to the frame.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
This structure contains the parameters describing the frames that will be passed to this filter.
int format
video: the pixel format, value corresponds to enum AVPixelFormat audio: the sample format,...
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src)
Get the number of failed requests.
A reference to a data buffer.
av_warn_unused_result int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame)
Add a frame to the buffer source.
#define flags(name, subs,...)