rtc

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 17: 16 bit mask + the initial sequence number.
	MaxRequestedPackets = 17
	// Don't retransmit packets older than this (ms).
	MaxRetransmissionDelay = 2000
	DefaultRtt             = 100
)
View Source
const (
	MaxDropout           = 3000
	MaxMisOrder          = 1500
	RtpSeqMod            = 1 << 16
	ScoreHistogramLength = 24
)
View Source
const (
	InactivityCheckInterval        = 1500 // In ms.
	InactivityCheckIntervalWithDtx = 5000 // In ms.
)
View Source
const (
	MtuSize = 1500
)
View Source
const (
	PipeTransportProtocol = "udp"
)

Variables

This section is empty.

Functions

func ProcessRtpPacket added in v1.0.2

func ProcessRtpPacket(packet *rtpparser.Packet, mimeType mediasoupdata.RtpCodecMimeType)

Types

type ActiveSpeakerObserver added in v1.0.6

type ActiveSpeakerObserver struct {
	IRtpObserver
	// contains filtered or unexported fields
}

func (*ActiveSpeakerObserver) HandleRequest added in v1.0.6

func (t *ActiveSpeakerObserver) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

type ActiveSpeakerObserverParam added in v1.0.6

type ActiveSpeakerObserverParam struct {
	Id      string
	Options mediasoupdata.ActiveSpeakerObserverOptions
}

type AudioLevelObserver added in v1.0.6

type AudioLevelObserver struct {
	IRtpObserver
	// contains filtered or unexported fields
}

func (*AudioLevelObserver) HandleRequest added in v1.0.6

func (t *AudioLevelObserver) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

type AudioLevelObserverParam added in v1.0.6

type AudioLevelObserverParam struct {
	Id      string
	Options mediasoupdata.AudioLevelObserverOptions
}

type Consumer

type Consumer struct {
	Id                    string
	ProducerId            string
	Kind                  mediasoupdata.MediaKind
	RtpHeaderExtensionIds RtpHeaderExtensionIds
	// contains filtered or unexported fields
}

func (*Consumer) Close

func (c *Consumer) Close()

func (*Consumer) FillJson

func (c *Consumer) FillJson() json.RawMessage

func (*Consumer) FillJsonStats

func (c *Consumer) FillJsonStats() json.RawMessage

func (*Consumer) GetConsumableRtpEncodings

func (c *Consumer) GetConsumableRtpEncodings() []*mediasoupdata.RtpEncodingParameters

func (*Consumer) GetId

func (c *Consumer) GetId() string

func (*Consumer) GetKind

func (c *Consumer) GetKind() mediasoupdata.MediaKind

func (*Consumer) GetLastRtcpSentTime added in v1.0.7

func (c *Consumer) GetLastRtcpSentTime() time.Time

func (*Consumer) GetMaxRtcpInterval added in v1.0.7

func (c *Consumer) GetMaxRtcpInterval() time.Duration

getter & setter

func (*Consumer) GetMediaSsrcs

func (c *Consumer) GetMediaSsrcs() []uint32

func (*Consumer) GetRtcp added in v1.0.2

func (c *Consumer) GetRtcp(rtpStream *RtpStreamSend, now time.Time) []rtcp.Packet

func (*Consumer) GetRtpParameters

func (c *Consumer) GetRtpParameters() mediasoupdata.RtpParameters

func (*Consumer) GetRtpStreams added in v1.0.2

func (c *Consumer) GetRtpStreams() []*RtpStreamSend

func (*Consumer) GetType

func (c *Consumer) GetType() mediasoupdata.ConsumerType

func (*Consumer) HandleRequest

func (c *Consumer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*Consumer) NeedWorstRemoteFractionLost added in v1.0.3

func (c *Consumer) NeedWorstRemoteFractionLost(worstRemoteFractionLost *uint8)

func (*Consumer) ReceiveKeyFrameRequest

func (c *Consumer) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)

func (*Consumer) ReceiveNack added in v1.0.2

