rtc

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PacketH264       = "H264"
	PacketHEVC       = "HEVC"
	PacketSafariHevc = "SafariHevc"
	PacketPCMA       = "PCMA"
	PacketPCMU       = "PCMU"
	PacketOPUS       = "OPUS"
)

Variables

View Source
var ErrNeedMoreFrames = errors.New("need more frames")

Functions

func NewJessibucaSession

func NewJessibucaSession(streamid string, writeChanSize int, pc *peerConnection, lalServer logic.ILalServer) *jessibucaSession

func NewWhepSession

func NewWhepSession(streamid string, writeChanSize int, pc *peerConnection, lalServer logic.ILalServer) *whepSession

func NewWhipSession

func NewWhipSession(streamid string, pc *peerConnection, lalServer logic.ILalServer) *whipSession

Types

type G711RtpDecoder

type G711RtpDecoder struct {
	IRtpDecoder
	// contains filtered or unexported fields
}

func NewG711RtpDecoder

func NewG711RtpDecoder(f format.Format) *G711RtpDecoder

func (*G711RtpDecoder) Decode

func (r *G711RtpDecoder) Decode(pkt *rtp.Packet) ([]byte, error)

type G711RtpEncoder

type G711RtpEncoder struct {
	IRtpEncoder
	// contains filtered or unexported fields
}

func NewG711RtpEncoder

func NewG711RtpEncoder(pt uint8) *G711RtpEncoder

func (*G711RtpEncoder) Encode

func (enc *G711RtpEncoder) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

type H264RtpDecoder

type H264RtpDecoder struct {
	IRtpDecoder
	// contains filtered or unexported fields
}

func NewH264RtpDecoder

func NewH264RtpDecoder(f format.Format) *H264RtpDecoder

func (*H264RtpDecoder) Decode

func (r *H264RtpDecoder) Decode(pkt *rtp.Packet) ([]byte, error)

type H264RtpEncoder

type H264RtpEncoder struct {
	IRtpEncoder
	// contains filtered or unexported fields
}

func NewH264RtpEncoder

func NewH264RtpEncoder(codec []byte) *H264RtpEncoder

func (*H264RtpEncoder) Encode

func (enc *H264RtpEncoder) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

type H265RtpDecoder added in v0.3.3

type H265RtpDecoder struct {
	IRtpDecoder
	// contains filtered or unexported fields
}

func NewH265RtpDecoder added in v0.3.3

func NewH265RtpDecoder(f format.Format) *H265RtpDecoder

func (*H265RtpDecoder) Decode added in v0.3.3

func (r *H265RtpDecoder) Decode(pkt *rtp.Packet) ([]byte, error)

type IRtpDecoder

type IRtpDecoder interface {
	Decode(pkt *rtp.Packet) ([]byte, error)
}

type IRtpEncoder

type IRtpEncoder interface {
	Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)
}

type OpusRtpDecoder

type OpusRtpDecoder struct {
	IRtpDecoder
	// contains filtered or unexported fields
}

func NewOpusRtpDecoder

func NewOpusRtpDecoder(f format.Format) *OpusRtpDecoder

func (*OpusRtpDecoder) Decode

func (r *OpusRtpDecoder) Decode(pkt *rtp.Packet) ([]byte, error)

type OpusRtpEncoder

type OpusRtpEncoder struct {
	IRtpEncoder
	// contains filtered or unexported fields
}

func NewOpusRtpEncoder

func NewOpusRtpEncoder(pt uint8) *OpusRtpEncoder

func (*OpusRtpEncoder) Encode

func (enc *OpusRtpEncoder) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

type Packer

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

func NewPacker

func NewPacker(mimeType string, codec []byte) *Packer

func (*Packer) Encode

func (p *Packer) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

type RtcServer

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

func NewRtcServer

func NewRtcServer(config config.RtcConfig, lal logic.ILalServer) (*RtcServer, error)

func (*RtcServer) HandleJessibuca

func (s *RtcServer) HandleJessibuca(c *gin.Context)

func (*RtcServer) HandleWHEP

func (s *RtcServer) HandleWHEP(c *gin.Context)

func (*RtcServer) HandleWHIP

func (s *RtcServer) HandleWHIP(c *gin.Context)

type SafariHEVCRtpEncoder

type SafariHEVCRtpEncoder struct {
	IRtpEncoder
	// contains filtered or unexported fields
}

func NewSafariHEVCRtpEncoder

func NewSafariHEVCRtpEncoder(codec []byte) *SafariHEVCRtpEncoder

func (*SafariHEVCRtpEncoder) Encode

func (enc *SafariHEVCRtpEncoder) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

type UnPacker

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

func NewUnPacker

func NewUnPacker(mimeType string, clockRate uint32, pktChan chan<- base.AvPacket) *UnPacker

func (*UnPacker) UnPack

func (un *UnPacker) UnPack(pkt *rtp.Packet) (err error)

Jump to

Keyboard shortcuts

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