调整编译
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)
|
||||
$(eval dir := $(BUILD_DIR_ROOT)/windows_amd64)
|
||||
@cp -r deploy/easyvqd/* $(dir)
|
||||
@cp -r deploy/win/ $(dir)/VqdSDK/
|
||||
@cp -r *dll $(dir)
|
||||
@mv $(dir)/bin $(dir)/easyvqd.exe
|
||||
@upx $(dir)/easyvqd.exe
|
||||
@make zip/windows
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "easyvqd",
|
||||
"author": "TSINGSEE",
|
||||
"auto_update": true,
|
||||
"description": "将音频文件推送到GB设备",
|
||||
"description": "将视频逐帧诊断分析",
|
||||
"display_name": "EasyVQD",
|
||||
"pid": 0,
|
||||
"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.WriteTimeout(bc.Server.HTTP.Timeout.Duration()),
|
||||
)
|
||||
lis, err := net.Listen("tcp", ":8089")
|
||||
lis, err := net.Listen("tcp", ":")
|
||||
if err != nil {
|
||||
fmt.Printf("创建监听器失败: %v\n", err)
|
||||
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) {
|
||||
if codes == VIDEO_CODEC_H264 {
|
||||
v, ok := VqdTaskMap.LoadTaskMap(s)
|
||||
if ok {
|
||||
v.SendData(data, VIDEO_CODEC_H264)
|
||||
}
|
||||
} else {
|
||||
v, ok := VqdTaskMap.LoadTaskMap(s)
|
||||
if ok {
|
||||
v.SendData(data, VIDEO_CODEC_H265)
|
||||
}
|
||||
}
|
||||
|
||||
//slog.Debug("cb IFrame", "name", s, "codes", codes)
|
||||
|
||||
}
|
||||
time.AfterFunc(time.Duration(5)*time.Second, func() {
|
||||
// 启用诊断分析
|
||||
@ -105,7 +114,10 @@ func (c *Core) InitVqdTask() {
|
||||
all, _, err := c.VqdTaskCore.FindVqdTaskAll()
|
||||
if err == nil {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,9 +210,7 @@ func (v *VQDHandle) RunFrame() {
|
||||
break
|
||||
}
|
||||
cdata = data
|
||||
if !IsCurTimeInRecordPlan(v.info.Plans, cdata.now) {
|
||||
continue
|
||||
}
|
||||
|
||||
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.ToSlash(fpath)
|
||||
@ -411,7 +409,9 @@ func (v *VQDHandle) parseVQD(result VQDResult) (AbnormalModel, bool) {
|
||||
return abnormals, isabnormal
|
||||
}
|
||||
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)
|
||||
if err != nil {
|
||||
slog.Error("I帧转YUV失败: ", "TaskID", v.info.TaskID, "err", err)
|
||||
|
||||
@ -34,7 +34,7 @@ export default function VqdAlarmPage() {
|
||||
ErrorHandle(err);
|
||||
throw err;
|
||||
}),
|
||||
// refetchInterval: 4000,
|
||||
refetchInterval: 4000,
|
||||
retry: 2,
|
||||
});
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useRef, useState, useMemo } from "react";
|
||||
import { Table, Button, Space, Popconfirm, Flex, message, Tooltip, Switch,Popover,Tag } from "antd";
|
||||
import { Table, Button, Space, Popconfirm, Flex, message, Tooltip, Switch, Popover, Tag } from "antd";
|
||||
import { EditOutlined, DeleteOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
||||
import { GetVqdTask, DeleteVqdTask, UpdateVqdTask } from "../api/vqdtask";
|
||||
@ -144,24 +144,7 @@ export default function VqdTaskPage() {
|
||||
),
|
||||
},
|
||||
{
|
||||
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: "拉流状态",
|
||||
title: "状态",
|
||||
dataIndex: "status",
|
||||
align: "center",
|
||||
render: (text, record) => (
|
||||
@ -180,6 +163,23 @@ export default function VqdTaskPage() {
|
||||
</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: "创建日期",
|
||||
dataIndex: "created_at",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user