func (c *Consumer) ReceiveNack(nackPacket *rtcp.TransportLayerNack)

func (*Consumer) ReceiveRtcpReceiverReport

func (c *Consumer) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)

func (*Consumer) SendRtpPacket

func (c *Consumer) SendRtpPacket(packet *rtpparser.Packet)

func (*Consumer) SetLastRtcpSentTime added in v1.0.7

func (c *Consumer) SetLastRtcpSentTime(v time.Time)

type DataProducer added in v1.0.6

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

func (*DataProducer) FillJson added in v1.0.6

func (p *DataProducer) FillJson() json.RawMessage

type DirectTransport added in v1.0.4

type DirectTransport struct {
	ITransport
	// contains filtered or unexported fields
}

func (*DirectTransport) Close added in v1.0.6

func (t *DirectTransport) Close()

func (*DirectTransport) FillJson added in v1.0.4

func (t *DirectTransport) FillJson() json.RawMessage

func (*DirectTransport) HandleRequest added in v1.0.6

func (t *DirectTransport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*DirectTransport) SendRtcpCompoundPacket added in v1.0.6

func (t *DirectTransport) SendRtcpCompoundPacket(packets []rtcp.Packet)

func (*DirectTransport) SendRtcpPacket added in v1.0.6

func (t *DirectTransport) SendRtcpPacket(packet rtcp.Packet)

func (*DirectTransport) SendRtpPacket added in v1.0.6

func (t *DirectTransport) SendRtpPacket(packet *rtpparser.Packet)

type IConsumer

type IConsumer interface {
	GetId() string
	Close()
	FillJson() json.RawMessage
	HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
	GetType() mediasoupdata.ConsumerType
	GetRtpParameters() mediasoupdata.RtpParameters
	SendRtpPacket(packet *rtpparser.Packet)
	ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)
	GetMediaSsrcs() []uint32
	GetKind() mediasoupdata.MediaKind
	GetConsumableRtpEncodings() []*mediasoupdata.RtpEncodingParameters
	ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)
	ReceiveNack(nackPacket *rtcp.TransportLayerNack)
	GetRtpStreams() []*RtpStreamSend
	GetRtcp(rtpStream *RtpStreamSend, now time.Time) []rtcp.Packet
	NeedWorstRemoteFractionLost(worstRemoteFractionLost *uint8)

	// maxRtcpInterval
	GetMaxRtcpInterval() time.Duration
	// lastRtcpSentTime
	GetLastRtcpSentTime() time.Time
	SetLastRtcpSentTime(v time.Time)
}

type IRtpObserver added in v1.0.6

type IRtpObserver interface {
	HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
}

type ITransport

type ITransport interface {
	Connected()
	Close()
	GetJson(data *mediasoupdata.TransportDump)
	FillJson() json.RawMessage
	HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
	ReceiveRtpPacket(packet *rtpparser.Packet)
	ReceiveRtcpPacket(header *rtcp.Header, packets []rtcp.Packet)
}

type KeyFrameRequestDelayer

type KeyFrameRequestDelayer struct {
}

func (*KeyFrameRequestDelayer) SetKeyFrameRequested

func (p *KeyFrameRequestDelayer) SetKeyFrameRequested(v bool)

type KeyFrameRequestManager

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

func (*KeyFrameRequestManager) ForceKeyFrameNeeded

func (p *KeyFrameRequestManager) ForceKeyFrameNeeded(ssrc uint32)

func (*KeyFrameRequestManager) KeyFrameNeeded

func (p *KeyFrameRequestManager) KeyFrameNeeded(ssrc uint32)

type KeyFrameRequestManagerParam

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

type ParamRtpStream

type ParamRtpStream struct {
	EncodingIdx    int
	Ssrc           uint32
	PayloadType    uint8
	MimeType       mediasoupdata2.RtpCodecMimeType
	ClockRate      int
	Rid            string
	Cname          string
	RtxSsrc        uint32
	RtxPayloadType uint8
	UseNack        bool
	UsePli         bool
	UseFir         bool
	UseInBandFec   bool
	UseDtx         bool
	SpatialLayers  uint8
	TemporalLayers uint8
}

