Go to the documentation of this file.
36 #define BUFFER_ALIGN 32
67 if (!
link->frame_pool) {
70 if (!
link->frame_pool)
74 &pool_width, &pool_height,
75 &pool_format, &pool_align) < 0) {
79 if (pool_width !=
w || pool_height !=
h ||
85 if (!
link->frame_pool)
105 if (
link->dstpad->get_video_buffer)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
AVPixelFormat
Pixel format.
uint8_t * data
The data buffer.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
AVBufferRef * av_buffer_allocz(buffer_size_t size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
A link between two filters.
AVFrame * ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
int ff_frame_pool_get_video_config(FFFramePool *pool, int *width, int *height, enum AVPixelFormat *format, int *align)
Get the video frame pool configuration.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
AVFrame * ff_frame_pool_get(FFFramePool *pool)
Allocate a new AVFrame, reussing old buffers from the pool when available.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
void ff_frame_pool_uninit(FFFramePool **pool)
Deallocate the frame pool.
#define FF_TPRINTF_START(ctx, func)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
This struct describes a set or pool of "hardware" frames (i.e.
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
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame.
void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
FFFramePool * ff_frame_pool_video_init(AVBufferRef *(*alloc)(buffer_size_t size), int width, int height, enum AVPixelFormat format, int align)
Allocate and initialize a video frame pool.
int av_hwframe_get_buffer(AVBufferRef *hwframe_ref, AVFrame *frame, int flags)
Allocate a new frame attached to the given AVHWFramesContext.
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)