- XiaoFeng.Onvif 目录
- Onvif基本使用
-
- XiaoFeng.Onvif 目录
- Onvif基本使用
-
如何在c#种使用onvif作者 : 管理员 发布于 2023-04-25 23:09:22 浏览 1422 次在c#代码中集成onvif
基本用法
using XiaoFeng.Onvif; var ip = "192.168.12.2"; var port=8088; var user = "onvif"; var pass = "123456"; var iPEndPoint = new IPEndPoint(IPAddress.Parse(ip), port); var resu = await DeviceService.DiscoveryOnvif(3); var onvifUTCDateTime = await DeviceService.GetSystemDateAndTime(iPEndPoint); var info = await DeviceService.GetDeviceInformation(iPEndPoint, user, pass, onvifUTCDateTime); var abilities= await DeviceService.GetCapabilities(iPEndPoint); var tokens = await MediaService.GetProfiles(iPEndPoint, user, pass, onvifUTCDateTime); var streamUri = await MediaService.GetStreamUri(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0]); var img = await MediaService.GetSnapshotUri(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0]); await PTZService.GetStatus(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0]); await PTZService.SetHomePosition(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0]); await PTZService.AbsoluteMove(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0], 0, 0); await PTZService.ContinuousMove(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0], 0.6, 0.2, 1); await PTZService.RelativeMove(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0], 0.8, 0.5, 0.5); await PTZService.GotoHomePosition(iPEndPoint, user, pass, onvifUTCDateTime, tokens[0], 0.3, 1, 1);
所有评论(1)用户 cchong005 评论于 2024-06-01 16:05这个东西太强了,救了我的命