diff options
author | Roman Shaposhnik <roman@shaposhnik.org> | 2006-09-21 07:31:53 +0000 |
---|---|---|
committer | Roman Shaposhnik <roman@shaposhnik.org> | 2006-09-21 07:31:53 +0000 |
commit | f5a478f65d7262dbe194641d384f24fbbc03ed85 (patch) | |
tree | fbdda2fba8809f3e7a6c662017d812276da8d5c1 /libavformat/avformat.h | |
parent | a1ef006823de991c546a89b3e9135617a3524582 (diff) | |
download | ffmpeg-f5a478f65d7262dbe194641d384f24fbbc03ed85.tar.gz |
* Moving FifoBuffer out of libavformat/avformat.h and
libavformat/utils.c into libavutil
Originally committed as revision 6310 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 90c4f499cb..102dc92aaf 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -441,29 +441,6 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); void av_register_all(void); -typedef struct FifoBuffer { - uint8_t *buffer; - uint8_t *rptr, *wptr, *end; -} FifoBuffer; - -int fifo_init(FifoBuffer *f, int size); -void fifo_free(FifoBuffer *f); -int fifo_size(FifoBuffer *f, uint8_t *rptr); -int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr); -void fifo_write(FifoBuffer *f, const uint8_t *buf, int size, uint8_t **wptr_ptr); -int put_fifo(ByteIOContext *pb, FifoBuffer *f, int buf_size, uint8_t **rptr_ptr); -void fifo_realloc(FifoBuffer *f, unsigned int size); -static inline uint8_t fifo_peek(FifoBuffer *f, int offs) -{ - return f->buffer[(f->rptr - f->buffer + offs) % (f->end - f->buffer)]; -} -static inline void fifo_drain(FifoBuffer *f, int size) -{ - f->rptr += size; - if (f->rptr >= f->end) - f->rptr = f->buffer + (f->rptr - f->end); -} - /* media file input */ AVInputFormat *av_find_input_format(const char *short_name); AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); |