libavutil/fifo.c File Reference

#include "common.h"
#include "fifo.h"

Go to the source code of this file.

Functions

int av_fifo_init (AVFifoBuffer *f, int size)
 Initializes an AVFifoBuffer.
void av_fifo_free (AVFifoBuffer *f)
 Frees an AVFifoBuffer.
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_read (AVFifoBuffer *f, uint8_t *buf, int buf_size)
 Get data from the fifo (returns -1 if not enough data).
void av_fifo_realloc (AVFifoBuffer *f, unsigned int new_size)
 Resizes a FIFO.
void av_fifo_write (AVFifoBuffer *f, const uint8_t *buf, int size)
 Writes data into an AVFifoBuffer.
int av_fifo_generic_read (AVFifoBuffer *f, int buf_size, void(*func)(void *, void *, int), void *dest)
 get data from the fifo (return -1 if not enough data)
void av_fifo_drain (AVFifoBuffer *f, int size)
 discard data from the fifo


Function Documentation

void av_fifo_drain ( AVFifoBuffer f,
int  size 
)

discard data from the fifo

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

Definition at line 109 of file fifo.c.

Referenced by av_fifo_generic_read(), and dv_assemble_frame().

void av_fifo_free ( AVFifoBuffer f  ) 

Frees an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to free

Definition at line 35 of file fifo.c.

Referenced by av_encode(), dv_delete_mux(), dv_init_mux(), gxf_write_trailer(), and mpeg_mux_end().

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

get data from the fifo (return -1 if not enough data)

Feeds data from an AVFifoBuffer to a user supplied callback.

Definition at line 89 of file fifo.c.

Referenced by av_fifo_read(), and flush_packet().

int av_fifo_init ( AVFifoBuffer f,
int  size 
)

Initializes an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to initialize
size of FIFO
Returns:
<0 for failure >=0 otherwise

Definition at line 25 of file fifo.c.

Referenced by av_encode(), av_fifo_realloc(), dv_init_mux(), gxf_write_header(), and mpeg_mux_init().

int av_fifo_read ( AVFifoBuffer f,
uint8_t buf,
int  buf_size 
)

Get data from the fifo (returns -1 if not enough data).

Reads data from an AVFifoBuffer.

Definition at line 51 of file fifo.c.

Referenced by av_fifo_realloc(), do_audio_out(), gxf_new_audio_packet(), and output_packet().

void av_fifo_realloc ( AVFifoBuffer f,
unsigned int  new_size 
)

Resizes a FIFO.

Resizes an AVFifoBuffer.

Definition at line 59 of file fifo.c.

Referenced by mpeg_mux_write_packet().

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 40 of file fifo.c.

Referenced by av_fifo_generic_read(), av_fifo_realloc(), do_audio_out(), dv_assemble_frame(), flush_packet(), gxf_interleave_packet(), gxf_new_audio_packet(), mpeg_mux_end(), mpeg_mux_write_packet(), and output_packet().

void av_fifo_write ( AVFifoBuffer f,
const uint8_t buf,
int  size 
)

Writes data into an AVFifoBuffer.

Parameters:
*f AVFifoBuffer to write to
*buf data source
size data size

Definition at line 74 of file fifo.c.

Referenced by do_audio_out(), dv_assemble_frame(), gxf_interleave_packet(), and mpeg_mux_write_packet().


Generated on Wed Feb 9 19:10:13 2011 for ffmpeg by  doxygen 1.5.6