// 开关类型 // 0: 关闭、 1: 开启 export type EnableType = 0 | 1; export enum CameraType { FACE_GRABBER = 1, // 人脸抓拍机 FACE_RECOGNITION = 2, // 人脸识别/比对摄像机, 生产了50套,1\2都是人员卡口模式 FULL_TARGET_CAMERA = 3, // 全目标分析、结构化摄像机 VEHICLE_GRABBER = 4, // 车辆识别摄像机、车辆微卡口 FULL_RECOGNITION = 5, // 态势感知摄像机 COMMON_NETWORK = 6, // 普通网络摄像机 FIRE_SAFETY_CAMERA = 7, // 安消一体化相机 GB_IPC = 8, // 国标ipc GB_NVR = 9, // 国标nvr GB_DSTIPC = 10 // 国标双光谱热成像相机 } export interface OsdItem { // 开关 iEnable: 0 | 1; iX: number; iY: number; // 位置 // 0: 左对齐、1: 右对齐、2: 居中对齐 iAlignmentMode?: 0 | 1 | 2; // 具体的值 strText?: string; } // 摄像机设置配置 export interface CameraConfig { videoAndAudio: { // 推流控制 // 0: 全时(默认)、1: 按需、2: 不推流 iPushStreamSet: 0 | 1 | 2; // 码流控制 // 0: VBR(默认)、1: CBR iStreamControl: 0 | 1; // 清晰度设置 // 0: 超清(默认)、1: 高清、2: 标清 iVideoResolutionSet: 0 | 1 | 2; // 镜像模式设置 // 0: 关闭(默认)、1: 上下、2: 左右、3: 中心 iMirrorSet: 0 | 1 | 2 | 3; // 走廊模式 // 0: 关闭(默认)、1: 打开 iCorridorMode: EnableType; // MIC设置 sMicSet: { iEnable: EnableType; // 0~100 iVolumeValue: number; }; // Speaker设置 sSpeakerSet: { iEnable: EnableType; iVolumeValue: number; }; }; snapshot: { face: { // 图片抓拍开关 // 1: 开启、0: 关闭 iFaceEnable: EnableType; // 抓拍区域设置, // x1 y1左上角坐标,x2 y2右下角坐标,全部区域[0,0,1920,1080] aFaceAreaSet: number[]; // 抓拍模式 // 0: 人脸、1: 人体、2: 人脸/人体 iFaceCaptureMode?: 0 | 1 | 2; // 抓拍人脸最小尺寸 (30~500) // 0 表示 60 1 表示 80 // 60/80 其他表示自定义 iFaceCaptureSize: number; // 抓拍人脸角度 // 0: 只抓拍正脸、1:有人即抓拍 iFaceCaptureAngle: 0 | 1; // 去重模式 // -1: 最优模式、0: 极速模式、n: 定时模式(1-10s) iFaceUpMode: number; // 视频叠加识别框开关 // 1: 开启、0: 关闭 iFaceVGAEnable: 0 | 1; }; car: { // 图片抓拍开关 // 1: 开启、0: 关闭 iCarEnable: 0 | 1; // 抓拍区域设置, // x1 y1左上角坐标,x2 y2右下角坐标,全部区域[0,0,1920,1080] aFaceAreaSet: number[]; // 抓拍模式 // 0: 机动车、1: 非机动车、2: 机动车/非机动车 iCarCaptureMode?: 0 | 1 | 2; // 工作模式 // 0: 道路模式、1: 卡口模式 iCarWorkMode: 0 | 1; // 去重模式 // -1: 最优模式、0: 极速模式、n: 定时模式(1-10s) iCarUpMode: number; // 视频叠加识别框开关 // 1: 开启、0: 关闭 iCarVGAEnable: 0 | 1; }; }; osd: { // Logo sOsdLogo: OsdItem; // 通道名称 sOsdName: OsdItem; // 时间显示控制 sOsdTime: OsdItem; // 自定义OSD_0控制 sOsdCustom0: OsdItem; // 自定义OSD_1控制 sOsdCustom1: OsdItem; // 自定义OSD_3控制 sOsdCustom2: OsdItem; // 是否显示星期 // 0: 不显示、1: 显示 iEnableWeek: 0 | 1; // 日期显示格式 // 0: yyyy-mm-dd // 1: mm-dd-yyyy // 2: dd-mm-yyyy // 3: yyyy年mm月dd日 // 4: mm月dd日yyyy年 // 5: dd日mm月yyyy年 iDateFormat: number; // 字体大小 // 0: 大、1: 中、2: 小、3: 自适应 iFontSize: 0 | 1 | 2 | 3; // OSD反色 // 0: 关闭、1: 打开 iOsdColorReverse: EnableType; // 字体颜色 // 0: 白色、1: 黑色、2: 红色、3: 蓝色、4: 橙色、5: 绿色 iFontColor: number; // 背景颜色 // 0: 白色、1: 黑色 iBgColor: 0 | 1; // 背景透明度 // 0: 透明、1: 半透明、2: 全透明 iBgTransparency: number; // logo Url strLogoUrl: string; iLogoWidth: number; iLogoHeight: number; }; others: { // 指示灯开关 // 0: 关闭、1: 打开 2: 打开远程监控 iEnableLed: 0 | 1 | 2; // 时区设置 strTimeZone: string; // 0: 普通录像(默认)、1: 抓拍录像、2: 告警录像 iVideoRecType: 0 | 1 | 2; // 报警灯设置 sAlarmLightSet: { iEnable: EnableType; // 灯亮时长, 单位s iTimeLong: number; }; // 警笛设置 sSirenSet: { iEnable: EnableType; // 报警音时长, 单位s iTimeLong: number; // 报警音选项 iAlarmAudio: number; }; // 网络设置 sNetConfig: { // 模式 // 1: DHCP、0: 静态 iDhcpMode: 0 | 1; // IP地址 strIpAddr: string; // 子网编码 strNetMask: string; // 默认网关 strGateWay: string; // 首选DNS strDns: string; // 备用DNS strBackDns: string; // 联网保护 blInterNetReset: EnableType; }; }; } export interface SDInfo { status: number; // 使用量 cnt: number; // 总量 total: number; } export interface UpgradeInfo { id?: number; sn?: string; name?: string; address?: string; deviceType?: number; deviceModel?: string; // 当前版本 firmwareVersion?: string; // 可升级最小版本 sourceVersion?: string; // 最新版本 targetVersion?: string; depict?: string; // 描述 // 固件版本ID firmwareId?: number; } export interface DeviceLabel { id: number; name: string; type: number; } export interface CameraChannelsData { ability: string; brand: number; channel: number; model: string; name: string; status: number; version: string; } export interface CameraStreamsData { app: string; appId: string; autoRecord: boolean; autoStart: boolean; channel: string; channelSerial: string; clientIP: string; clientId: string; createdTime: number; deviceId: string; flvUrl: string; rtmpUrl: string; sessions: 0; updatedTime: string; } export interface GBCameraData { app: string; appId: string; gbId: string; channels: Array; channelsCount: number; streams: Array; } export interface CameraInfo extends GBCameraData { // id id?: string; // 设备SN sn?: string; // 设备名称 name?: string; // 设备状态 0: 离线;1: 正常 status?: 0 | 1 | 'online'; // 推流状态 0: 未推流 1: 推流中 streamStatus?: 0 | 1; // 最近更新时间 updateTime?: number; // 设备类型 deviceType?: number; // 设备型号 deviceModel?: string; cid?: string; // 联网状态 networkType?: number; // ip地址 ip?: string; // mac地址 mac?: string; // 设备品牌 1-> SENSORO-Lins deviceCompany?: number; // 地址 address?: string; // 设备图 deviceImg?: string; // 设备安装现场图 sceneImg?: string; // alpha 版本 alphaVersion?: string; // 硬件版本 hardwareVersion?: string; // 固件版本 firmwareVersion?: string; // 算法版本 algorithmicVersion?: string; // 经纬度 latitude?: number; longitude?: number; lng?: number; lat?: number; // 安装方式 installationMode?: number; // 安装朝向 orientations?: number; // 进出方向 direction?: number; // 设备直播拉流地址 videoPullUrl?: string; rtmpUrl?: string; flvUrl?: string; m3u8Url?: string; // 0->不支持音频 1->支持音频 audioSupport?: number; // 0->不支持远程通话, 1->支持远程通话 callSupport?: number; // 0->不支持远程告警音, 1->支持远程告警音 warningSupport?: number; // 1标清:SD 2高清:HD 3超清:FHD 表示当前视频支持的最高清晰度 videoQualitySupport?: number; // SD卡信息 sdCard?: SDInfo; // 标签 labels?: DeviceLabel[]; // 是否有升级包 hasUpgradeVersion?: boolean; // 推流模式 streamMode?: number; // 部署时间 creatTime?: number; createTime?: number; // type: string; // 地图额外补充字段 deviceId?: string; } export interface GBCameraChannel { // 通道编号 serial: string; // 名称 name: string; } export interface GBCameraStream { // 是否推流 isLive: boolean; // flvUrl: string; rtmpUrl: string; // 通道编号 channelSerial: string; } export interface GBCameraInfo { // id id: string; gbId: string; // 设备SN sn: string; // 设备名称 name: string; // 厂家 vender: string; //通道数量 channelsCount: number; // 最大心跳超时次数 heartbeatCount: number; // ip地址 host: string; // 端口号 port: number; // 设备状态 未注册,在线,离线 status: 'unregistered' | 'online' | 'offline'; // 设备类型 type: string; // 国标注册编号 username: string; // 设备注册密码 password: string; // 订阅周期 subscribeInterval: number; // 探测范围 detectionRange: number; // 心跳周期 heartbeatInterval: number; // 注册有效时间 registerExpiration: number; // 最近心跳时间 latestHeartbeatTime: number; // 最近注册时间 latestRegisterTime: number; // 经纬度 lat: number; lng: number; // 坐标 address: string; // 是否支持ptz云台 isSupportPtz: boolean; // 传输协议 commandTransport: string; channels: GBCameraChannel[]; streams: GBCameraStream[]; } export interface GBSIPInfo { // 国标服务编号 sipSerial: string; // 国标服务域 sipRealm: string; // 服务IP sipHost: string; // 服务端口 sipPort: string; }