Mercurial > libavutil.hg
comparison fifo.h @ 492:75f096258d14 libavutil
Add a generic write function to av_fifo.
Patch by Bj«Órn Axelsson: bjorn axelsson intinor se
Original thread: [FFmpeg-devel] [RFC][PATCH] av_fifo_write_from_bytestream()
Date: 04/03/2008 12:14 PM
author | benoit |
---|---|
date | Wed, 09 Apr 2008 11:35:16 +0000 |
parents | d0f3bb6e367e |
children | 97dd9756349c |
comparison
equal
deleted
inserted
replaced
491:34640f2e3060 | 492:75f096258d14 |
---|---|
74 * Writes data into an AVFifoBuffer. | 74 * Writes data into an AVFifoBuffer. |
75 * @param *f AVFifoBuffer to write to | 75 * @param *f AVFifoBuffer to write to |
76 * @param *buf data source | 76 * @param *buf data source |
77 * @param size data size | 77 * @param size data size |
78 */ | 78 */ |
79 void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size); | 79 attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size); |
80 | |
81 /** | |
82 * Feeds data from a user supplied callback to an AVFifoBuffer. | |
83 * @param *f AVFifoBuffer to write to | |
84 * @param *buf data source | |
85 * @param size number of bytes to write | |
86 * @param *func generic write function. First parameter is buf, | |
87 * second is dest_buf, third is dest_buf_size. | |
88 * func must return the number of bytes written to dest_buf, or <= 0 to | |
89 * indicate no more data available to write. | |
90 * If func is NULL, buf is interpreted as a simple byte array for source data. | |
91 * @return the number of bytes written to the fifo. | |
92 */ | |
93 int av_fifo_generic_write(AVFifoBuffer *f, void *buf, int size, int (*func)(void*, void*, int)); | |
80 | 94 |
81 /** | 95 /** |
82 * Resizes an AVFifoBuffer. | 96 * Resizes an AVFifoBuffer. |
83 * @param *f AVFifoBuffer to resize | 97 * @param *f AVFifoBuffer to resize |
84 * @param size new AVFifoBuffer size in bytes | 98 * @param size new AVFifoBuffer size in bytes |