调整编译
This commit is contained in:
parent
011694d7a7
commit
49e6735cf0
2
Makefile
2
Makefile
@ -184,6 +184,8 @@ pack/windows:
|
|||||||
@make build/local GOOS=$(GOOS) GOARCH=$(GOARCH)
|
@make build/local GOOS=$(GOOS) GOARCH=$(GOARCH)
|
||||||
$(eval dir := $(BUILD_DIR_ROOT)/windows_amd64)
|
$(eval dir := $(BUILD_DIR_ROOT)/windows_amd64)
|
||||||
@cp -r deploy/easyvqd/* $(dir)
|
@cp -r deploy/easyvqd/* $(dir)
|
||||||
|
@cp -r deploy/win/ $(dir)/VqdSDK/
|
||||||
|
@cp -r *dll $(dir)
|
||||||
@mv $(dir)/bin $(dir)/easyvqd.exe
|
@mv $(dir)/bin $(dir)/easyvqd.exe
|
||||||
@upx $(dir)/easyvqd.exe
|
@upx $(dir)/easyvqd.exe
|
||||||
@make zip/windows
|
@make zip/windows
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "easyvqd",
|
"name": "easyvqd",
|
||||||
"author": "TSINGSEE",
|
"author": "TSINGSEE",
|
||||||
"auto_update": true,
|
"auto_update": true,
|
||||||
"description": "将音频文件推送到GB设备",
|
"description": "将视频逐帧诊断分析",
|
||||||
"display_name": "EasyVQD",
|
"display_name": "EasyVQD",
|
||||||
"pid": 0,
|
"pid": 0,
|
||||||
"web_server": true,
|
"web_server": true,
|
||||||
|
|||||||
BIN
deploy/lin/libdrm.so.2
Normal file
BIN
deploy/lin/libdrm.so.2
Normal file
Binary file not shown.
BIN
deploy/lin/libgomp.so.1
Normal file
BIN
deploy/lin/libgomp.so.1
Normal file
Binary file not shown.
BIN
deploy/lin/libva-drm.so.1
Normal file
BIN
deploy/lin/libva-drm.so.1
Normal file
Binary file not shown.
BIN
deploy/lin/libva.so.1
Normal file
BIN
deploy/lin/libva.so.1
Normal file
Binary file not shown.
@ -49,7 +49,7 @@ func Run(bc *conf.Bootstrap) {
|
|||||||
server.ReadTimeout(bc.Server.HTTP.Timeout.Duration()),
|
server.ReadTimeout(bc.Server.HTTP.Timeout.Duration()),
|
||||||
server.WriteTimeout(bc.Server.HTTP.Timeout.Duration()),
|
server.WriteTimeout(bc.Server.HTTP.Timeout.Duration()),
|
||||||
)
|
)
|
||||||
lis, err := net.Listen("tcp", ":8089")
|
lis, err := net.Listen("tcp", ":")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("创建监听器失败: %v\n", err)
|
fmt.Printf("创建监听器失败: %v\n", err)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -78,11 +78,20 @@ func NewCore(HostCore *host.Core, VqdTaskCore *vqd.Core, Cfg *conf.Bootstrap) *C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.HostCore.CbIFrame = func(s string, data []byte, codes int) {
|
core.HostCore.CbIFrame = func(s string, data []byte, codes int) {
|
||||||
|
if codes == VIDEO_CODEC_H264 {
|
||||||
|
v, ok := VqdTaskMap.LoadTaskMap(s)
|
||||||
|
if ok {
|
||||||
|
v.SendData(data, VIDEO_CODEC_H264)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
v, ok := VqdTaskMap.LoadTaskMap(s)
|
v, ok := VqdTaskMap.LoadTaskMap(s)
|
||||||
if ok {
|
if ok {
|
||||||
v.SendData(data, VIDEO_CODEC_H265)
|
v.SendData(data, VIDEO_CODEC_H265)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//slog.Debug("cb IFrame", "name", s, "codes", codes)
|
//slog.Debug("cb IFrame", "name", s, "codes", codes)
|
||||||
|
|
||||||
}
|
}
|
||||||
time.AfterFunc(time.Duration(5)*time.Second, func() {
|
time.AfterFunc(time.Duration(5)*time.Second, func() {
|
||||||
// 启用诊断分析
|
// 启用诊断分析
|
||||||
@ -105,7 +114,10 @@ func (c *Core) InitVqdTask() {
|
|||||||
all, _, err := c.VqdTaskCore.FindVqdTaskAll()
|
all, _, err := c.VqdTaskCore.FindVqdTaskAll()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
for _, vqdTask := range all {
|
for _, vqdTask := range all {
|
||||||
c.AddTaskVqd(vqdTask.ID)
|
errs := c.AddTaskVqd(vqdTask.ID)
|
||||||
|
if errs != nil {
|
||||||
|
slog.Error("vqd init add task", "err", errs.Error())
|
||||||
|
}
|
||||||
time.Sleep(200 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,9 +210,7 @@ func (v *VQDHandle) RunFrame() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
cdata = data
|
cdata = data
|
||||||
if !IsCurTimeInRecordPlan(v.info.Plans, cdata.now) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
now := time.Now().UnixMilli()
|
now := time.Now().UnixMilli()
|
||||||
fpath := filepath.Join(cvqdImgsDir, fmt.Sprintf("%s_%d_%d_%d.jpg", v.info.ChannelID, v.info.TemplateID, v.info.PlanID, now))
|
fpath := filepath.Join(cvqdImgsDir, fmt.Sprintf("%s_%d_%d_%d.jpg", v.info.ChannelID, v.info.TemplateID, v.info.PlanID, now))
|
||||||
fpath = filepath.ToSlash(fpath)
|
fpath = filepath.ToSlash(fpath)
|
||||||
@ -411,7 +409,9 @@ func (v *VQDHandle) parseVQD(result VQDResult) (AbnormalModel, bool) {
|
|||||||
return abnormals, isabnormal
|
return abnormals, isabnormal
|
||||||
}
|
}
|
||||||
func (v *VQDHandle) SendData(buf []byte, _codec int) {
|
func (v *VQDHandle) SendData(buf []byte, _codec int) {
|
||||||
|
if !IsCurTimeInRecordPlan(v.info.Plans, time.Now()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
w, h, data, err := v.decoder.PushDataEx(buf, _codec)
|
w, h, data, err := v.decoder.PushDataEx(buf, _codec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("I帧转YUV失败: ", "TaskID", v.info.TaskID, "err", err)
|
slog.Error("I帧转YUV失败: ", "TaskID", v.info.TaskID, "err", err)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export default function VqdAlarmPage() {
|
|||||||
ErrorHandle(err);
|
ErrorHandle(err);
|
||||||
throw err;
|
throw err;
|
||||||
}),
|
}),
|
||||||
// refetchInterval: 4000,
|
refetchInterval: 4000,
|
||||||
retry: 2,
|
retry: 2,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -144,24 +144,7 @@ export default function VqdTaskPage() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "描述",
|
title: "状态",
|
||||||
dataIndex: "des",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "启用",
|
|
||||||
dataIndex: "enable",
|
|
||||||
align: "center",
|
|
||||||
render: (text, record) => (
|
|
||||||
<Space>
|
|
||||||
<Switch value={text} defaultChecked onChange={(t) => {
|
|
||||||
saveTemplate(record, t)
|
|
||||||
}} />
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "拉流状态",
|
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
@ -180,6 +163,23 @@ export default function VqdTaskPage() {
|
|||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "启用",
|
||||||
|
dataIndex: "enable",
|
||||||
|
align: "center",
|
||||||
|
render: (text, record) => (
|
||||||
|
<Space>
|
||||||
|
<Switch value={text} defaultChecked onChange={(t) => {
|
||||||
|
saveTemplate(record, t)
|
||||||
|
}} />
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "描述",
|
||||||
|
dataIndex: "des",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "创建日期",
|
title: "创建日期",
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user