Miam-Player  0.8.0
A nice music player
buffer.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
25 #ifndef AVUTIL_BUFFER_H
26 #define AVUTIL_BUFFER_H
27 
28 #include <stdint.h>
29 
73 typedef struct AVBuffer AVBuffer;
74 
81 typedef struct AVBufferRef {
83 
89  uint8_t *data;
93  int size;
94 } AVBufferRef;
95 
102 
108 
113 #define AV_BUFFER_FLAG_READONLY (1 << 0)
114 
130 AVBufferRef *av_buffer_create(uint8_t *data, int size,
131  void (*free)(void *opaque, uint8_t *data),
132  void *opaque, int flags);
133 
139 void av_buffer_default_free(void *opaque, uint8_t *data);
140 
148 
155 void av_buffer_unref(AVBufferRef **buf);
156 
163 int av_buffer_is_writable(const AVBufferRef *buf);
164 
168 void *av_buffer_get_opaque(const AVBufferRef *buf);
169 
170 int av_buffer_get_ref_count(const AVBufferRef *buf);
171 
182 
198 int av_buffer_realloc(AVBufferRef **buf, int size);
199 
238 typedef struct AVBufferPool AVBufferPool;
239 
249 AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size));
250 
264 AVBufferPool *av_buffer_pool_init2(int size, void *opaque,
265  AVBufferRef* (*alloc)(void *opaque, int size),
266  void (*pool_free)(void *opaque));
267 
277 
285 
290 #endif /* AVUTIL_BUFFER_H */
int av_buffer_make_writable(AVBufferRef **buf)
void av_buffer_unref(AVBufferRef **buf)
struct AVBuffer AVBuffer
Definition: buffer.h:73
int size
Definition: buffer.h:93
Definition: buffer.h:81
struct AVBufferRef AVBufferRef
AVBuffer * buffer
Definition: buffer.h:82
void av_buffer_default_free(void *opaque, uint8_t *data)
struct AVBufferPool AVBufferPool
Definition: buffer.h:238
AVBufferRef * av_buffer_create(uint8_t *data, int size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
int av_buffer_realloc(AVBufferRef **buf, int size)
int av_buffer_is_writable(const AVBufferRef *buf)
AVBufferPool * av_buffer_pool_init2(int size, void *opaque, AVBufferRef *(*alloc)(void *opaque, int size), void(*pool_free)(void *opaque))
AVBufferRef * av_buffer_alloc(int size)
int av_buffer_get_ref_count(const AVBufferRef *buf)
AVBufferRef * av_buffer_allocz(int size)
void * av_buffer_get_opaque(const AVBufferRef *buf)
void av_buffer_pool_uninit(AVBufferPool **pool)
AVBufferPool * av_buffer_pool_init(int size, AVBufferRef *(*alloc)(int size))
uint8_t * data
Definition: buffer.h:89
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
AVBufferRef * av_buffer_pool_get(AVBufferPool *pool)