type ParamRtpStreamRecv

type ParamRtpStreamRecv struct {
	*ParamRtpStream
	// contains filtered or unexported fields
}

type ParamRtpStreamSend

type ParamRtpStreamSend struct {
	*ParamRtpStream

	OnRtpStreamRetransmitRtpPacket func(packet *rtpparser.Packet)
	// contains filtered or unexported fields
}

type ParamRtxStream added in v1.0.2

type ParamRtxStream struct {
	Ssrc        uint32
	PayloadType uint8
	MimeType    mediasoupdata.RtpCodecMimeType
	ClockRate   int
	RRid        string
	Cname       string
}

type PipeTransport added in v1.0.4

type PipeTransport struct {
	ITransport
	// contains filtered or unexported fields
}

func (*PipeTransport) Close added in v1.0.4

func (t *PipeTransport) Close()

func (*PipeTransport) FillJson added in v1.0.4

func (t *PipeTransport) FillJson() json.RawMessage

func (*PipeTransport) HandleRequest added in v1.0.4

func (t *PipeTransport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*PipeTransport) OnPacketReceived added in v1.0.4

func (t *PipeTransport) OnPacketReceived(data []byte)

func (*PipeTransport) OnRtcpDataReceived added in v1.0.4

func (t *PipeTransport) OnRtcpDataReceived(rawData []byte)

func (*PipeTransport) OnRtpDataReceived added in v1.0.4

func (t *PipeTransport) OnRtpDataReceived(rawData []byte)

func (*PipeTransport) SendRtcpCompoundPacket added in v1.0.4

func (t *PipeTransport) SendRtcpCompoundPacket(packets []rtcp.Packet)

func (*PipeTransport) SendRtcpPacket added in v1.0.4

func (t *PipeTransport) SendRtcpPacket(packet rtcp.Packet)

func (*PipeTransport) SendRtpPacket added in v1.0.4

func (t *PipeTransport) SendRtpPacket(packet *rtpparser.Packet)

type Producer

type Producer struct {
	Kind                  mediasoupdata.MediaKind
	RtpParameters         mediasoupdata.RtpParameters
	Type                  mediasoupdata.ProducerType
	RtpHeaderExtensionIds RtpHeaderExtensionIds
	Paused                bool
	// contains filtered or unexported fields
}

func (*Producer) Close

func (p *Producer) Close()

func (*Producer) CreateRtpStream

func (p *Producer) CreateRtpStream(packet *rtpparser.Packet, mediaCodec *mediasoupdata.RtpCodecParameters, encodingIdx int) *RtpStreamRecv

func (*Producer) FillJson

func (p *Producer) FillJson() json.RawMessage

func (*Producer) FillJsonStats

func (p *Producer) FillJsonStats() json.RawMessage

func (*Producer) GetRtcp added in v1.0.3

func (p *Producer) GetRtcp(now time.Time) []rtcp.Packet

func (*Producer) GetRtpStream

func (p *Producer) GetRtpStream(packet *rtpparser.Packet) *RtpStreamRecv

func (*Producer) HandleRequest

func (p *Producer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*Producer) MangleRtpPacket

func (p *Producer) MangleRtpPacket(packet *rtpparser.Packet, rtpStream *RtpStreamRecv) bool

func (*Producer) NotifyNewRtpStream

func (p *Producer) NotifyNewRtpStream(rtpStream *RtpStreamRecv)

func (*Producer) OnKeyFrameNeeded

func (p *Producer) OnKeyFrameNeeded(ssrc uint32)

func (*Producer) OnRtpStreamSendRtcpPacket

func (p *Producer) OnRtpStreamSendRtcpPacket(packet rtcp.Packet)

func (*Producer) PostProcessRtpPacket

func (p *Producer) PostProcessRtpPacket(packet *rtpparser.Packet)

func (*Producer) PreProcessRtpPacket

func (p *Producer) PreProcessRtpPacket(packet *rtpparser.Packet)

