[mpp_meta]: fix compile error of mpp_meta.cpp

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1033 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-15 09:36:11 +00:00
parent 62e28b89ea
commit a31103d3f0
3 changed files with 33 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ add_library(mpp_base STATIC
mpp_buffer.cpp mpp_buffer.cpp
mpp_packet.cpp mpp_packet.cpp
mpp_frame.cpp mpp_frame.cpp
mpp_task_impl.cpp
mpp_task.cpp mpp_task.cpp
mpp_meta.cpp mpp_meta.cpp
mpp_bitread.c mpp_bitread.c

View File

@@ -18,7 +18,7 @@
#define __MPP_TASK_IMPL_H__ #define __MPP_TASK_IMPL_H__
#include "mpp_list.h" #include "mpp_list.h"
#include "mpp_meta.h" #include "mpp_task.h"
/* /*
* mpp task status transaction * mpp task status transaction

View File

@@ -116,6 +116,37 @@ public:
void put_node(MppMetaNode *node); void put_node(MppMetaNode *node);
}; };
MppMetaService::MppMetaService()
: meta_id(0),
meta_count(0),
node_count(0)
{
INIT_LIST_HEAD(&mlist_meta);
INIT_LIST_HEAD(&mlist_node);
}
MppMetaService::~MppMetaService()
{
mpp_assert(list_empty(&mlist_meta));
mpp_assert(list_empty(&mlist_node));
while (!list_empty(&mlist_meta)) {
MppMetaImpl *pos, *n;
list_for_each_entry_safe(pos, n, &mlist_meta, MppMetaImpl, list_meta) {
put_meta(pos);
}
}
mpp_assert(list_empty(&mlist_node));
while (!list_empty(&mlist_node)) {
MppMetaNode *pos, *n;
list_for_each_entry_safe(pos, n, &mlist_node, MppMetaNode, list_node) {
put_node(pos);
}
}
}
RK_S32 MppMetaService::get_index_of_key(MppMetaKey key, MppMetaType type) RK_S32 MppMetaService::get_index_of_key(MppMetaKey key, MppMetaType type)
{ {
RK_S32 i = 0; RK_S32 i = 0;