mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[osal]: fix import failed on window and linux
[mpp_buffer]: add mpp_buffer function git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@884 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -74,6 +74,28 @@ MPP_RET os_allocator_normal_free(void *ctx, MppBufferInfo *info)
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET os_allocator_normal_import(void *ctx, MppBufferInfo *info)
|
||||
{
|
||||
(void) ctx;
|
||||
mpp_assert(info->ptr);
|
||||
mpp_assert(info->size);
|
||||
info->hnd = NULL;
|
||||
info->fd = -1;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET os_allocator_normal_release(void *ctx, MppBufferInfo *info)
|
||||
{
|
||||
(void) ctx;
|
||||
mpp_assert(info->ptr);
|
||||
mpp_assert(info->size);
|
||||
info->ptr = NULL;
|
||||
info->size = 0;
|
||||
info->hnd = NULL;
|
||||
info->fd = -1;
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
MPP_RET os_allocator_normal_close(void *ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
@@ -88,8 +110,8 @@ static os_allocator allocator_normal = {
|
||||
os_allocator_normal_open,
|
||||
os_allocator_normal_alloc,
|
||||
os_allocator_normal_free,
|
||||
NULL,
|
||||
NULL,
|
||||
os_allocator_normal_import,
|
||||
os_allocator_normal_release,
|
||||
os_allocator_normal_close,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user