]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/fifo.h
Make sure strcasecmp() is declared.
[ffmpeg] / libavutil / fifo.h
index 3dd27bd1fffbf5597e591d026052eedf4974c044..37338ca673a1e0412093726d5421aa405fce0985 100644 (file)
  * A very simple circular buffer FIFO implementation.
  */
 
-#ifndef FFMPEG_FIFO_H
-#define FFMPEG_FIFO_H
+#ifndef AVUTIL_FIFO_H
+#define AVUTIL_FIFO_H
 
 #include <stdint.h>
+#include "common.h"
 
 typedef struct AVFifoBuffer {
     uint8_t *buffer;
@@ -37,7 +38,7 @@ typedef struct AVFifoBuffer {
  * @param size of FIFO
  * @return <0 for failure >=0 otherwise
  */
-int av_fifo_init(AVFifoBuffer *f, int size);
+int av_fifo_init(AVFifoBuffer *f, unsigned int size);
 
 /**
  * Frees an AVFifoBuffer.
@@ -92,12 +93,23 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
  */
 int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
 
+#if LIBAVUTIL_VERSION_MAJOR < 50
 /**
  * Resizes an AVFifoBuffer.
  * @param *f AVFifoBuffer to resize
  * @param size new AVFifoBuffer size in bytes
+ * @see av_fifo_realloc2()
  */
-void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
+attribute_deprecated void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
+#endif
+
+/**
+ * Resizes an AVFifoBuffer.
+ * @param *f AVFifoBuffer to resize
+ * @param size new AVFifoBuffer size in bytes
+ * @return <0 for failure >=0 otherwise
+ */
+int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
 
 /**
  * Reads and discards the specified amount of data from an AVFifoBuffer.
@@ -113,4 +125,4 @@ static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs)
         ptr -= f->end - f->buffer;
     return *ptr;
 }
-#endif /* FFMPEG_FIFO_H */
+#endif /* AVUTIL_FIFO_H */