hls

package
v0.0.0-...-31c0fb5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPublisher         = fmt.Errorf("no publisher")
	ErrInvalidReq          = fmt.Errorf("invalid req url path")
	ErrNoSupportVideoCodec = fmt.Errorf("no support video codec")
	ErrNoSupportAudioCodec = fmt.Errorf("no support audio codec")
)
View Source
var (
	ErrNoKey = fmt.Errorf("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 (server *Server) GetWriter(info av.Info) av.WriteCloser

func (*Server) Serve

func (server *Server) Serve(listener 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 (source *Source) Close(err error)

func (*Source) DropPacket

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

func (*Source) GetCacheInc

func (source *Source) GetCacheInc() *TSCacheItem

func (*Source) Info

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

func (*Source) SendPacket

func (source *Source) SendPacket() error

func (*Source) Write

func (source *Source) Write(p *av.Packet) (err error)

type TSCacheItem

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

func NewTSCacheItem

func NewTSCacheItem(id string) *TSCacheItem

func (*TSCacheItem) GenM3U8PlayList

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

TODO: found data race, fix it

func (*TSCacheItem) GetItem

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

func (*TSCacheItem) ID

func (tcCacheItem *TSCacheItem) ID() string

func (*TSCacheItem) SetItem

func (tcCacheItem *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