func (*Producer) ReceiveRtcpSenderReport

func (p *Producer) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)

func (*Producer) ReceiveRtpPacket

func (p *Producer) ReceiveRtpPacket(packet *rtpparser.Packet) (result ReceiveRtpPacketResult)

func (*Producer) RequestKeyFrame

func (p *Producer) RequestKeyFrame(mappedSsrc uint32)

type ReceiveRtpPacketResult

type ReceiveRtpPacketResult int
const (
	ReceiveRtpPacketResultDISCARDED ReceiveRtpPacketResult = iota
	ReceiveRtpPacketResultMEDIA
	ReceiveRtpPacketResultRETRANSMISSION
)

type Retransmission added in v1.0.2

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

func NewRetransmission added in v1.0.2

func NewRetransmission(bufferSize int) *Retransmission

type Router

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

func NewRouter

func NewRouter(id string) *Router

func (*Router) Close

func (r *Router) Close()

func (*Router) FillJson

func (r *Router) FillJson() json.RawMessage

func (*Router) HandleRequest

func (r *Router) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*Router) OnTransportConsumerClosed

func (r *Router) OnTransportConsumerClosed(producerId, consumerId string)

func (*Router) OnTransportConsumerKeyFrameRequested

func (r *Router) OnTransportConsumerKeyFrameRequested(consumerId string, mappedSsrc uint32)

func (*Router) OnTransportNeedWorstRemoteFractionLost added in v1.0.3

func (r *Router) OnTransportNeedWorstRemoteFractionLost(producerId string, worstRemoteFractionLost *uint8)

func (*Router) OnTransportNewConsumer

func (r *Router) OnTransportNewConsumer(consumer IConsumer, producerId string) error

func (*Router) OnTransportNewProducer

func (r *Router) OnTransportNewProducer(producer *Producer) error

func (*Router) OnTransportProducerClosed

func (r *Router) OnTransportProducerClosed(producerId string)

func (*Router) OnTransportProducerRtpPacketReceived

func (r *Router) OnTransportProducerRtpPacketReceived(producer *Producer, packet *rtpparser.Packet)

type RtpDataCounter

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

func NewRtpDataCounter added in v1.0.1

func NewRtpDataCounter(windowSizeMs int) *RtpDataCounter

func (RtpDataCounter) GetBitrate

func (p RtpDataCounter) GetBitrate(nowMs int64) uint32

func (RtpDataCounter) GetBytes

func (p RtpDataCounter) GetBytes() int64

func (RtpDataCounter) GetPacketCount

func (p RtpDataCounter) GetPacketCount() int64

func (*RtpDataCounter) Update

func (p *RtpDataCounter) Update(packet *rtpparser.Packet)

type RtpHeaderExtensionIds

type RtpHeaderExtensionIds struct {
	Mid               uint8
	Rid               uint8
	RRid              uint8
	AbsSendTime       uint8
	TransportWideCc01 uint8
	FrameMarking07    uint8
	FrameMarking      uint8
	SsrcAudioLevel    uint8
	VideoOrientation  uint8
	TOffset           uint8
	AbsCaptureTime    uint8
}

func (*RtpHeaderExtensionIds) String added in v1.0.6

func (r *RtpHeaderExtensionIds) String() string

type RtpListener

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

func (*RtpListener) AddProducer

func (r *RtpListener) AddProducer(producer *Producer) error

func (*RtpListener) GetProducer

func (r *RtpListener) GetProducer(packet *rtpparser.Packet) *Producer

func (*RtpListener) GetProducerByMID added in v1.0.6

func (r *RtpListener) GetProducerByMID(packet *rtpparser.Packet) *Producer

func (*RtpListener) GetProducerByRID added in v1.0.6

func (r *RtpListener) GetProducerByRID(packet *rtpparser.Packet) *Producer

func (*RtpListener) GetProducerBySSRC

func (r *RtpListener) GetProducerBySSRC(ssrc uint32) *Producer

