1 Star 11 Fork 9

我不写名字/GB28181-Service

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.33 KB
一键复制 编辑 原始数据 按行查看 历史

SipClient

依赖ZLMediaKit实现的一个简单的 GB28181 设备端。

实现功能

  • 设备注册
  • 实时预览
  • 心跳
  • 目录查询
  • 文件检索和回放
  • 其他消息响应,DeviceInfo、ConfigDownload等。

工作方式

  • 常用的SIP功能实现
  • 接收ZLM的hook事件:流的注册注销、文件录制完成
  • Sqlite数据库存储文件信息

依赖库:

配置文件

<?xml version="1.0" encoding="utf-8" ?>
<Config>
	<SipServer>
        <!-- 服务器IP地址 -->
		<IP>172.20.5.38</IP>
        <!-- SIP协议端口 -->
		<Port>10000</Port>
        <!-- 密码 -->
		<Password>12345678</Password>
        <!-- 服务器ID -->
		<ID>34020000002000000001</ID>
	</SipServer>
	<MediaServer>
        <!-- ZLMediaKit地址 -->
		<IP>127.0.0.1</IP>
        <!-- ZLMediaKit的Http端口 -->
		<Port>10080</Port>
		<Secret>035c73f7-bb6b-4889-a715-d9eb2d1925cc</Secret>
	</MediaServer>
    <HttpServer>
		<!-- Http服务端口,用于回放时,接收ZLM文件流注销事件 -->
		<Port>28080</Port>
	</HttpServer>
	<DeviceList>
		<Device>
            <!-- 本地IP -->
			<IP>192.168.116.125</IP>
            <!-- 本地SIP使用端口,这个不重要 -->
			<Port>15060</Port>
            <!-- 设备ID -->
			<ID>34020000002000000001</ID>
            <!-- SIP注册使用协议,TCP or UDP -->
			<Protocol>TCP</Protocol>
            <!-- 设备名称 -->
			<Name>IP Camera</Name>
            <!-- 厂家 -->
			<Manufacturer>Test</Manufacturer>
            <!-- 心跳间隔,单位:s -->
			<HeartbeatInterval>60</HeartbeatInterval>
			<Catalog>
                <!-- 当前设备的通道信息,可以有多个 -->
				<Channel>
                    <!-- 通道名称 -->
					<Name>Test_1</Name>
                    <!-- 通道编码 -->
					<ID>34020000002000000011</ID>
                    <!-- 此通道对应ZLM中的流地址 -->
					<URI>h265/ch1/sub/av_stream</URI>
				</Channel>
			</Catalog>
		</Device>
	</DeviceList>
</Config>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/yszs/sip-service.git
git@gitee.com:yszs/sip-service.git
yszs
sip-service
GB28181-Service
master

搜索帮助

Cb406eda 1850385 E526c682 1850385