30 static char *ff_get_ref_perms_string(
char *buf,
size_t buf_size,
int perms)
32 snprintf(buf, buf_size,
"%s%s%s%s%s%s",
47 "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64
" pos:%"PRId64,
53 av_dlog(ctx,
" a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
62 av_dlog(ctx,
" cl:%"PRId64
"d n:%d r:%d p:%d",
69 av_dlog(ctx,
"]%s", end ?
"\n" :
"");
91 perms, w, h, link->
format);
125 memcpy(pic->
data, data, 4*
sizeof(data[0]));
126 memcpy(pic->
linesize, linesize, 4*
sizeof(linesize[0]));
130 pic-> extended_data = pic->
data;
138 if (picref && picref->
video)
151 av_dlog(
NULL,
" perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf,
sizeof(buf), perms), w, h);
uint8_t * data[8]
buffer data for each plane/channel
uint8_t ** extended_data
pointers to the data planes/channels.
int nb_samples
number of audio samples
AVFilterBufferRefAudioProps * audio
audio buffer specific properties
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
memory handling functions
int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align)
Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordi...
#define AV_PERM_REUSE
can output the buffer multiple times, with the same contents each time
enum AVMediaType type
media type of buffer data
A reference-counted buffer data type used by the filter system.
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
AVFilterPad * dstpad
input pad on the dest filter
int h
width and height of the allocated buffer
#define AV_PERM_READ
can read from the buffer
void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
AVFilterBufferRef * ff_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
int linesize[8]
number of bytes per line
int top_field_first
field order
int key_frame
1 -> keyframe, 0-> not
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
AVRational pixel_aspect
pixel aspect ratio
int64_t pts
presentation timestamp.
A link between two filters.
AVFilterBufferRef * ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
Request a picture buffer with a specific set of permissions.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
AVFilterBuffer * buf
the buffer that this is a reference to
Video specific properties in a reference to an AVFilterBuffer.
void ff_avfilter_default_free_buffer(AVFilterBuffer *ptr)
default handler for freeing audio/video buffer when there are no references left
unsigned refcount
number of references to this buffer
int format
agreed upon media format
void(* free)(struct AVFilterBuffer *buf)
A pointer to the function to deallocate this buffer if the default function is not sufficient...
A reference to an AVFilterBuffer.
int perms
permissions, see the AV_PERM_* flags
int sample_rate
audio buffer sample rate
enum AVPictureType pict_type
picture type of the frame
uint64_t channel_layout
channel layout of audio buffer
AVFilterLink ** outputs
array of pointers to output links
AVFilterBufferRef *(* get_video_buffer)(AVFilterLink *link, int perms, int w, int h)
Callback function to get a video buffer.
int planar
audio buffer - planar or packed
#define AV_PERM_PRESERVE
nobody else can overwrite the buffer
static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
static AVFilterBufferRef * get_video_buffer(AVFilterLink *inlink, int perms, int w, int h)
int interlaced
is frame interlaced
AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, int w, int h, enum AVPixelFormat format)
Create a buffer reference wrapped around an already allocated image buffer.
#define AV_PERM_REUSE2
can output the buffer multiple times, modified each time
#define AV_PERM_WRITE
can write to the buffer
int64_t pos
byte position in stream, -1 if unknown
AVFilterContext * dst
dest filter
uint8_t * data[8]
picture/audio data for each plane
#define FF_DPRINTF_START(ctx, func)
AVFilterBufferRef * ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
AVPixelFormat
Pixel format.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AV_PERM_NEG_LINESIZES
the buffer requested can have negative linesizes