hook

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gop

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

type GopCache

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

GopCache gop cache

func NewGopCache

func NewGopCache(gopSize, singleGopMaxFrameNum int) *GopCache

NewGopCache 创建 gop 缓存

func (*GopCache) Clear

func (c *GopCache) Clear()

func (*GopCache) Feed

func (c *GopCache) Feed(msg base.RtmpMsg)

Feed 写入缓存

func (*GopCache) GetGopCount

func (c *GopCache) GetGopCount() int

func (*GopCache) GetGopDataAt

func (c *GopCache) GetGopDataAt(pos int) []base.RtmpMsg

type HookSession

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

func NewHookSession

func NewHookSession(uniqueKey, streamName string, hlssvr *hls.HlsServer, gopNum, singleGopMaxFrameNum int) *HookSession

func (*HookSession) AddConsumer

func (session *HookSession) AddConsumer(consumerId string, subscriber IHookSessionSubscriber)

func (*HookSession) GetAllConsumer

func (session *HookSession) GetAllConsumer() []base.StatSub

func (*HookSession) GetAudioSeqHeaderMsg

func (session *HookSession) GetAudioSeqHeaderMsg() *base.RtmpMsg

func (*HookSession) GetVideoSeqHeaderMsg

func (session *HookSession) GetVideoSeqHeaderMsg() *base.RtmpMsg

func (*HookSession) OnMsg

func (session *HookSession) OnMsg(msg base.RtmpMsg)

func (*HookSession) OnStop

func (session *HookSession) OnStop()

func (*HookSession) RemoveConsumer

func (session *HookSession) RemoveConsumer(consumerId string)

type HookSessionMangaer

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

func GetHookSessionManagerInstance

func GetHookSessionManagerInstance() *HookSessionMangaer

func (*HookSessionMangaer) GetHookSession

func (m *HookSessionMangaer) GetHookSession(streamName string) (bool, *HookSession)

func (*HookSessionMangaer) RemoveHookSession

func (m *HookSessionMangaer) RemoveHookSession(streamName string)

func (*HookSessionMangaer) SetHookSession

func (m *HookSessionMangaer) SetHookSession(streamName string, session *HookSession)

type IHookSessionSubscriber

type IHookSessionSubscriber interface {
	OnMsg(msg base.RtmpMsg)
	OnStop()
}

Jump to

Keyboard shortcuts

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