[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:
ChenHengming
2016-06-07 09:36:27 +00:00
parent f3822e7828
commit 218354e088
4 changed files with 118 additions and 41 deletions

View File

@@ -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,
};