libavutil/fifo.h File Reference

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  AVFifoBuffer

Functions

AVFifoBufferav_fifo_alloc (unsigned int size)
 Initializes an AVFifoBuffer.
void av_fifo_free (AVFifoBuffer *f)
 Frees an AVFifoBuffer.
void av_fifo_reset (AVFifoBuffer *f)
 Resets the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
int av_fifo_size (AVFifoBuffer *f)
 Returns the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from it.
int av_fifo_space (AVFifoBuffer *f)
 Returns the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write into it.
int av_fifo_generic_read (AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
 Feeds data from an AVFifoBuffer to a user-supplied callback.
int av_fifo_generic_write (AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
 Feeds data from a user-supplied callback to an AVFifoBuffer.
int av_fifo_realloc2 (AVFifoBuffer *f, unsigned int size)
 Resizes an AVFifoBuffer.
void av_fifo_drain (AVFifoBuffer *f, int size)
 Reads and discards the specified amount of data from an AVFifoBuffer.
static uint8_t av_fifo_peek (AVFifoBuffer *f, int offs)


Function Documentation

AVFifoBuffer* av_fifo_alloc ( unsigned int  size  ) 

Initializes an AVFifoBuffer.

Parameters:
size of FIFO
Returns:
AVFifoBuffer or NULL in case of memory allocation failure

Definition at line 25 of file fifo.c.

void av_fifo_drain ( AVFifoBuffer f,
int  size 
)

Reads and discards the specified amount of data from an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to read from
size amount of data to read in bytes

Definition at line 123 of file fifo.c.

void av_fifo_free ( AVFifoBuffer f  ) 

Frees an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to free

Definition at line 38 of file fifo.c.

int av_fifo_generic_read ( AVFifoBuffer f,
void *  dest,
int  buf_size,
void(*)(void *, void *, int)  func 
)

Feeds data from an AVFifoBuffer to a user-supplied callback.

Parameters:
*f AVFifoBuffer to read from
buf_size number of bytes to read
*func generic read function
*dest data destination

Definition at line 105 of file fifo.c.

int av_fifo_generic_write ( AVFifoBuffer f,
void *  src,
int  size,
int(*)(void *, void *, int)  func 
)

Feeds data from a user-supplied callback to an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to write to
*src data source; non-const since it may be used as a modifiable context by the function defined in func
size number of bytes to write
*func generic write function; the first parameter is src, the second is dest_buf, the third is dest_buf_size. func must return the number of bytes written to dest_buf, or <= 0 to indicate no more data available to write. If func is NULL, src is interpreted as a simple byte array for source data.
Returns:
the number of bytes written to the FIFO

Definition at line 82 of file fifo.c.

static uint8_t av_fifo_peek ( AVFifoBuffer f,
int  offs 
) [inline, static]

Definition at line 109 of file fifo.h.

int av_fifo_realloc2 ( AVFifoBuffer f,
unsigned int  size 
)

Resizes an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to resize
size new AVFifoBuffer size in bytes
Returns:
<0 for failure, >=0 otherwise

Definition at line 62 of file fifo.c.

void av_fifo_reset ( AVFifoBuffer f  ) 

Resets the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.

Parameters:
*f AVFifoBuffer to reset

Definition at line 46 of file fifo.c.

int av_fifo_size ( AVFifoBuffer f  ) 

Returns the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from it.

Parameters:
*f AVFifoBuffer to read from
Returns:
size

Definition at line 52 of file fifo.c.

int av_fifo_space ( AVFifoBuffer f  ) 

Returns the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write into it.

Parameters:
*f AVFifoBuffer to write into
Returns:
size

Definition at line 57 of file fifo.c.


Generated on Tue Apr 20 17:39:21 2010 for FFmpeg by  doxygen 1.5.6