Libav
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavutil
buffer.h
Go to the documentation of this file.
1
/*
2
* This file is part of Libav.
3
*
4
* Libav 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
* Libav 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 Libav; 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
{
82
AVBuffer
*
buffer
;
83
89
uint8_t
*
data
;
93
int
size
;
94
}
AVBufferRef
;
95
101
AVBufferRef
*
av_buffer_alloc
(
int
size
);
102
107
AVBufferRef
*
av_buffer_allocz
(
int
size
);
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
147
AVBufferRef
*
av_buffer_ref
(
AVBufferRef
*buf);
148
155
void
av_buffer_unref
(
AVBufferRef
**buf);
156
163
int
av_buffer_is_writable
(
const
AVBufferRef
*buf);
164
174
int
av_buffer_make_writable
(
AVBufferRef
**buf);
175
191
int
av_buffer_realloc
(
AVBufferRef
**buf,
int
size);
192
231
typedef
struct
AVBufferPool
AVBufferPool
;
232
242
AVBufferPool
*
av_buffer_pool_init
(
int
size,
AVBufferRef
* (*
alloc
)(
int
size));
243
253
void
av_buffer_pool_uninit
(
AVBufferPool
**
pool
);
254
261
AVBufferRef
*
av_buffer_pool_get
(
AVBufferPool
*
pool
);
262
267
#endif
/* AVUTIL_BUFFER_H */
Generated on Tue Mar 1 2016 21:14:52 for Libav by
1.8.4