Documentation ¶
Index ¶
- Constants
- Variables
- func Handler(h *avutil.RegisterHandler)
- func ParseURL(uri string) (u *url.URL, err error)
- func SplitPath(u *url.URL) (app, stream string)
- type Conn
- func (self *Conn) Close() (err error)
- func (self *Conn) Metadata() (map[string]interface{}, error)
- func (self *Conn) NetConn() net.Conn
- func (self *Conn) Prepare() (err error)
- func (self *Conn) ReadPacket() (pkt av.Packet, err error)
- func (self *Conn) RxBytes() uint64
- func (self *Conn) Streams() (streams []av.CodecData, err error)
- func (self *Conn) TxBytes() uint64
- func (self *Conn) WriteHeader(streams []av.CodecData) (err error)
- func (self *Conn) WritePacket(pkt av.Packet) (err error)
- func (self *Conn) WriteTrailer() (err error)
- type Server
- func (self *Server) Accept(listener *net.TCPListener) (conn *Conn, err error)
- func (self *Server) HandleConnection(conn *Conn) (err error)
- func (self *Server) Listen() (listener *net.TCPListener, err error)
- func (self *Server) ListenAndServe() error
- func (self *Server) Serve(listener *net.TCPListener) (err error)
Constants ¶
View Source
const FlvTimestampMax = 0xFFFFFF
Variables ¶
View Source
var ( Debug bool MaxChunkSize = 10 * 1024 * 1024 ReadDeadlineTimeout = 20 * time.Second WriteDeadlineTimeout = 20 * time.Second )
View Source
var CodecTypes = flv.CodecTypes
Functions ¶
func Handler ¶
func Handler(h *avutil.RegisterHandler)
Types ¶
type Conn ¶
type Conn struct { URL *url.URL OnPlayOrPublish func(string, flvio.AMFMap) error Prober *flv.Prober TCUrl string // contains filtered or unexported fields }
func (*Conn) WriteTrailer ¶
type Server ¶
type Server struct { Addr string HandlePublish func(*Conn) HandlePlay func(*Conn) HandleConn func(*Conn) CreateConn func(net.Conn) *Conn }
func (*Server) Accept ¶
func (self *Server) Accept(listener *net.TCPListener) (conn *Conn, err error)
func (*Server) HandleConnection ¶
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.