Documentation ¶
Index ¶
- Variables
- type Config
- func (config Config) Assign(source Config)
- func (config Config) Get(key string) any
- func (config Config) GetChild(key string) Config
- func (config Config) Has(key string) (ok bool)
- func (config Config) HasChild(key string) (ok bool)
- func (config Config) Merge(source Config)
- func (config *Config) Set(key string, value any)
- func (config Config) Unmarshal(s any)
- type Engine
- type FileWr
- type HTTP
- type HTTPConfig
- type HTTPPlugin
- type Plugin
- type Publish
- type PublishConfig
- type Pull
- type PullConfig
- type Push
- type PushConfig
- type Record
- type Subscribe
- type SubscribeConfig
- type TCP
- type TCPPlugin
- type VideoFileInfo
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
func Struct2Config ¶
type Engine ¶
type HTTP ¶
type HTTP struct { ListenAddr string ListenAddrTLS string CertFile string KeyFile string CORS bool //是否自动添加CORS头 UserName string Password string // contains filtered or unexported fields }
func (*HTTP) GetHTTPConfig ¶
func (*HTTP) HandleFunc ¶
type HTTPConfig ¶
type HTTPPlugin ¶
type Plugin ¶
type Plugin interface { // 可能的入参类型:FirstConfig 第一次初始化配置,Config 后续配置更新,SE系列(StateEvent)流状态变化事件 OnEvent(any) }
type Publish ¶
type Publish struct { PubAudio bool PubVideo bool KickExist bool // 是否踢掉已经存在的发布者 PublishTimeout int // 发布无数据超时 WaitCloseTimeout int // 延迟自动关闭(无订阅时) }
func (*Publish) GetPublishConfig ¶
type PublishConfig ¶
type PublishConfig interface {
GetPublishConfig() *Publish
}
type Pull ¶
type Pull struct { RePull int // 断开后自动重拉,0 表示不自动重拉,-1 表示无限重拉,高于0 的数代表最大重拉次数 PullOnStart bool // 启动时拉流 PullOnSubscribe bool // 订阅时自动拉流 PullList map[string]string // 自动拉流列表,以streamPath为key,url为value }
func (*Pull) GetPullConfig ¶
type PullConfig ¶
type PullConfig interface {
GetPullConfig() *Pull
}
type Push ¶
type Push struct { RePush int // 断开后自动重推,0 表示不自动重推,-1 表示无限重推,高于0 的数代表最大重推次数 PushList map[string]string // 自动推流列表 }
func (*Push) GetPushConfig ¶
type PushConfig ¶
type PushConfig interface {
GetPushConfig() *Push
}
type Record ¶
type Record struct { Ext string //文件扩展名 Path string //存储文件的目录 AutoRecord bool Filter string CreateFileFn func(filename string, append bool) (FileWr, error) `yaml:"-"` GetDurationFn func(file io.ReadSeeker) uint32 `yaml:"-"` // contains filtered or unexported fields }
func (*Record) NeedRecord ¶
type Subscribe ¶
type Subscribe struct { SubAudio bool SubVideo bool IFrameOnly bool // 只要关键帧 WaitTimeout int // 等待流超时 }
func (*Subscribe) GetSubscribeConfig ¶
type SubscribeConfig ¶
type SubscribeConfig interface {
GetSubscribeConfig() *Subscribe
}
type VideoFileInfo ¶
Click to show internal directories.
Click to hide internal directories.