diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-12-02 01:19:48 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-12-02 01:19:48 +0000 |
commit | 0ea721f7ce81357bc4ec6eea609cd50482c3d15b (patch) | |
tree | 25a0871cb3c06f9716acf9c204192d548f214048 /contrib/ffmpeg/libavutil/fifo.h | |
parent | d8ec380876e7f697ba609546d61757ab3f2d8715 (diff) | |
download | xine-lib-0ea721f7ce81357bc4ec6eea609cd50482c3d15b.tar.gz xine-lib-0ea721f7ce81357bc4ec6eea609cd50482c3d15b.tar.bz2 |
Start working on a branch where FFmpeg is not copied, patched and carved to be built with automake but instead imported inline and built using its own build system. This is an import of a slightly modified FFmpeg current tree. xine-lib builds, install and run fine with it, but there are of course plenty of things that needs to be fixed before it can even be considered for a 1.2.x series. Work will continue in the next days of course.
CVS patchset: 8397
CVS date: 2006/12/02 01:19:48
Diffstat (limited to 'contrib/ffmpeg/libavutil/fifo.h')
-rw-r--r-- | contrib/ffmpeg/libavutil/fifo.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/ffmpeg/libavutil/fifo.h b/contrib/ffmpeg/libavutil/fifo.h new file mode 100644 index 000000000..9dec0e62d --- /dev/null +++ b/contrib/ffmpeg/libavutil/fifo.h @@ -0,0 +1,25 @@ +#ifndef FIFO_H +#define FIFO_H + +typedef struct AVFifoBuffer { + uint8_t *buffer; + uint8_t *rptr, *wptr, *end; +} AVFifoBuffer; + +int av_fifo_init(AVFifoBuffer *f, int size); +void av_fifo_free(AVFifoBuffer *f); +int av_fifo_size(AVFifoBuffer *f); +int av_fifo_read(AVFifoBuffer *f, uint8_t *buf, int buf_size); +int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void*, int), void* dest); +void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size); +void av_fifo_realloc(AVFifoBuffer *f, unsigned int size); +void av_fifo_drain(AVFifoBuffer *f, int size); + +static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs) +{ + uint8_t *ptr = f->rptr + offs; + if (ptr >= f->end) + ptr -= f->end - f->buffer; + return *ptr; +} +#endif /* FIFO_H */ |