fix isp and write bash script for set up ftp server in Hi3516
This commit is contained in:
parent
6159bbb27d
commit
c289d4ee7d
|
@ -1,18 +1,23 @@
|
||||||
# Xmake cache
|
# Xmake cache
|
||||||
.xmake/
|
.xmake
|
||||||
.vscode/
|
.vscode
|
||||||
.devenv/
|
.devenv
|
||||||
.direnv/
|
.direnv
|
||||||
Hi3516CV500_SDK/
|
Hi3516CV500_SDK
|
||||||
toolchains/
|
toolchains
|
||||||
arm-himix200-linux/
|
arm-himix200-linux
|
||||||
build/
|
build
|
||||||
Rouring
|
Rouring
|
||||||
Rouring-Vision
|
Rouring-Vision
|
||||||
smart_trash_bin
|
smart_trash_bin
|
||||||
nnie-yolov3-demo
|
nnie-yolov3-demo
|
||||||
dtof_sensor_driver
|
dtof_sensor_driver
|
||||||
|
|
||||||
|
# Build Cache
|
||||||
|
*.a
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
|
||||||
# MacOS Cache
|
# MacOS Cache
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Alias
|
||||||
|
alias a := all
|
||||||
|
alias c := clean
|
||||||
|
alias b := build
|
||||||
|
|
||||||
|
# Default Target
|
||||||
|
default := "CatFeeder"
|
||||||
|
|
||||||
|
config:
|
||||||
|
xmake f -v -c -y
|
||||||
|
|
||||||
|
reload:
|
||||||
|
direnv reload
|
||||||
|
|
||||||
|
build:
|
||||||
|
xmake b {{default}}
|
||||||
|
|
||||||
|
rebuild:
|
||||||
|
xmake b -r {{default}}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
xmake c
|
||||||
|
|
||||||
|
sync:
|
||||||
|
lftp -v -c 'open -e "mirror -R build/cross/arm/ /" ftp://root:@192.168.137.3/'
|
||||||
|
|
||||||
|
ftp:
|
||||||
|
lftp ftp://root:@192.168.137.3/
|
||||||
|
|
||||||
|
ftp-tui:
|
||||||
|
termscp -P "" ftp://root@192.168.137.3:21:/
|
||||||
|
|
||||||
|
tty:
|
||||||
|
minicom -D /dev/ttyUSB0 -b 115200
|
||||||
|
|
||||||
|
all: build sync
|
11
CCPP.nix
11
CCPP.nix
|
@ -18,17 +18,6 @@
|
||||||
clang-tools
|
clang-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable languages support
|
|
||||||
# languages.cplusplus.enable = true;
|
|
||||||
# env = {
|
|
||||||
# NIX_LD_LIBRARY_PATH = with pkgs;
|
|
||||||
# lib.makeLibraryPath [
|
|
||||||
# stdenv_32bit.cc.cc
|
|
||||||
# glibc_multi
|
|
||||||
# ];
|
|
||||||
# NIX_LD = with pkgs; lib.fileContents "${stdenv_32bit.cc}/nix-support/dynamic-linker";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# When enter shell, exec ...
|
# When enter shell, exec ...
|
||||||
enterShell = ''
|
enterShell = ''
|
||||||
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
||||||
|
|
14
live555.lua
14
live555.lua
|
@ -5,8 +5,8 @@ set_homepage("http://www.live555.com")
|
||||||
set_urls("http://www.live555.com/liveMedia/public/live.$(version).tar.gz")
|
set_urls("http://www.live555.com/liveMedia/public/live.$(version).tar.gz")
|
||||||
add_versions("2024.11.28", "a9af16f46d2f4c7ccdbfc4b617480503d27cccb46fa5abb7dfd8a25951b44cc3")
|
add_versions("2024.11.28", "a9af16f46d2f4c7ccdbfc4b617480503d27cccb46fa5abb7dfd8a25951b44cc3")
|
||||||
|
|
||||||
add_configs("no_openssl", {description = "Set 1 if no OpenSSL", default = "1", values = {"0", "1"}})
|
add_configs("no_openssl", { description = "Set 1 if no OpenSSL", default = "1", values = { "0", "1" } })
|
||||||
add_configs("no_std_lib", {description = "Set 1 if no C++20 STD LIB", default = "1", values = {"0", "1"}})
|
add_configs("no_std_lib", { description = "Set 1 if no C++20 STD LIB", default = "1", values = { "0", "1" } })
|
||||||
|
|
||||||
add_includedirs(
|
add_includedirs(
|
||||||
"include/BasicUsageEnvironment",
|
"include/BasicUsageEnvironment",
|
||||||
|
@ -15,7 +15,8 @@ add_includedirs(
|
||||||
"include/UsageEnvironment"
|
"include/UsageEnvironment"
|
||||||
)
|
)
|
||||||
|
|
||||||
local compile_opts = "COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 "
|
local compile_opts =
|
||||||
|
"COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 "
|
||||||
|
|
||||||
local make_scipt = [[
|
local make_scipt = [[
|
||||||
C = c
|
C = c
|
||||||
|
@ -36,7 +37,7 @@ LIBS_FOR_GUI_APPLICATION =
|
||||||
EXE =
|
EXE =
|
||||||
]]
|
]]
|
||||||
|
|
||||||
on_load(function (package)
|
on_load(function(package)
|
||||||
local no_openssl = package:config("no_openssl") or "1"
|
local no_openssl = package:config("no_openssl") or "1"
|
||||||
local no_std_lib = package:config("no_std_lib") or "1"
|
local no_std_lib = package:config("no_std_lib") or "1"
|
||||||
package:add("defines", "NO_OPENSSL=" .. no_openssl)
|
package:add("defines", "NO_OPENSSL=" .. no_openssl)
|
||||||
|
@ -73,7 +74,6 @@ on_install(function(package)
|
||||||
import("package.tools.make").install(package)
|
import("package.tools.make").install(package)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
on_test(function (package)
|
on_test(function(package)
|
||||||
assert(package:has_cxxtypes("RTSPServer", {includes = "liveMedia.hh"}))
|
assert(package:has_cxxtypes("RTSPServer", { includes = "liveMedia.hh" }))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
mount /dev/mmcblk0p5 /mnt/sd
|
||||||
|
tcpsvd 0 21 ftpd -w /mnt/sd &
|
||||||
|
cd /mnt/sd
|
13
src/main.cpp
13
src/main.cpp
|
@ -13,14 +13,14 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
zlog_category_t *log = nullptr;
|
zlog_category_t *log = nullptr;
|
||||||
|
|
||||||
// init log and check log.conf
|
// Init log and check log.conf
|
||||||
result = zlog_init("log.conf");
|
result = zlog_init("log.conf");
|
||||||
if (result) {
|
if (result) {
|
||||||
std::cout << "zlog init failed! Please check log.conf!\n";
|
std::cout << "zlog init failed! Please check log.conf!\n";
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get log cat for main to print
|
// Get log cat for main to print
|
||||||
log = zlog_get_category("cat");
|
log = zlog_get_category("cat");
|
||||||
if (!log) {
|
if (!log) {
|
||||||
std::cout << "Main get log failed!\n";
|
std::cout << "Main get log failed!\n";
|
||||||
|
@ -36,10 +36,11 @@ int main(int argc, char** argv) {
|
||||||
zlog_warn(log, "Can't Create log dir FOR %s", file_error.message().c_str());
|
zlog_warn(log, "Can't Create log dir FOR %s", file_error.message().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// eb3516VideoInit();
|
eb3516VideoInit();
|
||||||
// eb3516VideoStart();
|
eb3516VideoStart();
|
||||||
eb3516Yolov3Init("./coco_yolov3_detect.wk", "./dog_bike_car_416x416.bgr");
|
eb3516VideoStop();
|
||||||
eb3516Yolov3Exit();
|
// eb3516Yolov3Init("./coco_yolov3_detect.wk", "./dog_bike_car_416x416.bgr");
|
||||||
|
// eb3516Yolov3Exit();
|
||||||
|
|
||||||
zlog_fini();
|
zlog_fini();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ typedef struct hiSAMPLE_VPSS_CONFIG_S {
|
||||||
VPSS_CHN_ATTR_S astChnAttrs[VPSS_MAX_PHY_CHN_NUM];
|
VPSS_CHN_ATTR_S astChnAttrs[VPSS_MAX_PHY_CHN_NUM];
|
||||||
} SAMPLE_VPSS_CONFIG_S;
|
} SAMPLE_VPSS_CONFIG_S;
|
||||||
|
|
||||||
static zlog_category_t* log_video = NULL;
|
static zlog_category_t *log_video = NULL;
|
||||||
|
|
||||||
// Sensor Info
|
// Sensor Info
|
||||||
static SAMPLE_VI_CONFIG_S g_stViConfig = {0};
|
static SAMPLE_VI_CONFIG_S g_stViConfig = {0};
|
||||||
|
@ -39,7 +39,7 @@ static const PIC_SIZE_E g_PicSizes[3] = {PIC_1080P, PIC_720P, PIC_1080P};
|
||||||
static const VENC_CHN g_VencChn[3] = {0, 1, 2};
|
static const VENC_CHN g_VencChn[3] = {0, 1, 2};
|
||||||
static const PAYLOAD_TYPE_E g_CodecTypes[3] = {PT_H265, PT_H264, PT_JPEG};
|
static const PAYLOAD_TYPE_E g_CodecTypes[3] = {PT_H265, PT_H264, PT_JPEG};
|
||||||
|
|
||||||
static HI_S32 VPSS_GetDefChnAttr(VPSS_CHN_ATTR_S* pstVpssChnAttr,
|
static HI_S32 VPSS_GetDefChnAttr(VPSS_CHN_ATTR_S *pstVpssChnAttr,
|
||||||
VPSS_CHN VpssChn, PIC_SIZE_E enPicSize) {
|
VPSS_CHN VpssChn, PIC_SIZE_E enPicSize) {
|
||||||
SIZE_S stSize;
|
SIZE_S stSize;
|
||||||
SAMPLE_COMM_SYS_GetPicSize(enPicSize, &stSize);
|
SAMPLE_COMM_SYS_GetPicSize(enPicSize, &stSize);
|
||||||
|
@ -59,8 +59,8 @@ static HI_S32 VPSS_GetDefChnAttr(VPSS_CHN_ATTR_S* pstVpssChnAttr,
|
||||||
return HI_SUCCESS;
|
return HI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HI_S32 VPSS_GetParams(SAMPLE_VPSS_CONFIG_S* pstVpssConfig,
|
static HI_S32 VPSS_GetParams(SAMPLE_VPSS_CONFIG_S *pstVpssConfig,
|
||||||
SIZE_S* pstMaxSize, HI_BOOL bSnap) {
|
SIZE_S *pstMaxSize, HI_BOOL bSnap) {
|
||||||
// 设置 VPSS 组
|
// 设置 VPSS 组
|
||||||
pstVpssConfig->s32GrpId = !bSnap ? 0 : 1;
|
pstVpssConfig->s32GrpId = !bSnap ? 0 : 1;
|
||||||
pstVpssConfig->stGrpAttr.u32MaxW = pstMaxSize->u32Width;
|
pstVpssConfig->stGrpAttr.u32MaxW = pstMaxSize->u32Width;
|
||||||
|
@ -102,8 +102,8 @@ bool eb3516VideoInit(void) {
|
||||||
|
|
||||||
// Get Sensor(VI) Info: picture size , frame rate
|
// Get Sensor(VI) Info: picture size , frame rate
|
||||||
SAMPLE_COMM_VI_GetSensorInfo(&g_stViConfig);
|
SAMPLE_COMM_VI_GetSensorInfo(&g_stViConfig);
|
||||||
SAMPLE_COMM_VI_GetSizeBySensor(
|
SAMPLE_COMM_VI_GetSizeBySensor(g_stViConfig.astViInfo[0].stSnsInfo.enSnsType,
|
||||||
g_stViConfig.astViInfo[0].stSnsInfo.enSnsType, &enPicSize);
|
&enPicSize);
|
||||||
SAMPLE_COMM_SYS_GetPicSize(enPicSize, &stSize);
|
SAMPLE_COMM_SYS_GetPicSize(enPicSize, &stSize);
|
||||||
SAMPLE_COMM_VI_GetFrameRateBySensor(
|
SAMPLE_COMM_VI_GetFrameRateBySensor(
|
||||||
g_stViConfig.astViInfo[0].stSnsInfo.enSnsType, &u32Framerate);
|
g_stViConfig.astViInfo[0].stSnsInfo.enSnsType, &u32Framerate);
|
||||||
|
@ -136,8 +136,7 @@ bool eb3516VideoInit(void) {
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1] = 1; // snap pipe
|
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1] = 1; // snap pipe
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[2] = -1;
|
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[2] = -1;
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[3] = -1;
|
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[3] = -1;
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.enMastPipeMode =
|
g_stViConfig.astViInfo[0].stPipeInfo.enMastPipeMode = VI_OFFLINE_VPSS_OFFLINE;
|
||||||
VI_OFFLINE_VPSS_OFFLINE;
|
|
||||||
// 设置 VI 通道信息
|
// 设置 VI 通道信息
|
||||||
g_stViConfig.astViInfo[0].stChnInfo.ViChn = 0;
|
g_stViConfig.astViInfo[0].stChnInfo.ViChn = 0;
|
||||||
g_stViConfig.astViInfo[0].stChnInfo.enPixFormat =
|
g_stViConfig.astViInfo[0].stChnInfo.enPixFormat =
|
||||||
|
@ -152,8 +151,7 @@ bool eb3516VideoInit(void) {
|
||||||
g_stViConfig.astViInfo[0].stSnapInfo.SnapPipe = 1;
|
g_stViConfig.astViInfo[0].stSnapInfo.SnapPipe = 1;
|
||||||
g_stViConfig.astViInfo[0].stSnapInfo.enVideoPipeMode =
|
g_stViConfig.astViInfo[0].stSnapInfo.enVideoPipeMode =
|
||||||
VI_OFFLINE_VPSS_OFFLINE;
|
VI_OFFLINE_VPSS_OFFLINE;
|
||||||
g_stViConfig.astViInfo[0].stSnapInfo.enSnapPipeMode =
|
g_stViConfig.astViInfo[0].stSnapInfo.enSnapPipeMode = VI_OFFLINE_VPSS_OFFLINE;
|
||||||
VI_OFFLINE_VPSS_OFFLINE;
|
|
||||||
|
|
||||||
// 配置 VPSS
|
// 配置 VPSS
|
||||||
VPSS_GetParams(&g_stVpss0Config, &stSize, false);
|
VPSS_GetParams(&g_stVpss0Config, &stSize, false);
|
||||||
|
@ -224,8 +222,7 @@ bool eb3516VideoStart(void) {
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1],
|
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1],
|
||||||
g_stViConfig.astViInfo[0].stChnInfo.ViChn, g_stVpss1Config.s32GrpId);
|
g_stViConfig.astViInfo[0].stChnInfo.ViChn, g_stVpss1Config.s32GrpId);
|
||||||
if (s32Ret != HI_SUCCESS) {
|
if (s32Ret != HI_SUCCESS) {
|
||||||
zlog_error(log_video, "VI Snap Pipe bind VPSS1 failed with %#x!\n",
|
zlog_error(log_video, "VI Snap Pipe bind VPSS1 failed with %#x!\n", s32Ret);
|
||||||
s32Ret);
|
|
||||||
goto EXIT_VPSS_STOP;
|
goto EXIT_VPSS_STOP;
|
||||||
}
|
}
|
||||||
zlog_debug(log_video, "eb3516 VI Bind VPSS1 Success");
|
zlog_debug(log_video, "eb3516 VI Bind VPSS1 Success");
|
||||||
|
@ -235,12 +232,11 @@ bool eb3516VideoStart(void) {
|
||||||
SAMPLE_COMM_VENC_GetGopAttr(VENC_GOPMODE_NORMALP, &stGopAttr);
|
SAMPLE_COMM_VENC_GetGopAttr(VENC_GOPMODE_NORMALP, &stGopAttr);
|
||||||
|
|
||||||
// 编码 h.265 4k
|
// 编码 h.265 4k
|
||||||
s32Ret =
|
s32Ret = SAMPLE_COMM_VENC_Creat(g_VencChn[0], g_CodecTypes[0], g_PicSizes[0],
|
||||||
SAMPLE_COMM_VENC_Creat(g_VencChn[0], g_CodecTypes[0], g_PicSizes[0],
|
|
||||||
SAMPLE_RC_VBR, 0, HI_FALSE, &stGopAttr);
|
SAMPLE_RC_VBR, 0, HI_FALSE, &stGopAttr);
|
||||||
if (s32Ret != HI_SUCCESS) {
|
if (s32Ret != HI_SUCCESS) {
|
||||||
zlog_error(log_video, "Create Venc Chn %d failed with %#x!\n",
|
zlog_error(log_video, "Create Venc Chn %d failed with %#x!\n", g_VencChn[0],
|
||||||
g_VencChn[0], s32Ret);
|
s32Ret);
|
||||||
goto EXIT_VI_VPSS_UNBIND;
|
goto EXIT_VI_VPSS_UNBIND;
|
||||||
}
|
}
|
||||||
zlog_debug(log_video, "eb3516 VENC Start Success...");
|
zlog_debug(log_video, "eb3516 VENC Start Success...");
|
||||||
|
@ -293,15 +289,13 @@ bool eb3516VideoStart(void) {
|
||||||
s32Ret = HI_MPI_SNAP_SetPipeAttr(
|
s32Ret = HI_MPI_SNAP_SetPipeAttr(
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1], &stSnapAttr);
|
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1], &stSnapAttr);
|
||||||
if (s32Ret != HI_SUCCESS) {
|
if (s32Ret != HI_SUCCESS) {
|
||||||
zlog_error(log_video, "HI_MPI_SNAP_SetPipeAttr failed with %#x!\n",
|
zlog_error(log_video, "HI_MPI_SNAP_SetPipeAttr failed with %#x!\n", s32Ret);
|
||||||
s32Ret);
|
|
||||||
goto EXIT_VO_STOP;
|
goto EXIT_VO_STOP;
|
||||||
}
|
}
|
||||||
s32Ret =
|
s32Ret =
|
||||||
HI_MPI_SNAP_EnablePipe(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1]);
|
HI_MPI_SNAP_EnablePipe(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1]);
|
||||||
if (s32Ret != HI_SUCCESS) {
|
if (s32Ret != HI_SUCCESS) {
|
||||||
zlog_error(log_video, "HI_MPI_SNAP_EnablePipe failed with %#x!\n",
|
zlog_error(log_video, "HI_MPI_SNAP_EnablePipe failed with %#x!\n", s32Ret);
|
||||||
s32Ret);
|
|
||||||
goto EXIT_VO_STOP;
|
goto EXIT_VO_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,19 +303,18 @@ bool eb3516VideoStart(void) {
|
||||||
ISP_DCF_INFO_S stIspDCF;
|
ISP_DCF_INFO_S stIspDCF;
|
||||||
HI_MPI_ISP_GetDCFInfo(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[0],
|
HI_MPI_ISP_GetDCFInfo(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[0],
|
||||||
&stIspDCF);
|
&stIspDCF);
|
||||||
strncpy((char*)stIspDCF.stIspDCFConstInfo.au8ImageDescription, "",
|
strncpy((char *)stIspDCF.stIspDCFConstInfo.au8ImageDescription, "",
|
||||||
DCF_DRSCRIPTION_LENGTH);
|
DCF_DRSCRIPTION_LENGTH);
|
||||||
strncpy((char*)stIspDCF.stIspDCFConstInfo.au8Make, "OurEDA",
|
strncpy((char *)stIspDCF.stIspDCFConstInfo.au8Make, "OurEDA",
|
||||||
DCF_DRSCRIPTION_LENGTH);
|
DCF_DRSCRIPTION_LENGTH);
|
||||||
strncpy((char*)stIspDCF.stIspDCFConstInfo.au8Model, "CatFeeder Camera",
|
strncpy((char *)stIspDCF.stIspDCFConstInfo.au8Model, "CatFeeder Camera",
|
||||||
DCF_DRSCRIPTION_LENGTH);
|
DCF_DRSCRIPTION_LENGTH);
|
||||||
snprintf((char*)stIspDCF.stIspDCFConstInfo.au8Software,
|
snprintf((char *)stIspDCF.stIspDCFConstInfo.au8Software,
|
||||||
DCF_DRSCRIPTION_LENGTH, "CatFeeder snap");
|
DCF_DRSCRIPTION_LENGTH, "CatFeeder snap");
|
||||||
s32Ret = HI_MPI_ISP_SetDCFInfo(
|
s32Ret = HI_MPI_ISP_SetDCFInfo(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[0],
|
||||||
g_stViConfig.astViInfo[0].stPipeInfo.aPipe[0], &stIspDCF);
|
&stIspDCF);
|
||||||
if (s32Ret != HI_SUCCESS) {
|
if (s32Ret != HI_SUCCESS) {
|
||||||
zlog_error(log_video, "HI_MPI_ISP_SetDCFInfo failed with %#x!\n",
|
zlog_error(log_video, "HI_MPI_ISP_SetDCFInfo failed with %#x!\n", s32Ret);
|
||||||
s32Ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 绑定 VPSS[0,0]->VENC[0]
|
// // 绑定 VPSS[0,0]->VENC[0]
|
||||||
|
@ -372,10 +365,8 @@ EXIT_VI_VPSS_UNBIND:
|
||||||
g_stViConfig.astViInfo[0].stChnInfo.ViChn,
|
g_stViConfig.astViInfo[0].stChnInfo.ViChn,
|
||||||
g_stVpss1Config.s32GrpId);
|
g_stVpss1Config.s32GrpId);
|
||||||
EXIT_VPSS_STOP:
|
EXIT_VPSS_STOP:
|
||||||
SAMPLE_COMM_VPSS_Stop(g_stVpss0Config.s32GrpId,
|
SAMPLE_COMM_VPSS_Stop(g_stVpss0Config.s32GrpId, g_stVpss0Config.abChnEnable);
|
||||||
g_stVpss0Config.abChnEnable);
|
SAMPLE_COMM_VPSS_Stop(g_stVpss1Config.s32GrpId, g_stVpss1Config.abChnEnable);
|
||||||
SAMPLE_COMM_VPSS_Stop(g_stVpss1Config.s32GrpId,
|
|
||||||
g_stVpss1Config.abChnEnable);
|
|
||||||
EXIT_VI_STOP:
|
EXIT_VI_STOP:
|
||||||
SAMPLE_COMM_VI_StopVi(&g_stViConfig);
|
SAMPLE_COMM_VI_StopVi(&g_stViConfig);
|
||||||
EXIT_SYS_STOP:
|
EXIT_SYS_STOP:
|
||||||
|
@ -396,10 +387,8 @@ void eb3516VideoStop(void) {
|
||||||
SAMPLE_COMM_VI_UnBind_VPSS(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1],
|
SAMPLE_COMM_VI_UnBind_VPSS(g_stViConfig.astViInfo[0].stPipeInfo.aPipe[1],
|
||||||
g_stViConfig.astViInfo[0].stChnInfo.ViChn,
|
g_stViConfig.astViInfo[0].stChnInfo.ViChn,
|
||||||
g_stVpss1Config.s32GrpId);
|
g_stVpss1Config.s32GrpId);
|
||||||
SAMPLE_COMM_VPSS_Stop(g_stVpss0Config.s32GrpId,
|
SAMPLE_COMM_VPSS_Stop(g_stVpss0Config.s32GrpId, g_stVpss0Config.abChnEnable);
|
||||||
g_stVpss0Config.abChnEnable);
|
SAMPLE_COMM_VPSS_Stop(g_stVpss1Config.s32GrpId, g_stVpss1Config.abChnEnable);
|
||||||
SAMPLE_COMM_VPSS_Stop(g_stVpss1Config.s32GrpId,
|
|
||||||
g_stVpss1Config.abChnEnable);
|
|
||||||
SAMPLE_COMM_VI_StopVi(&g_stViConfig);
|
SAMPLE_COMM_VI_StopVi(&g_stViConfig);
|
||||||
SAMPLE_COMM_SYS_Exit();
|
SAMPLE_COMM_SYS_Exit();
|
||||||
|
|
||||||
|
@ -418,6 +407,4 @@ bool eb3516GetPic(void) {
|
||||||
zlog_error(log_video, "Get Pipe Frame Failed");
|
zlog_error(log_video, "Get Pipe Frame Failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ extern "C"{
|
||||||
|
|
||||||
bool eb3516VideoInit(void);
|
bool eb3516VideoInit(void);
|
||||||
bool eb3516VideoStart(void);
|
bool eb3516VideoStart(void);
|
||||||
|
void eb3516VideoStop(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
59
xmake.lua
59
xmake.lua
|
@ -12,50 +12,55 @@ toolchain_end()
|
||||||
-- set_config("sdk", "/opt/hisi-linux/x86-arm/arm-himix200-linux/")
|
-- set_config("sdk", "/opt/hisi-linux/x86-arm/arm-himix200-linux/")
|
||||||
set_toolchains("arm-himix200-linux")
|
set_toolchains("arm-himix200-linux")
|
||||||
set_plat("cross")
|
set_plat("cross")
|
||||||
|
set_arch("arm")
|
||||||
set_languages("c11", "c++14")
|
set_languages("c11", "c++14")
|
||||||
|
|
||||||
--- Add requires and dependencies
|
--- Add requires and dependencies
|
||||||
add_requires("live555 2024.11.28")
|
add_requires(
|
||||||
add_requires("zlog 1.2.17", { system = false })
|
"zlog 1.2.17",
|
||||||
|
"mongoose 7.15",
|
||||||
|
"live555 2024.11.28",
|
||||||
|
{ system = false }
|
||||||
|
)
|
||||||
|
|
||||||
target("ISP")
|
target("ISP")
|
||||||
set_kind("static")
|
set_kind("static")
|
||||||
add_files("src/modules/isp/*.c")
|
add_files("src/modules/isp/*.c")
|
||||||
add_includedirs("src")
|
add_includedirs("src")
|
||||||
add_deps("sample_common")
|
add_deps("sample_common")
|
||||||
add_packages("zlog")
|
add_packages("zlog")
|
||||||
target_end()
|
target_end()
|
||||||
|
|
||||||
target("NNIE")
|
target("NNIE")
|
||||||
set_kind("static")
|
set_kind("static")
|
||||||
add_files("src/modules/nnie/*.c")
|
add_files("src/modules/nnie/*.c")
|
||||||
add_includedirs("src")
|
add_includedirs("src")
|
||||||
add_deps("sample_common", "sample_svp")
|
add_deps("sample_common", "sample_svp")
|
||||||
add_packages("zlog")
|
add_packages("zlog")
|
||||||
target_end()
|
target_end()
|
||||||
|
|
||||||
target("RTSP")
|
target("RTSP")
|
||||||
set_kind("static")
|
set_kind("static")
|
||||||
add_files("src/modules/rtsp/*.cpp")
|
add_files("src/modules/rtsp/*.cpp")
|
||||||
add_includedirs("src")
|
add_includedirs("src")
|
||||||
add_packages("live555", "zlog")
|
add_packages("live555", "zlog")
|
||||||
add_links("pthread")
|
add_links("pthread")
|
||||||
target_end()
|
target_end()
|
||||||
|
|
||||||
target("CatFeeder")
|
target("CatFeeder")
|
||||||
set_kind("binary")
|
set_kind("binary")
|
||||||
add_includedirs("src")
|
add_includedirs("src")
|
||||||
add_files("src/*.cpp")
|
add_files("src/*.cpp")
|
||||||
add_deps("hi_library", "ISP", "NNIE", "RTSP")
|
add_deps("hi_library", "ISP", "NNIE", "RTSP")
|
||||||
add_packages("zlog")
|
add_packages("zlog")
|
||||||
add_links("stdc++fs")
|
add_links("stdc++fs")
|
||||||
after_build(function(target)
|
after_build(function(target)
|
||||||
os.cp("src/log.conf", "$(buildir)/cross/arm/release")
|
os.cp("src/log.conf", "$(buildir)/cross/arm/release")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if is_mode("debug") then
|
if is_mode("debug") then
|
||||||
add_defines("DEBUG")
|
add_defines("DEBUG")
|
||||||
set_symbols("debug")
|
set_symbols("debug")
|
||||||
set_optimize("none")
|
set_optimize("none")
|
||||||
end
|
end
|
||||||
target_end()
|
target_end()
|
||||||
|
|
Loading…
Reference in New Issue