| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of FFmpeg. | 2 * This file is part of FFmpeg. |
| 3 * | 3 * |
| 4 * FFmpeg is free software; you can redistribute it and/or | 4 * FFmpeg is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Lesser General Public | 5 * modify it under the terms of the GNU Lesser General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2.1 of the License, or (at your option) any later version. | 7 * version 2.1 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * FFmpeg is distributed in the hope that it will be useful, | 9 * FFmpeg is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Returns the amount of data in bytes in the AVFifoBuffer, that is the | 57 * Returns the amount of data in bytes in the AVFifoBuffer, that is the |
| 58 * amount of data you can read from it. | 58 * amount of data you can read from it. |
| 59 * @param *f AVFifoBuffer to read from | 59 * @param *f AVFifoBuffer to read from |
| 60 * @return size | 60 * @return size |
| 61 */ | 61 */ |
| 62 int av_fifo_size(AVFifoBuffer *f); | 62 int av_fifo_size(AVFifoBuffer *f); |
| 63 | 63 |
| 64 /** | 64 /** |
| 65 * Returns the amount of space in bytes in the AVFifoBuffer, that is the |
| 66 * amount of data you can write into it. |
| 67 * @param *f AVFifoBuffer to write into |
| 68 * @return size |
| 69 */ |
| 70 int av_fifo_space(AVFifoBuffer *f); |
| 71 |
| 72 /** |
| 65 * Feeds data from an AVFifoBuffer to a user-supplied callback. | 73 * Feeds data from an AVFifoBuffer to a user-supplied callback. |
| 66 * @param *f AVFifoBuffer to read from | 74 * @param *f AVFifoBuffer to read from |
| 67 * @param buf_size number of bytes to read | 75 * @param buf_size number of bytes to read |
| 68 * @param *func generic read function | 76 * @param *func generic read function |
| 69 * @param *dest data destination | 77 * @param *dest data destination |
| 70 */ | 78 */ |
| 71 int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)
(void*, void*, int)); | 79 int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)
(void*, void*, int)); |
| 72 | 80 |
| 73 /** | 81 /** |
| 74 * Feeds data from a user-supplied callback to an AVFifoBuffer. | 82 * Feeds data from a user-supplied callback to an AVFifoBuffer. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 100 void av_fifo_drain(AVFifoBuffer *f, int size); | 108 void av_fifo_drain(AVFifoBuffer *f, int size); |
| 101 | 109 |
| 102 static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs) | 110 static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs) |
| 103 { | 111 { |
| 104 uint8_t *ptr = f->rptr + offs; | 112 uint8_t *ptr = f->rptr + offs; |
| 105 if (ptr >= f->end) | 113 if (ptr >= f->end) |
| 106 ptr -= f->end - f->buffer; | 114 ptr -= f->end - f->buffer; |
| 107 return *ptr; | 115 return *ptr; |
| 108 } | 116 } |
| 109 #endif /* AVUTIL_FIFO_H */ | 117 #endif /* AVUTIL_FIFO_H */ |
| OLD | NEW |