













这个监控设备模拟器近期有了重大的更新升级,一个是onvif和28181同时支持云台和预置位操作,onvif还支持子码流切换,一个是消息打印全部改成了表格展示,双击弹出详细的收发数据,交互友好比之前有了极大的提升,随着现场各种调试打印,之前搞的是文本框显示的,找一个对应的数据,需要拉动滚动条慢慢找,效率极低,现在直接过滤显示,关键字突出颜色显示,直接表格一行行,直观简洁效率极高,我自己调试的时候,之前也是找的很慢效率极低,因为现场的设备什么情况都有,未必都是标准的onvif或者28181设备,所有的交互数据都是需要打印出来查问题的,比如有些设备居然点播没有画面,后面打印发现是ssrc没有指定,居然空的,都没有按照标准来,还有些sdp数据居然是只有一个\n换行,而按照sdp的标准文档,必须是\r\n换行,这就导致了解析失败,这些情况都是一点一滴打印调试,慢慢增加了兼容性。
让我很郁闷的是,这个工具绝大部分用户是非开发者,而且用户数不断增长,可能在某些群组中互相传播,毕竟是免费的,而市面上目前这类好用的工具几乎没有,要么不好用不实用,比如国际onvif工具odm,不支持跨网段搜索,云台不能四个角移动,不支持265视频显示,onvf模拟器呢也都是只简简单单支持一路,极其有限还不好用,我这个还会不断根据实际需求调整,一直在更新迭代。郁闷的是我本意是给开发者二开用的,现在倒好了,一分钱没挣到,就挣了个名声,哎说多了都是泪。





include ($$PWD/../core_video/core_video.pri)
include ($$PWD/../core_videobase/core_videobase.pri)
include($$PWD/../core_videocontrol/core_videocontrol.pri)
include ($$PWD/../core_videohelper/core_videohelper.pri)
include ($$PWD/../core_videoffmpeg/core_videoffmpeg.pri)
include ($$PWD/../core_onvifdevice/core_onvifdevice.pri)
//实例化onvif管理类
OnvifDeviceServer *server = new OnvifDeviceServer(this);
//设置对应的参数
server->setPara("192.168.0.110", "192.168.0.110", "admin", "123456");
//按需关联信号槽/可以不需要
connect(server, SIGNAL(sendData(QByteArray)), this, SLOT(sendData(QByteArray)));
connect(server, SIGNAL(receiveData(QByteArray)), this, SLOT(receiveData(QByteArray)));
connect(server, SIGNAL(receiveInfo(QString)), this, SLOT(receiveInfo(QString)));
connect(server, SIGNAL(receiveError(QString)), this, SLOT(receiveError(QString)));
connect(server, SIGNAL(pushStart(QString, int, int, bool)), this, SLOT(pushStart(QString, int, int, bool)));
connect(server, SIGNAL(pushChanged(QString, int)), this, SLOT(pushChanged(QString, int)));
//启动服务
server->start();
//添加一路模拟服务/文件方式
server->append("video1", 6920, "f:/1.mp4", "rtsp://192.168.0.110:8554/stream/video1");
//添加一路模拟服务/本地摄像头
server->append("video2", 6921, "video=USB Video Device|1280x720|30", "rtsp://192.168.0.110:8554/stream/video2");
//添加一路模拟服务/本地桌面
server->append("video3", 6922, "screen=desktop", "rtsp://192.168.0.110:8554/stream/video3");
//添加一路模拟服务/监控设备
server->append("video4", 6923, "rtsp://admin:Admin123456@192.168.0.64/Streaming/xxx", "rtsp://192.168.0.110:8554/stream/video4");
//添加一路模拟服务/内存流
server->append("video5", 6924, "stream://", "rtsp://192.168.0.110:8554/stream/video5");
//内存流方式对一个步骤/需要拿到数据后不断的添加进去
QByteArray data = "xxxx";
server->appendData("video5", data);
//停止服务
server->stop();
include ($$PWD/../core_gb28181rtp/core_gb28181rtp.pri)
include ($$PWD/../core_gb28181device/core_gb28181device.pri)
//实例化管理类
GB28181DeviceServer *server = new GB28181DeviceServer(this);
//设置对应的参数
server->setPara("34020000002000000001", "3402000000", "192.168.0.110", 15060, "12345678", 3600, 60, 3);
//按需关联信号槽/可以不需要
connect(server, SIGNAL(sendData(QString, QString)), this, SLOT(sendData(QString, QString)));
connect(server, SIGNAL(receiveData(QString, QString)), this, SLOT(receiveData(QString, QString)));
connect(server, SIGNAL(receiveInfo(QString, QString)), this, SLOT(receiveInfo(QString, QString)));
connect(server, SIGNAL(receiveError(QString, QString)), this, SLOT(receiveError(QString, QString)));
connect(server, SIGNAL(statusChanged(QString, bool)), this, SLOT(statusChanged(QString, bool)));
//启动服务
server->start();
//添加设备
server->append("UDP", "192.168.0.100", 5060, "34020000001320000001", "34020000001310000001", "f:/mp4/1.mp4")
//停止服务
server->stop();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。