Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpusCodec = webrtc.NewRTPOpusCodec(webrtc.DefaultPayloadTypeOpus, 48000)
	H264Codec = webrtc.NewRTPCodec(webrtc.RTPCodecTypeVideo, webrtc.H264, 90000, 0, "profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1", 102, new(codecs.H264Payloader))
)

    predefined payload types

    View Source
    var ErrNotFound = errors.New("stream not found")

    Functions

    This section is empty.

    Types

    type Conn

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

    func (*Conn) WriteResponse

    func (c *Conn) WriteResponse(req *Request, code int, headers textproto.MIMEHeader, body []byte) error

    type RTPFramer

    type RTPFramer struct {
    	Conn       net.PacketConn
    	Addr       net.Addr
    	Packetizer rtp.Packetizer
    	Codec      *webrtc.RTPCodec
    	CodecData  av.CodecData
    	// contains filtered or unexported fields
    }

    func (*RTPFramer) WritePacket

    func (f *RTPFramer) WritePacket(pkt av.Packet) error

    type Request

    type Request struct {
    	Method string
    	URL    *url.URL
    	Header textproto.MIMEHeader
    	CSeq   string
    }

    type Server

    type Server struct {
    	Source    SourceFunc
    	Listener  net.Listener
    	RTPSocket net.PacketConn
    }

    func (*Server) Listen

    func (s *Server) Listen(addr string) (err error)

    func (*Server) Serve

    func (s *Server) Serve() error

    type SourceFunc

    type SourceFunc func(*Request) (av.Demuxer, error)

    type TrackFramer

    type TrackFramer struct {
    	CodecData av.CodecData
    	Codec     *webrtc.RTPCodec
    	Track     *webrtc.Track
    	// contains filtered or unexported fields
    }

    func (*TrackFramer) WritePacket

    func (f *TrackFramer) WritePacket(pkt av.Packet) error