Go to the documentation of this file.
73 f->wptr =
f->rptr =
f->buffer;
74 f->wndx =
f->rndx = 0;
79 return (uint32_t)(
f->wndx -
f->rndx);
89 unsigned int old_size =
f->end -
f->buffer;
91 if (old_size < new_size) {
109 unsigned int old_size =
f->end -
f->buffer;
123 int (*
func)(
void *,
void *,
int))
126 uint32_t wndx=
f->wndx;
161 av_assert2(buf_size + (
unsigned)offset <= f->wndx -
f->rndx);
164 rptr +=
offset - (
f->end -
f->buffer);
168 while (buf_size > 0) {
172 rptr -=
f->end -
f->buffer;
178 memcpy(dest, rptr,
len);
190 void (*
func)(
void *,
void *,
int))
196 int len =
FFMIN(
f->end - rptr, buf_size);
200 memcpy(dest, rptr,
len);
206 rptr -=
f->end -
f->buffer;
208 }
while (buf_size > 0);
214 void (*
func)(
void *,
void *,
int))
222 memcpy(dest,
f->rptr,
len);
228 }
while (buf_size > 0);
237 if (
f->rptr >=
f->end)
238 f->rptr -=
f->end -
f->buffer;
int(* func)(AVBPrint *dst, const char *in, const char *arg)
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 all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
int av_fifo_grow(AVFifoBuffer *f, unsigned int size)
Enlarge an AVFifoBuffer.
static AVFifoBuffer * fifo_alloc_common(void *buffer, size_t size)
int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
void av_fifo_reset(AVFifoBuffer *f)
Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
void av_fifo_drain(AVFifoBuffer *f, int size)
Discard data from the FIFO.
int av_fifo_space(const AVFifoBuffer *f)
Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write int...
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define av_malloc_array(a, b)
AVFifoBuffer * av_fifo_alloc_array(size_t nmemb, size_t size)
Initialize an AVFifoBuffer.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void(*func)(void *, void *, int))
Feed data at specific position from an AVFifoBuffer to a user-supplied callback.
void av_fifo_freep(AVFifoBuffer **f)
Free an AVFifoBuffer and reset pointer to NULL.
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.