Versions in this module Expand all Collapse all v4 v4.4.6 Oct 27, 2023 v4.4.5 Oct 27, 2023 Changes in this version + const ChannelOffStatus + const ChannelOnStatus + const DeviceAlarmedStatus + const DeviceOfflineStatus + const DeviceOnlineStatus + const DeviceRecoverStatus + const DeviceRegisterStatus + const INVIDE_MODE_AUTO + const INVIDE_MODE_MANUAL + const INVIDE_MODE_ONSUBSCRIBE + const MaxRegisterCount + const TIME_LAYOUT + var AlarmResponseXML = ... + var CatalogXML = ... + var DeviceInfoXML = ... + var DeviceNonce sync.Map + var DevicePositionXML = ... + var DeviceRegisterCount sync.Map + var Devices sync.Map + var GB28181Plugin = InstallPlugin(&conf) + var PullStreams sync.Map + var QUERY_RECORD_TIMEOUT = time.Second * 5 + var RecordInfoXML = ... + var RecordQueryLink = NewRecordQueryLink(time.Second * 60) + func BuildAlarmResponseXML(id string) string + func BuildCatalogXML(sn int, id string) string + func BuildDeviceInfoXML(sn int, id string) string + func BuildDevicePositionXML(sn int, id string, interval int) string + func BuildRecordInfoXML(sn int, id string, start, end int64) string + func CreateRequest(exposedId string, Method sip.RequestMethod, recipient *sip.Address, ...) (req sip.Request) + func Explain(statusCode int) string + func GetSipServer(transport string) gosip.Server + func NewRecordQueryLink(resultTimeout time.Duration) *recordQueryLink + func RequestForResponse(transport string, request sip.Request, ...) (sip.Response, error) + type Authorization struct + func (a *Authorization) Verify(username, passwd, realm, nonce string) bool + type Channel struct + GpsTime time.Time + Latitude string + LiveSubSP string + Longitude string + func FindChannel(deviceId string, channelId string) (c *Channel) + func (c *Channel) MarshalJSON() ([]byte, error) + func (channel *Channel) Bye(streamPath string) int + func (channel *Channel) CanInvite() bool + func (channel *Channel) Control(PTZCmd string) int + func (channel *Channel) CreateRequst(Method sip.RequestMethod) (req sip.Request) + func (channel *Channel) Invite(opt *InviteOptions) (code int, err error) + func (channel *Channel) Pause(streamPath string) int + func (channel *Channel) PlayAt(streamPath string, second uint) int + func (channel *Channel) PlayForward(streamPath string, speed float32) int + func (channel *Channel) QueryRecord(startTime, endTime string) ([]*Record, error) + func (channel *Channel) Resume(streamPath string) int + func (channel *Channel) TryAutoInvite(opt *InviteOptions) + type ChannelInfo struct + Address string + CivilCode string + DeviceID string + Manufacturer string + Model string + Name string + Owner string + ParentID string + Parental int + Port int + RegisterWay int + SafetyWay int + Secrecy int + Status ChannelStatus + type ChannelStatus string + type Device struct + GpsTime time.Time + ID string + LastKeepaliveAt time.Time + Latitude string + Longitude string + Manufacturer string + Model string + Name string + NetAddr string + Owner string + RegisterTime time.Time + Status DeviceStatus + UpdateTime time.Time + func (d *Device) Catalog() int + func (d *Device) CreateRequest(Method sip.RequestMethod) (req sip.Request) + func (d *Device) MarshalJSON() ([]byte, error) + func (d *Device) MobilePositionSubscribe(id string, expires time.Duration, interval time.Duration) (code int) + func (d *Device) QueryDeviceInfo() + func (d *Device) SipRequestForResponse(request sip.Request) (sip.Response, error) + func (d *Device) Subscribe() int + func (d *Device) UpdateChannelPosition(channelId string, gpsTime string, lng string, lat string) + func (d *Device) UpdateChannelStatus(deviceList []*notifyMessage) + func (d *Device) UpdateChannels(list ...ChannelInfo) + type DevicePosition struct + GpsTime time.Time + ID string + Latitude string + Longitude string + type DeviceStatus string + type GB28181Config struct + DumpPath string + HeartbeatInterval time.Duration + Ignores map[string]struct{} + InviteIDs string + InviteMode int + ListenAddr string + LogLevel string + MediaIP string + MediaNetwork string + MediaPort uint16 + MediaPortMax uint16 + MediaPortMin uint16 + Password string + Port struct{ ... } + Position GB28181PositionConfig + Realm string + RegisterValidity time.Duration + RemoveBanInterval time.Duration + Serial string + SipIP string + SipNetwork string + SipPort uint16 + Username string + func (c *GB28181Config) API_bye(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_control(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_get_position(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_invite(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_list(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_play_forward(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_play_pause(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_play_resume(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_play_seek(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_position(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_ptz(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) API_records(w http.ResponseWriter, r *http.Request) + func (c *GB28181Config) IsMediaNetworkTCP() bool + func (c *GB28181Config) OnBye(req sip.Request, tx sip.ServerTransaction) + func (c *GB28181Config) OnEvent(event any) + func (c *GB28181Config) OnMessage(req sip.Request, tx sip.ServerTransaction) + func (c *GB28181Config) OnNotify(req sip.Request, tx sip.ServerTransaction) + func (c *GB28181Config) OnRegister(req sip.Request, tx sip.ServerTransaction) + func (c *GB28181Config) ReadDevices() + func (c *GB28181Config) RecoverDevice(d *Device, req sip.Request) + func (c *GB28181Config) SaveDevices() + func (c *GB28181Config) StoreDevice(id string, req sip.Request) (d *Device) + type GB28181PositionConfig struct + AutosubPosition bool + Expires time.Duration + Interval time.Duration + type InviteOptions struct + End int + MediaPort uint16 + SSRC uint32 + Start int + StreamPath string + func (o *InviteOptions) CreateSSRC() + func (o *InviteOptions) Validate(start, end string) error + func (o InviteOptions) IsLive() bool + func (o InviteOptions) Record() bool + func (o InviteOptions) String() string + type PortManager struct + Valid bool + func (pm *PortManager) GetPort() (p uint16, err error) + func (pm *PortManager) Init(start, end uint16) + func (pm *PortManager) Range() uint16 + func (pm *PortManager) Recycle(p uint16) (err error) + type PullStream struct + func (p *PullStream) Bye() int + func (p *PullStream) CreateRequest(method sip.RequestMethod) (req sip.Request) + func (p *PullStream) Pause() int + func (p *PullStream) PlayAt(second uint) int + func (p *PullStream) PlayForward(speed float32) int + func (p *PullStream) Resume() int + type Record struct + Address string + DeviceID string + EndTime string + FilePath string + Name string + Secrecy int + StartTime string + Type string + func (r *Record) GetPublishStreamPath() string