hls

package
v0.0.0-...-62cb2ec Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: BSD-3-Clause Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPublisher         = errors.New("No publisher")
	ErrInvalidReq          = errors.New("invalid req url path")
	ErrNoSupportVideoCodec = errors.New("no support video codec")
	ErrNoSupportAudioCodec = errors.New("no support audio codec")
)
View Source
var (
	ErrNoKey = errors.New("No key for cache")
)

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer() *Server

func (*Server) GetWriter

func (self *Server) GetWriter(info av.Info) av.WriteCloser

func (*Server) Serve

func (self *Server) Serve(l net.Listener) error

type Source

type Source struct {
	av.RWBaser
	// contains filtered or unexported fields
}

func NewSource

func NewSource(info av.Info) *Source

func (*Source) Close

func (self *Source) Close(err error)

func (*Source) DropPacket

func (self *Source) DropPacket(pktQue chan av.Packet, info av.Info)

func (*Source) GetCacheInc

func (self *Source) GetCacheInc() *TSCacheItem

func (*Source) Info

func (self *Source) Info() (ret av.Info)

func (*Source) SendPacket

func (self *Source) SendPacket() error

func (*Source) Write

func (self *Source) Write(p av.Packet) error

type TSCache

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

func NewTSCache

func NewTSCache() *TSCache

func (*TSCache) Get

func (self *TSCache) Get(key string) *TSCacheItem

func (*TSCache) Set

func (self *TSCache) Set(key string, e *TSCacheItem)

type TSCacheItem

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

func NewTSCacheItem

func NewTSCacheItem(id string) *TSCacheItem

func (*TSCacheItem) GenM3U8PlayList

func (self *TSCacheItem) GenM3U8PlayList() ([]byte, error)

TODO: found data race, fix it

func (*TSCacheItem) GetItem

func (self *TSCacheItem) GetItem(key string) (TSItem, error)

func (*TSCacheItem) ID

func (self *TSCacheItem) ID() string

func (*TSCacheItem) SetItem

func (self *TSCacheItem) SetItem(key string, item TSItem)

type TSItem

type TSItem struct {
	Name     string
	SeqNum   int
	Duration int
	Data     []byte
}

func NewTSItem

func NewTSItem(name string, duration, seqNum int, b []byte) TSItem

Jump to

Keyboard shortcuts

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