FFmpegKit iOS / macOS / tvOS API 6.0
Loading...
Searching...
No Matches
fftools_objpool.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 * Copyright (c) 2023 ARTHENICA LTD
4 *
5 * FFmpeg is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * FFmpeg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with FFmpeg; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20/*
21 * This file is the modified version of objpool.h file living in ffmpeg source code under the fftools folder. We
22 * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied
23 * by us to develop ffmpeg-kit library.
24 *
25 * ffmpeg-kit changes by ARTHENICA LTD
26 *
27 * 07.2023
28 * --------------------------------------------------------
29 * - FFmpeg 6.0 changes migrated
30 */
31
32#ifndef FFTOOLS_OBJPOOL_H
33#define FFTOOLS_OBJPOOL_H
34
35typedef struct ObjPool ObjPool;
36
37typedef void* (*ObjPoolCBAlloc)(void);
38typedef void (*ObjPoolCBReset)(void *);
39typedef void (*ObjPoolCBFree)(void **);
40
41void objpool_free(ObjPool **op);
43 ObjPoolCBFree cb_free);
46
47int objpool_get(ObjPool *op, void **obj);
48void objpool_release(ObjPool *op, void **obj);
49
50#endif // FFTOOLS_OBJPOOL_H
ObjPool * objpool_alloc_packets(void)
void *(* ObjPoolCBAlloc)(void)
void objpool_free(ObjPool **op)
ObjPool * objpool_alloc_frames(void)
void objpool_release(ObjPool *op, void **obj)
void(* ObjPoolCBFree)(void **)
ObjPool * objpool_alloc(ObjPoolCBAlloc cb_alloc, ObjPoolCBReset cb_reset, ObjPoolCBFree cb_free)
void(* ObjPoolCBReset)(void *)
int objpool_get(ObjPool *op, void **obj)