Documentation
¶
Index ¶
- Constants
- Variables
- func InitHook(c context.Context)
- func OnHookEvent(e *HookEvent)
- type HlsHookData
- type HookEvent
- type TSCache
- func (c *TSCache) DumpM3U8PlayList()
- func (c *TSCache) DumpTsFile(key string, item TSItem)
- func (c *TSCache) GetItem(key string) (TSItem, error)
- func (c *TSCache) GetM3U8PlayList() ([]byte, error)
- func (c *TSCache) ID() string
- func (c *TSCache) IsReady() bool
- func (c *TSCache) IsRecord() bool
- func (c *TSCache) Reset()
- func (c *TSCache) SetItem(key string, item TSItem)
- type TSInfo
- type TSItem
Constants ¶
View Source
const ( HookEventQueueLen = 10000 HookEventWorkerNum = 20 )
View Source
const (
TSCacheNumMin = 3
)
Variables ¶
View Source
var ( ErrNoTsKey = fmt.Errorf("no ts key for cache") ErrM3u8Empty = fmt.Errorf("m3u8 is empty") )
Functions ¶
func OnHookEvent ¶
func OnHookEvent(e *HookEvent)
Types ¶
type HlsHookData ¶
type HlsHookData struct {
Action string `json:"action"`
Ip string `json:"ip"`
Vhost string `json:"vhost"`
App string `json:"app"`
Param string `json:"param"`
Duration float32 `json:"duration"`
File string `json:"file"`
Url string `json:"url"`
M3u8 string `json:"m3u8"`
M3u8Url string `json:"m3u8_url"`
SeqNo int `json:"seq_no"`
}
type TSCache ¶
type TSCache struct {
// contains filtered or unexported fields
}
func NewTSCache ¶
func (*TSCache) DumpM3U8PlayList ¶
func (c *TSCache) DumpM3U8PlayList()
func (*TSCache) DumpTsFile ¶
func (*TSCache) GetM3U8PlayList ¶
type TSInfo ¶
type TSInfo struct {
// contains filtered or unexported fields
}
func (*TSInfo) DurationMs ¶
func (*TSInfo) HasKeyFrame ¶
Click to show internal directories.
Click to hide internal directories.