mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00

The default misc buffer group do not have the flag. We need to seperate the default misc group with different flag. Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I14941eedfe9c06ec978a12061ba33e12495aa038
31 lines
739 B
C
31 lines
739 B
C
/* SPDX-License-Identifier: Apache-2.0 OR MIT */
|
|
/*
|
|
* Copyright (c) 2023 Rockchip Electronics Co., Ltd.
|
|
*/
|
|
|
|
#ifndef __MPP_ALLOCATOR_API_H__
|
|
#define __MPP_ALLOCATOR_API_H__
|
|
|
|
#include "mpp_allocator.h"
|
|
|
|
typedef MPP_RET (*OsAllocatorFunc)(void *ctx, MppBufferInfo *info);
|
|
|
|
typedef struct os_allocator_t {
|
|
MppBufferType type;
|
|
const char *name;
|
|
|
|
MPP_RET (*open)(void **ctx, size_t alignment, MppAllocFlagType flags);
|
|
MPP_RET (*close)(void *ctx);
|
|
|
|
OsAllocatorFunc alloc;
|
|
OsAllocatorFunc free;
|
|
OsAllocatorFunc import;
|
|
OsAllocatorFunc release;
|
|
OsAllocatorFunc mmap;
|
|
|
|
/* allocator real flag update callback */
|
|
MppAllocFlagType (*flags)(void *ctx);
|
|
} os_allocator;
|
|
|
|
#endif /* __MPP_ALLOCATOR_API_H__ */
|