GetProducerBySSRC is over-write to GetProducer in mediasoup

type RtpObserver added in v1.0.6

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

func (*RtpObserver) HandleRequest added in v1.0.6

func (t *RtpObserver) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

type RtpStream

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

func (*RtpStream) FillJsonStats added in v1.0.1

func (r *RtpStream) FillJsonStats(stat *mediasoupdata2.ProducerStat)

func (*RtpStream) GetCname added in v1.0.2

func (r *RtpStream) GetCname() string

func (*RtpStream) GetExpectedPackets added in v1.0.3

func (r *RtpStream) GetExpectedPackets() uint32

func (*RtpStream) GetId

func (r *RtpStream) GetId() string

func (*RtpStream) GetRid added in v1.0.6

func (r *RtpStream) GetRid() string

func (*RtpStream) GetRtpTimestamp added in v1.0.2

func (r *RtpStream) GetRtpTimestamp(now time.Time) uint32

func (*RtpStream) GetRtxSsrc

func (r *RtpStream) GetRtxSsrc() uint32

func (*RtpStream) GetSsrc

func (r *RtpStream) GetSsrc() uint32

func (*RtpStream) HasRtx

func (r *RtpStream) HasRtx() bool

func (*RtpStream) InitSeq added in v1.0.3

func (r *RtpStream) InitSeq(seq uint16)

func (*RtpStream) ReceivePacket

func (r *RtpStream) ReceivePacket(packet *rtpparser.Packet) bool

func (*RtpStream) SetRtx

func (r *RtpStream) SetRtx(payloadType uint8, ssrc uint32)

func (*RtpStream) UpdateSeq added in v1.0.3

func (r *RtpStream) UpdateSeq(packet *rtpparser.Packet) bool

type RtpStreamRecv

type RtpStreamRecv struct {
	*RtpStream
	// contains filtered or unexported fields
}

func (*RtpStreamRecv) FillJsonStats

func (r *RtpStreamRecv) FillJsonStats(stat *mediasoupdata.ProducerStat)

func (*RtpStreamRecv) GetRtcpReceiverReport added in v1.0.3

func (r *RtpStreamRecv) GetRtcpReceiverReport(now time.Time, worstRemoteFractionLost uint8) *rtcp.ReceptionReport

func (*RtpStreamRecv) GetScore

func (r *RtpStreamRecv) GetScore() uint8

func (*RtpStreamRecv) Pause

func (r *RtpStreamRecv) Pause()

func (*RtpStreamRecv) ReceivePacket

func (r *RtpStreamRecv) ReceivePacket(packet *rtpparser.Packet) bool

func (*RtpStreamRecv) ReceiveRtcpSenderReport

func (r *RtpStreamRecv) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)

func (*RtpStreamRecv) ReceiveRtxPacket

func (r *RtpStreamRecv) ReceiveRtxPacket(packet *rtpparser.Packet) bool

func (*RtpStreamRecv) RequestKeyFrame

func (r *RtpStreamRecv) RequestKeyFrame()

type RtpStreamSend

type RtpStreamSend struct {
	*RtpStream
	// contains filtered or unexported fields
}

func (*RtpStreamSend) FillJsonStats added in v1.0.1

func (p *RtpStreamSend) FillJsonStats(stat *mediasoupdata.ConsumerStat)

func (*RtpStreamSend) FillRetransmissionContainer added in v1.0.2

func (p *RtpStreamSend) FillRetransmissionContainer(nackPair rtcp.NackPair)

This method looks for the requested RTP packets and inserts them into the Retransmission vector (and sets to null the next position).

If RTX is used the stored packet will be RTX encoded now (if not already encoded in a previous resend).

func (*RtpStreamSend) GetRtcpSdesChunk added in v1.0.2

func (p *RtpStreamSend) GetRtcpSdesChunk() *rtcp.SourceDescription

func (*RtpStreamSend) GetRtcpSenderReport added in v1.0.2

func (p *RtpStreamSend) GetRtcpSenderReport(now time.Time) *rtcp.SenderReport

func (*RtpStreamSend) ReceiveNack added in v1.0.2

func (p *RtpStreamSend) ReceiveNack(nackPacket *rtcp.TransportLayerNack)

func (*RtpStreamSend) ReceivePacket added in v1.0.1

func (p *RtpStreamSend) ReceivePacket(packet *rtpparser.Packet) bool

func (*RtpStreamSend) ReceiveRtcpReceiverReport

func (p *RtpStreamSend) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)

func (*RtpStreamSend) UpdateScore

func (p *RtpStreamSend) UpdateScore(report *rtcp.ReceptionReport)

type RtxStream

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

func (RtxStream) GetPacketsDiscarded added in v1.0.3

func (r RtxStream) GetPacketsDiscarded() uint32

func (*RtxStream) ReceivePacket added in v1.0.2

func (r *RtxStream) ReceivePacket(packet *rtpparser.Packet) bool

type SctpAssociation added in v1.0.6

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

func (*SctpAssociation) GetSctpAssociationParam added in v1.0.6

func (t *SctpAssociation) GetSctpAssociationParam() mediasoupdata.SctpParameters

type SimpleConsumer

type SimpleConsumer struct {
	IConsumer
	// contains filtered or unexported fields
}

func (*SimpleConsumer) Close

func (c *SimpleConsumer) Close()

func (*SimpleConsumer) CreateRtpStream

func (c *SimpleConsumer) CreateRtpStream()

func (*SimpleConsumer) FillJsonStats added in v1.0.1

func (c *SimpleConsumer) FillJsonStats() json.RawMessage

func (*SimpleConsumer) GetRtcp added in v1.0.2

func (c *SimpleConsumer) GetRtcp(rtpStream *RtpStreamSend, now time.Time) []rtcp.Packet

func (*SimpleConsumer) GetRtpStreams added in v1.0.2

func (c *SimpleConsumer) GetRtpStreams() []*RtpStreamSend

func (*SimpleConsumer) NeedWorstRemoteFractionLost added in v1.0.3

func (c *SimpleConsumer) NeedWorstRemoteFractionLost(worstRemoteFractionLost *uint8)

func (*SimpleConsumer) OnRtpStreamRetransmitRtpPacket added in v1.0.2

func (c *SimpleConsumer) OnRtpStreamRetransmitRtpPacket(packet *rtpparser.Packet)

func (*SimpleConsumer) ReceiveKeyFrameRequest

func (c *SimpleConsumer) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)

func (*SimpleConsumer) ReceiveNack added in v1.0.2

func (c *SimpleConsumer) ReceiveNack(nackPacket *rtcp.TransportLayerNack)

func (*SimpleConsumer) ReceiveRtcpReceiverReport

func (c *SimpleConsumer) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)

func (*SimpleConsumer) RequestKeyFrame

func (c *SimpleConsumer) RequestKeyFrame()

func (*SimpleConsumer) SendRtpPacket

func (c *SimpleConsumer) SendRtpPacket(packet *rtpparser.Packet)

type SimulcastConsumer added in v1.0.7

type SimulcastConsumer struct {
	IConsumer
	// contains filtered or unexported fields
}

func (*SimulcastConsumer) CreateRtpStream added in v1.0.7

func (c *SimulcastConsumer) CreateRtpStream()

func (*SimulcastConsumer) FillJsonStats added in v1.0.7

func (c *SimulcastConsumer) FillJsonStats() json.RawMessage

func (*SimulcastConsumer) OnRtpStreamRetransmitRtpPacket added in v1.0.7

func (c *SimulcastConsumer) OnRtpStreamRetransmitRtpPacket(packet *rtpparser.Packet)

type StorageItem

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

type TransmissionCounter

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

func (*TransmissionCounter) GetBitrate added in v1.0.1

func (p *TransmissionCounter) GetBitrate(nowMs int64) (rate uint32)

func (*TransmissionCounter) GetBytes added in v1.0.1

func (p *TransmissionCounter) GetBytes() (bytes int64)

