rtcsession

package
v0.0.0-...-e0b6167 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSession

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

func NewClientSession

func NewClientSession(writer track.RtpRtcpWriter) *ClientSession

func (*ClientSession) Close

func (tis *ClientSession) Close(cause error)

func (*ClientSession) CreateOffer

func (tis *ClientSession) CreateOffer(offer *rtcsdp.Session)

CreateOffer [1] offer

func (*ClientSession) GetReceiveStreamMuxer

func (tis *ClientSession) GetReceiveStreamMuxer() streammuxer.StreamMuxer

GetReceiveStreamMuxer 流路由, 发送流/接收流

func (*ClientSession) GetReceiver

func (tis *ClientSession) GetReceiver() []*track.Receiver

func (*ClientSession) GetSender

func (tis *ClientSession) GetSender() []*track.Sender

func (*ClientSession) OnOrderPacketRTP

func (tis *ClientSession) OnOrderPacketRTP(cb func(value *OrderPacketRTP))

OnOrderPacketRTP [3] 接收有序rtp包

func (*ClientSession) OnPacketRTP

func (tis *ClientSession) OnPacketRTP(cb func(value *OrderPacketRTP))

OnPacketRTP 接收网络rtp包(udp可能乱序)

func (*ClientSession) Open

func (tis *ClientSession) Open() error

Open [4] open

func (*ClientSession) PacketNTP

func (tis *ClientSession) PacketNTP(pkt *rtp.Packet) (time.Time, bool)

PacketNTP 获取数据包的ntp

func (*ClientSession) PacketPTS

func (tis *ClientSession) PacketPTS(pkt *rtp.Packet) (time.Duration, bool)

PacketPTS 获取数据包的pts

func (*ClientSession) PacketPTSAndNTP

func (tis *ClientSession) PacketPTSAndNTP(r *track.Receiver, pkt *rtp.Packet) PacketTime

PacketPTSAndNTP 获取数据包的pts/ntp

func (*ClientSession) ParsePacket

func (tis *ClientSession) ParsePacket(data []byte) ([]rtcp.Packet, *rtp.Packet, error)

ParsePacket 解析packet

func (*ClientSession) ReadPacketRTCP

func (tis *ClientSession) ReadPacketRTCP(packets []rtcp.Packet, addr net.Addr)

ReadPacketRTCP 接收到rtcp包

func (*ClientSession) ReadPacketRTP

func (tis *ClientSession) ReadPacketRTP(pkt *rtp.Packet, addr net.Addr)

ReadPacketRTP [5] 接收到rtp包

func (*ClientSession) SetRemoteAnswer

func (tis *ClientSession) SetRemoteAnswer(answer *rtcsdp.Session)

SetRemoteAnswer [2] answer

func (*ClientSession) Wait

func (tis *ClientSession) Wait() error

func (*ClientSession) WritePacketRTP

func (tis *ClientSession) WritePacketRTP(pkt *rtp.Packet, ntp time.Time) error

WritePacketRTP [5] 发送rtp包

type OrderPacketRTP

type OrderPacketRTP struct {
	PacketTime
	Packet   *rtp.Packet
	Receiver *track.Receiver
}

type PacketTime

type PacketTime struct {
	PTS   time.Duration
	PtsOK bool
	NTP   time.Time
	NtpOK bool
}

type RtcConnection

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

func NewRtcConnection

func NewRtcConnection(reader track.RtpRtcpReader) *RtcConnection

func (*RtcConnection) Close

func (tis *RtcConnection) Close(cause error)

func (*RtcConnection) Dial

func (tis *RtcConnection) Dial(objectAnswer *rtcsdp.Session) error

func (*RtcConnection) WriteRTCP

func (tis *RtcConnection) WriteRTCP(pkt []rtcp.Packet, addr net.Addr) error

func (*RtcConnection) WriteRTP

func (tis *RtcConnection) WriteRTP(pkt *rtp.Packet, addr net.Addr) error

Jump to

Keyboard shortcuts

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