[mpp_buffer]: add mpp_buffer_info_get interface

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@143 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-08-21 02:52:40 +00:00
parent 15eb6c5893
commit 2c5ee82f4e
2 changed files with 12 additions and 1 deletions

View File

@@ -36,7 +36,7 @@
/*
* MppBuffer module has several functions:
*
* 1. buffer get / put / reference management / and external commit.
* 1. buffer get / put / reference management / external commit / get info.
* this part is the basic user interface for MppBuffer.
*
* function:
@@ -45,6 +45,7 @@
* mpp_buffer_put
* mpp_buffer_inc_ref
* mpp_buffer_commit
* mpp_buffer_info_get
*
* 2. user buffer working flow control abstraction.
* buffer should attach to certain group, and buffer mode control the buffer usage flow.

View File

@@ -86,6 +86,16 @@ MPP_RET mpp_buffer_inc_ref(MppBuffer buffer)
return mpp_buffer_ref_inc((MppBufferImpl*)buffer);
}
MPP_RET mpp_buffer_info_get(MppBuffer buffer, MppBufferInfo *info)
{
if (NULL == buffer || NULL == info) {
mpp_err("mpp_buffer_put invalid input: buffer %p info %p\n", buffer, info);
return MPP_ERR_UNKNOW;
}
*info = ((MppBufferImpl*)buffer)->info;
return MPP_OK;
}
MPP_RET mpp_buffer_group_get(const char *tag, MppBufferMode mode,
MppBufferGroup *group, MppBufferType type)