func (*TransmissionCounter) GetPacketCount added in v1.0.1

func (p *TransmissionCounter) GetPacketCount() (packetCount int64)

func (*TransmissionCounter) Update

func (p *TransmissionCounter) Update(packet *rtpparser.Packet)

type Transport

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

func (*Transport) Close

func (t *Transport) Close()

func (*Transport) Connected added in v1.0.4

func (t *Transport) Connected()

func (*Transport) Consume

func (t *Transport) Consume(producerId, consumerId string, options mediasoupdata.ConsumerOptions) (*mediasoupdata.ConsumerData, error)

func (*Transport) DataProduce added in v1.0.6

func (t *Transport) DataProduce(id string, options mediasoupdata.DataProducerOptions) (*DataProducer, error)

func (*Transport) FillJson

func (t *Transport) FillJson() json.RawMessage

func (*Transport) FillJsonStats

func (t *Transport) FillJsonStats() json.RawMessage

func (*Transport) GetJson added in v1.0.6

func (t *Transport) GetJson(data *mediasoupdata.TransportDump)

func (*Transport) HandleRequest

func (t *Transport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*Transport) HandleRtcpPacket

func (t *Transport) HandleRtcpPacket(header *rtcp.Header, packet rtcp.Packet)

func (*Transport) OnConsumerKeyFrameRequested

func (t *Transport) OnConsumerKeyFrameRequested(consumer IConsumer, mappedSsrc uint32)

func (*Transport) OnConsumerRetransmitRtpPacket added in v1.0.2

func (t *Transport) OnConsumerRetransmitRtpPacket(packet *rtpparser.Packet)

func (*Transport) OnConsumerSendRtpPacket

func (t *Transport) OnConsumerSendRtpPacket(consumer IConsumer, packet *rtpparser.Packet)

func (*Transport) OnProducerRtpPacketReceived

func (t *Transport) OnProducerRtpPacketReceived(producer *Producer, packet *rtpparser.Packet)

func (*Transport) OnProducerSendRtcpPacket

func (t *Transport) OnProducerSendRtcpPacket(packet rtcp.Packet)

func (*Transport) OnTimer added in v1.0.2

func (t *Transport) OnTimer()

func (*Transport) Produce

func (*Transport) ReceiveKeyFrameRequest

func (t *Transport) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)

func (*Transport) ReceiveRtcpPacket

func (t *Transport) ReceiveRtcpPacket(header *rtcp.Header, packets []rtcp.Packet)

func (*Transport) ReceiveRtpPacket

func (t *Transport) ReceiveRtpPacket(packet *rtpparser.Packet)

func (*Transport) SendRtcp added in v1.0.2

func (t *Transport) SendRtcp(now time.Time)

type WebrtcTransport

type WebrtcTransport struct {
	ITransport
	// contains filtered or unexported fields
}

func (*WebrtcTransport) Close

func (t *WebrtcTransport) Close()

func (*WebrtcTransport) FillJson

func (t *WebrtcTransport) FillJson() json.RawMessage

func (*WebrtcTransport) HandleRequest

func (t *WebrtcTransport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)

func (*WebrtcTransport) OnPacketReceived

func (t *WebrtcTransport) OnPacketReceived(data []byte)

func (*WebrtcTransport) OnRtcpDataReceived

func (t *WebrtcTransport) OnRtcpDataReceived(rawData []byte)

func (*WebrtcTransport) OnRtpDataReceived

func (t *WebrtcTransport) OnRtpDataReceived(rawData []byte)

func (*WebrtcTransport) SendRtcpCompoundPacket added in v1.0.2

func (t *WebrtcTransport) SendRtcpCompoundPacket(packets []rtcp.Packet)

func (*WebrtcTransport) SendRtcpPacket

func (t *WebrtcTransport) SendRtcpPacket(packet rtcp.Packet)

func (*WebrtcTransport) SendRtpPacket

func (t *WebrtcTransport) SendRtpPacket(packet *rtpparser.Packet)

Jump to

Keyboard shortcuts

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