mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 01:10:39 +01:00
chore[kmpp]: Modify kmpp_objs init / deinit order
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: Ia8fac55bc43f092a6b76bd9f5b7706f4d28bde1d
This commit is contained in:
parent
147aec8a1b
commit
5e67bcdf71
4 changed files with 15 additions and 9 deletions
|
|
@ -10,6 +10,6 @@
|
|||
#define KMPP_OBJ_NAME kmpp_frame
|
||||
#define KMPP_OBJ_INTF_TYPE KmppFrame
|
||||
#define KMPP_OBJ_IMPL_TYPE KmppFrameImpl
|
||||
#define KMPP_OBJ_SGLN_ID MPP_SGLN_FRAME
|
||||
#define KMPP_OBJ_SGLN_ID MPP_SGLN_KMPP_FRAME
|
||||
#define KMPP_OBJ_ENTRY_TABLE KMPP_FRAME_ENTRY_TABLE
|
||||
#include "kmpp_obj_helper.h"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "mpp_debug.h"
|
||||
#include "mpp_common.h"
|
||||
#include "mpp_mem_pool.h"
|
||||
#include "mpp_singleton.h"
|
||||
|
||||
#include "mpp_trie.h"
|
||||
#include "mpp_cfg_io.h"
|
||||
|
|
@ -261,8 +262,7 @@ MPP_OBJ_ACCESS_IMPL(fp, void *, % p)
|
|||
MPP_OBJ_STRUCT_ACCESS_IMPL(st, void, % p)
|
||||
MPP_OBJ_STRUCT_ACCESS_IMPL(shm, KmppShmPtr, % p)
|
||||
|
||||
__attribute__ ((destructor))
|
||||
void kmpp_objs_deinit(void)
|
||||
static void kmpp_objs_deinit(void)
|
||||
{
|
||||
KmppObjs *p = MPP_FETCH_AND(&objs, NULL);
|
||||
|
||||
|
|
@ -294,8 +294,7 @@ void kmpp_objs_deinit(void)
|
|||
}
|
||||
}
|
||||
|
||||
__attribute__ ((constructor))
|
||||
void kmpp_objs_init(void)
|
||||
static void kmpp_objs_init(void)
|
||||
{
|
||||
static const char *dev = "/dev/kmpp_objs";
|
||||
KmppObjs *p = objs;
|
||||
|
|
@ -414,6 +413,8 @@ __failed:
|
|||
}
|
||||
}
|
||||
|
||||
MPP_SINGLETON(MPP_SGLN_KOBJ, kmpp_obj, kmpp_objs_init, kmpp_objs_deinit);
|
||||
|
||||
rk_s32 kmpp_objdef_put(KmppObjDef def)
|
||||
{
|
||||
KmppObjDefImpl *impl = (KmppObjDefImpl *)def;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
#define KMPP_OBJ_NAME kmpp_packet
|
||||
#define KMPP_OBJ_INTF_TYPE KmppPacket
|
||||
#define KMPP_OBJ_IMPL_TYPE KmppPacketImpl
|
||||
#define KMPP_OBJ_SGLN_ID MPP_SGLN_PACKET
|
||||
#define KMPP_OBJ_SGLN_ID MPP_SGLN_KMPP_PACKET
|
||||
#define KMPP_OBJ_ENTRY_TABLE KMPP_PACKET_ENTRY_TABLE
|
||||
#include "kmpp_obj_helper.h"
|
||||
|
|
@ -22,13 +22,18 @@ typedef enum MppSingletonId_e {
|
|||
MPP_SGLN_SERVER,
|
||||
/* software platform */
|
||||
MPP_SGLN_RUNTIME,
|
||||
/* base module */
|
||||
/* kernel module (MUST before userspace module) */
|
||||
MPP_SGLN_KOBJ,
|
||||
MPP_SGLN_KMPP_BUFFER,
|
||||
MPP_SGLN_KMPP_META,
|
||||
MPP_SGLN_KMPP_FRAME,
|
||||
MPP_SGLN_KMPP_PACKET,
|
||||
/* userspace base module */
|
||||
MPP_SGLN_BUFFER,
|
||||
MPP_SGLN_META,
|
||||
MPP_SGLN_FRAME,
|
||||
MPP_SGLN_PACKET,
|
||||
/* system module */
|
||||
MPP_SGLN_KOBJ,
|
||||
/* userspace system module */
|
||||
MPP_SGLN_ENC_CFG,
|
||||
MPP_SGLN_DEC_CFG,
|
||||
MPP_SGLN_DEC_RC_API,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue