mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-09 02:50:06 +08:00
[legacy]: Fix for windows simulation compile
Change-Id: I1f3ea32878b194ecaf380f1af5cca33179aa8300 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -4,8 +4,12 @@ include_directories(.)
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# add mpp implement
|
# add mpp implement
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
if(RKPLATFORM)
|
||||||
|
set(RKPLAT_VPU_LEGACY vpu.c)
|
||||||
|
endif(RKPLATFORM)
|
||||||
|
|
||||||
set (MPP_LEGACY_SRC
|
set (MPP_LEGACY_SRC
|
||||||
vpu.c
|
${RKPLAT_VPU_LEGACY}
|
||||||
vpu_api.cpp
|
vpu_api.cpp
|
||||||
vpu_api_legacy.cpp
|
vpu_api_legacy.cpp
|
||||||
vpu_mem_legacy.c
|
vpu_mem_legacy.c
|
||||||
|
@@ -16,16 +16,18 @@
|
|||||||
|
|
||||||
#define MODULE_TAG "vpu"
|
#define MODULE_TAG "vpu"
|
||||||
|
|
||||||
|
#include "mpp_env.h"
|
||||||
|
#include "mpp_log.h"
|
||||||
|
#include "mpp_common.h"
|
||||||
|
|
||||||
|
#include "vpu.h"
|
||||||
|
|
||||||
|
#ifdef RKPLATFORM
|
||||||
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "mpp_env.h"
|
|
||||||
#include "mpp_log.h"
|
|
||||||
|
|
||||||
#include "vpu.h"
|
|
||||||
|
|
||||||
#define VPU_IOC_MAGIC 'l'
|
#define VPU_IOC_MAGIC 'l'
|
||||||
|
|
||||||
@@ -232,4 +234,63 @@ RK_S32 VPUClientGetIOMMUStatus()
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int VPUClientInit(VPU_CLIENT_TYPE type)
|
||||||
|
{
|
||||||
|
(void)type;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientRelease(int socket)
|
||||||
|
{
|
||||||
|
(void)socket;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientSendReg(int socket, RK_U32 *regs, RK_U32 nregs)
|
||||||
|
{
|
||||||
|
(void)socket;
|
||||||
|
(void)regs;
|
||||||
|
(void)nregs;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientSendReg2(RK_S32 socket, RK_S32 offset, RK_S32 size, void *param)
|
||||||
|
{
|
||||||
|
(void)socket;
|
||||||
|
(void)offset;
|
||||||
|
(void)size;
|
||||||
|
(void)param;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientWaitResult(int socket, RK_U32 *regs, RK_U32 nregs, VPU_CMD_TYPE *cmd, RK_S32 *len)
|
||||||
|
{
|
||||||
|
(void)socket;
|
||||||
|
(void)regs;
|
||||||
|
(void)nregs;
|
||||||
|
(void)cmd;
|
||||||
|
(void)len;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientGetHwCfg(int socket, RK_U32 *cfg, RK_U32 cfg_size)
|
||||||
|
{
|
||||||
|
(void)socket;
|
||||||
|
(void)cfg;
|
||||||
|
(void)cfg_size;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_U32 VPUCheckSupportWidth()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RK_S32 VPUClientGetIOMMUStatus()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -13,13 +13,7 @@ macro(add_mpp_test module)
|
|||||||
option(${test_tag} "Build mpp ${module} unit test" ON)
|
option(${test_tag} "Build mpp ${module} unit test" ON)
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
# NOTE: use share library on Linux and Android
|
target_link_libraries(${test_name} mpp_shared utils)
|
||||||
# use static library for window debug
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(${test_name} mpp_shared utils)
|
|
||||||
else()
|
|
||||||
target_link_libraries(${test_name} mpp_shared utils)
|
|
||||||
endif()
|
|
||||||
set_target_properties(${test_name} PROPERTIES FOLDER "test")
|
set_target_properties(${test_name} PROPERTIES FOLDER "test")
|
||||||
#install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
|
#install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
|
||||||
#add_test(NAME ${test_name} COMMAND ${test_name})
|
#add_test(NAME ${test_name} COMMAND ${test_name})
|
||||||
@@ -54,7 +48,7 @@ macro(add_legacy_test module)
|
|||||||
option(${test_tag} "Build legacy ${module} unit test" ON)
|
option(${test_tag} "Build legacy ${module} unit test" ON)
|
||||||
if(${test_tag})
|
if(${test_tag})
|
||||||
add_executable(${test_name} ${test_name}.c)
|
add_executable(${test_name} ${test_name}.c)
|
||||||
target_link_libraries(${test_name} mpp_legacy_shared utils)
|
target_link_libraries(${test_name} mpp_shared mpp_legacy_shared utils)
|
||||||
set_target_properties(${test_name} PROPERTIES FOLDER "test")
|
set_target_properties(${test_name} PROPERTIES FOLDER "test")
|
||||||
#install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
|
#install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
|
||||||
#add_test(NAME ${test_name} COMMAND ${test_name})
|
#add_test(NAME ${test_name} COMMAND ${test_name})
|
||||||
|
Reference in New Issue
Block a user