Versions in this module Expand all Collapse all v2 v2.1.8 Aug 5, 2020 Changes in this version + const PLUGIN_APP + const PLUGIN_HOOK + const PLUGIN_NONE + const PLUGIN_PUBLISHER + const PLUGIN_SUBSCRIBER + var AuthHooks = make(AuthHook, 0) + var ConfigRaw []byte + var EngineInfo = &struct{ ... } + var OnDropHooks = make(OnDropHook, 0) + var OnPublishHooks = make(OnPublishHook, 0) + var OnStreamClosedHooks = make(OnStreamClosedHook, 0) + var OnSubscribeHooks = make(OnSubscribeHook, 0) + var OnSummaryHooks = make(OnSummaryHook, 0) + var OnUnSubscribeHooks = make(OnUnSubscribeHook, 0) + var Plugins = make(map[string]*PluginConfig) + var Summary = ServerSummary + var Version string + func AddWriter(wn io.Writer) + func InstallPlugin(opt *PluginConfig) + func MayBeError(info error) (hasError bool) + func Print(v ...interface{}) + func Printf(format string, v ...interface{}) + func Println(v ...interface{}) + func Run(configFile string) (err error) + type AuthHook []func(string) error + func (h AuthHook) AddHook(hook func(string) error) + func (h AuthHook) Trigger(sign string) error + type ChangeStreamCmd struct + NewStream *Stream + type Collection struct + type ListenerConfig struct + ListenAddr string + type LogWriter struct + func (w *LogWriter) Write(data []byte) (n int, err error) + type MultiLogWriter struct + func (w *MultiLogWriter) Write(data []byte) (n int, err error) + type NALU struct + func (r *NALU) WriteNALU(ts uint32, payload []byte) + type NetWorkInfo struct + Name string + Receive uint64 + ReceiveSpeed uint64 + Sent uint64 + SentSpeed uint64 + type OnDropHook []func(s *Subscriber) + func (h OnDropHook) AddHook(hook func(s *Subscriber)) + func (h OnDropHook) Trigger(s *Subscriber) + type OnPublishHook []func(r *Stream) + func (h OnPublishHook) AddHook(hook func(r *Stream)) + func (h OnPublishHook) Trigger(r *Stream) + type OnStreamClosedHook []func(*Stream) + func (h OnStreamClosedHook) AddHook(hook func(*Stream)) + func (h OnStreamClosedHook) Trigger(v *Stream) + type OnSubscribeHook []func(s *Subscriber) + func (h OnSubscribeHook) AddHook(hook func(s *Subscriber)) + func (h OnSubscribeHook) Trigger(s *Subscriber) + type OnSummaryHook []func(bool) + func (h OnSummaryHook) AddHook(hook func(bool)) + func (h OnSummaryHook) Trigger(v bool) + type OnUnSubscribeHook []func(s *Subscriber) + func (h OnUnSubscribeHook) AddHook(hook func(s *Subscriber)) + func (h OnUnSubscribeHook) Trigger(s *Subscriber) + type PluginConfig struct + Config interface{} + Dir string + HotConfig map[string]func(interface{}) + Name string + Run func() + Type byte + UIDir string + Version string + type Publisher struct + func (p *Publisher) Close() + func (p *Publisher) Publish(streamPath string) bool + func (p *Publisher) Running() bool + type Ring struct + Index int + Size int + func NewRing(exp int) (r *Ring) + func (r *Ring) GetAt(index int) *RingItem + func (r *Ring) GetBuffer() *bytes.Buffer + func (r *Ring) GetLast() *RingItem + func (r *Ring) GetNext() *RingItem + func (r *Ring) GoBack() + func (r *Ring) GoNext() + func (r *Ring) GoTo(index int) + func (r *Ring) NextW() + func (r Ring) Clone() *Ring + type RingItem struct + type ServerSummary struct + Address string + CPUUsage float64 + Children map[string]*ServerSummary + HardDisk struct{ ... } + Memory struct{ ... } + NetWork []NetWorkInfo + Streams []*StreamInfo + func (s *ServerSummary) Add() + func (s *ServerSummary) Done() + func (s *ServerSummary) Report(slave *ServerSummary) + func (s *ServerSummary) Running() bool + func (s *ServerSummary) StartSummary() + type Stream struct + AVRing *Ring + AudioTag *AVPacket + Cancel context.CancelFunc + Control chan interface{} + FirstScreen *Ring + PPS []byte + SPS []byte + Subscribers map[string]*Subscriber + UseTimestamp bool + VideoTag *AVPacket + WaitPub chan struct{} + func FindStream(streamPath string) *Stream + func GetStream(streamPath string) (result *Stream) + func (r *Stream) GetBuffer() *bytes.Buffer + func (r *Stream) PushAudio(timestamp uint32, payload []byte) + func (r *Stream) PushVideo(timestamp uint32, payload []byte) + func (r *Stream) Run() + func (r *Stream) Subscribe(s *Subscriber) + func (r *Stream) UnSubscribe(s *Subscriber) + func (r *Stream) WriteASC(asc []byte) + func (r *Stream) WritePPS(pps []byte) + func (r *Stream) WriteSPS(sps []byte) + type StreamInfo struct + AudioInfo struct{ ... } + StartTime time.Time + StreamPath string + SubscriberInfo []*SubscriberInfo + Type string + VideoInfo struct{ ... } + type SubscribeCmd struct + type Subscriber struct + Cancel context.CancelFunc + OffsetTime uint32 + OnData func(*avformat.SendPacket) error + Sign string + func (s *Subscriber) Close() + func (s *Subscriber) IsClosed() bool + func (s *Subscriber) Subscribe(streamPath string) (err error) + type SubscriberInfo struct + BufferLength int + Delay uint32 + ID string + SubscribeTime time.Time + TotalDrop int + TotalPacket int + Type string + type UnSubscribeCmd struct