rtmp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package rtmp Created by RTT. Author: teocci@yandex.com on 2021-Oct-27

Index

Constants

View Source
const FlvTimestampMax = 0xFFFFFF

Variables

View Source
var CodecTypes = flv.CodecTypes
View Source
var Debug bool

Functions

func Handler

func Handler(h *avutil.RegisterHandler)

func ParseURL

func ParseURL(uri string) (u *url.URL, err error)

func SplitPath

func SplitPath(u *url.URL) (app, stream string)

Types

type Conn

type Conn struct {
	URL             *url.URL
	OnPlayOrPublish func(string, flvio.AMFMap) error
	// contains filtered or unexported fields
}

func Dial

func Dial(uri string) (conn *Conn, err error)

func DialTimeout

func DialTimeout(uri string, timeout time.Duration) (conn *Conn, err error)

func NewConn

func NewConn(netconn net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close() (err error)

func (*Conn) NetConn

func (c *Conn) NetConn() net.Conn

func (*Conn) Prepare

func (c *Conn) Prepare() (err error)

func (*Conn) ReadPacket

func (c *Conn) ReadPacket() (pkt av.Packet, err error)

func (*Conn) RxBytes

func (c *Conn) RxBytes() uint64

func (*Conn) Streams

func (c *Conn) Streams() (streams []av.CodecData, err error)

func (*Conn) TxBytes

func (c *Conn) TxBytes() uint64

func (*Conn) WriteHeader

func (c *Conn) WriteHeader(streams []av.CodecData) (err error)

func (*Conn) WritePacket

func (c *Conn) WritePacket(pkt av.Packet) (err error)

func (*Conn) WriteTrailer

func (c *Conn) WriteTrailer() (err error)

type Server

type Server struct {
	Addr          string
	HandlePublish func(*Conn)
	HandlePlay    func(*Conn)
	HandleConn    func(*Conn)
}

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() (err error)

Jump to

Keyboard shortcuts

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