onvifserver

package
v1.4.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(g gin.IRouter, ipcCore ipc.Core, smsCore sms.Core, cfg *conf.Bootstrap)

Register 将 ONVIF Device/Media SOAP 服务挂到 Gin,路径前缀 /onvif/,不经过鉴权。

Types

type ProfileSnapshot

type ProfileSnapshot struct {
	Token     string `json:"token"`
	Name      string `json:"name"`
	ChannelID string `json:"channel_id"`
	DID       string `json:"did"`
	Online    bool   `json:"online"`
}

ProfileSnapshot 单条 ONVIF Profile 调试信息。

type StreamProvider

type StreamProvider struct {
	// contains filtered or unexported fields
}

StreamProvider 将平台通道映射为 ONVIF Profile,并生成 ZLM RTSP 地址。

func NewStreamProvider

func NewStreamProvider(ipcCore ipc.Core, smsCore sms.Core, cfg *conf.Bootstrap) *StreamProvider

NewStreamProvider 创建 ONVIF 流提供者,启动时预加载通道列表。

func (*StreamProvider) GetSnapshotURI

func (p *StreamProvider) GetSnapshotURI(profileToken, requestHost string) string

GetSnapshotURI 暂不实现平台级截图,返回空由服务端填占位。

func (*StreamProvider) GetStreamURI

func (p *StreamProvider) GetStreamURI(profileToken, requestHost string) string

GetStreamURI 根据 Profile Token 拼接可访问的 RTSP 地址。

func (*StreamProvider) ListStreamProfiles

func (p *StreamProvider) ListStreamProfiles() []server.StreamProfile

ListStreamProfiles 返回全部通道 Profile;Token 用通道主键避免展示名重复导致 HA 少实体。

func (*StreamProvider) ProfileSnapshot

func (p *StreamProvider) ProfileSnapshot() []ProfileSnapshot

ProfileSnapshot 返回当前 ONVIF 暴露列表,仅供 GET /onvif/profiles 排障。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL