server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPusherIsNil = errors.New("pusher is nil")
	ErrClosed      = errors.New("channel closed")
)
View Source
var (
	ErrAppAlreadyExists = errors.New("app already exists")
)
View Source
var ErrAppNotFount = errors.New("app not found")
View Source
var ErrHlsPlayerNotInit = errors.New("hls player not init")
View Source
var ErrPusherAlreadyInPublication = errors.New("pusher already in publication")
View Source
var ErrPusherNotInPublication = errors.New("pusher not in publication")

Functions

This section is empty.

Types

type AuthFunc added in v0.2.0

type AuthFunc func(ReqAppName, ReqChannelName string, IsPublisher bool) (*Channel, error)

type Channel

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

func NewChannel added in v0.2.0

func NewChannel(conf ...ChannelConf) *Channel

func (*Channel) AddPlayer

func (c *Channel) AddPlayer(w av.WriteCloser) error

func (*Channel) Close

func (c *Channel) Close() error

func (*Channel) Closed

func (c *Channel) Closed() bool

func (*Channel) DelPlayer

func (c *Channel) DelPlayer(w av.WriteCloser) error

func (*Channel) GenM3U8File added in v0.2.2

func (c *Channel) GenM3U8File(tsPath func(tsName string) (tsPath string)) ([]byte, error)

func (*Channel) GetPlayers

func (c *Channel) GetPlayers() ([]av.WriteCloser, error)

func (*Channel) GetTsFile

func (c *Channel) GetTsFile(tsName string) ([]byte, error)

func (*Channel) HlsPlayer added in v0.2.2

func (c *Channel) HlsPlayer() *hls.Source

func (*Channel) InPublication

func (c *Channel) InPublication() bool

func (*Channel) InitHlsPlayer

func (c *Channel) InitHlsPlayer(conf ...hls.SourceConf) error

func (*Channel) InitdHlsPlayer

func (c *Channel) InitdHlsPlayer() bool

func (*Channel) PushStart

func (c *Channel) PushStart(pusher av.Reader) error

type ChannelConf added in v0.2.0

type ChannelConf func(*Channel)

type Server

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

func NewRtmpServer

func NewRtmpServer(authFunc AuthFunc, c ...ServerConf) *Server

func (*Server) Serve

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

func (*Server) SetConnBufferSize

func (s *Server) SetConnBufferSize(bufferSize int32)

type ServerConf

type ServerConf func(*Server)

func WithConnBufferSize

func WithConnBufferSize(bufferSize int32) ServerConf

Jump to

Keyboard shortcuts

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