Documentation ¶
Index ¶
- Constants
- type Consumer
- func (c *Consumer) Close()
- func (c *Consumer) FillJson() json.RawMessage
- func (c *Consumer) FillJsonStats() json.RawMessage
- func (c *Consumer) GetConsumableRtpEncodings() []mediasoupdata.RtpEncodingParameters
- func (c *Consumer) GetId() string
- func (c *Consumer) GetKind() mediasoupdata.MediaKind
- func (c *Consumer) GetMediaSsrcs() []uint32
- func (c *Consumer) GetRtpParameters() mediasoupdata.RtpParameters
- func (c *Consumer) GetType() mediasoupdata.ConsumerType
- func (c *Consumer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
- func (c *Consumer) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)
- func (c *Consumer) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)
- func (c *Consumer) SendRtpPacket(packet *rtp.Packet)
- type IConsumer
- type ITransport
- type KeyFrameRequestDelayer
- type KeyFrameRequestManager
- type KeyFrameRequestManagerParam
- type ParamRtpStream
- type ParamRtpStreamRecv
- type ParamRtpStreamSend
- type Producer
- func (p *Producer) Close()
- func (p *Producer) CreateRtpStream(packet *rtp.Packet, mediaCodec *mediasoupdata.RtpCodecParameters, ...) *RtpStreamRecv
- func (p *Producer) FillJson() json.RawMessage
- func (p *Producer) FillJsonStats() json.RawMessage
- func (p *Producer) GetRtpStream(packet *rtp.Packet) *RtpStreamRecv
- func (p *Producer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
- func (p *Producer) MangleRtpPacket(packet *rtp.Packet, rtpStream *RtpStreamRecv) bool
- func (p *Producer) NotifyNewRtpStream(rtpStream *RtpStreamRecv)
- func (p *Producer) OnKeyFrameNeeded(ssrc uint32)
- func (p *Producer) OnRtpStreamSendRtcpPacket(packet rtcp.Packet)
- func (p *Producer) PostProcessRtpPacket(packet *rtp.Packet)
- func (p *Producer) PreProcessRtpPacket(packet *rtp.Packet)
- func (p *Producer) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)
- func (p *Producer) ReceiveRtpPacket(packet *rtp.Packet) (result ReceiveRtpPacketResult)
- func (p *Producer) RequestKeyFrame(mappedSsrc uint32)
- type ReceiveRtpPacketResult
- type Router
- func (r *Router) Close()
- func (r *Router) FillJson() json.RawMessage
- func (r *Router) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
- func (r *Router) OnTransportConsumerClosed(producerId, consumerId string)
- func (r *Router) OnTransportConsumerKeyFrameRequested(consumerId string, mappedSsrc uint32)
- func (r *Router) OnTransportNewConsumer(consumer IConsumer, producerId string) error
- func (r *Router) OnTransportNewProducer(producer *Producer) error
- func (r *Router) OnTransportProducerClosed(producerId string)
- func (r *Router) OnTransportProducerRtpPacketReceived(producer *Producer, packet *rtp.Packet)
- type RtpDataCounter
- type RtpHeaderExtensionIds
- type RtpListener
- type RtpStream
- func (r *RtpStream) FillJsonStats(stat *mediasoupdata.ProducerStat)
- func (r *RtpStream) GetId() string
- func (r *RtpStream) GetRtxSsrc() uint32
- func (r *RtpStream) GetSsrc() uint32
- func (r *RtpStream) HasRtx() bool
- func (r *RtpStream) ReceivePacket(packet *rtp.Packet) bool
- func (r *RtpStream) SetRtx(payloadType uint8, ssrc uint32)
- type RtpStreamRecv
- func (r *RtpStreamRecv) FillJsonStats(stat *mediasoupdata.ProducerStat)
- func (r *RtpStreamRecv) GetScore() uint8
- func (r *RtpStreamRecv) Pause()
- func (r *RtpStreamRecv) ReceivePacket(packet *rtp.Packet) bool
- func (r *RtpStreamRecv) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)
- func (r *RtpStreamRecv) ReceiveRtxPacket(packet *rtp.Packet) bool
- func (r *RtpStreamRecv) RequestKeyFrame()
- type RtpStreamSend
- type RtxStream
- type SimpleConsumer
- func (c *SimpleConsumer) Close()
- func (c *SimpleConsumer) CreateRtpStream()
- func (c *SimpleConsumer) FillJsonStats() json.RawMessage
- func (c *SimpleConsumer) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)
- func (c *SimpleConsumer) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)
- func (c *SimpleConsumer) RequestKeyFrame()
- func (c *SimpleConsumer) SendRtpPacket(packet *rtp.Packet)
- type StorageItem
- type TransmissionCounter
- type Transport
- func (t *Transport) Close()
- func (t *Transport) Consume(producerId, consumerId string, options mediasoupdata.ConsumerOptions) (*mediasoupdata.ConsumerData, error)
- func (t *Transport) FillJson() json.RawMessage
- func (t *Transport) FillJsonStats() json.RawMessage
- func (t *Transport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
- func (t *Transport) HandleRtcpPacket(header *rtcp.Header, packet rtcp.Packet)
- func (t *Transport) OnConsumerKeyFrameRequested(consumer IConsumer, mappedSsrc uint32)
- func (t *Transport) OnConsumerSendRtpPacket(consumer IConsumer, packet *rtp.Packet)
- func (t *Transport) OnProducerRtpPacketReceived(producer *Producer, packet *rtp.Packet)
- func (t *Transport) OnProducerSendRtcpPacket(packet rtcp.Packet)
- func (t *Transport) Produce(id string, options mediasoupdata.ProducerOptions) (*mediasoupdata.ProducerData, error)
- func (t *Transport) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)
- func (t *Transport) ReceiveRtcpPacket(header *rtcp.Header, packets []rtcp.Packet)
- func (t *Transport) ReceiveRtpPacket(packet *rtp.Packet)
- type WebrtcTransport
- func (t *WebrtcTransport) Close()
- func (t *WebrtcTransport) Connect(options mediasoupdata.TransportConnectOptions) (*mediasoupdata.TransportConnectData, error)
- func (t *WebrtcTransport) FillJson() json.RawMessage
- func (t *WebrtcTransport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
- func (t *WebrtcTransport) OnPacketReceived(data []byte)
- func (t *WebrtcTransport) OnRtcpDataReceived(rawData []byte)
- func (t *WebrtcTransport) OnRtpDataReceived(rawData []byte)
- func (t *WebrtcTransport) SendRtcpPacket(packet rtcp.Packet)
- func (t *WebrtcTransport) SendRtpPacket(packet *rtp.Packet)
Constants ¶
View Source
const ( InactivityCheckInterval = 1500 // In ms. InactivityCheckIntervalWithDtx = 5000 // In ms. )
View Source
const (
MtuSize = 1500
)
View Source
const (
RtpProbationSsrc = 1234
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { Id string ProducerId string Kind mediasoupdata.MediaKind RtpHeaderExtensionIds RtpHeaderExtensionIds // contains filtered or unexported fields }
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) GetKind ¶
func (c *Consumer) GetKind() mediasoupdata.MediaKind
func (*Consumer) GetMediaSsrcs ¶
func (*Consumer) GetRtpParameters ¶
func (c *Consumer) GetRtpParameters() mediasoupdata.RtpParameters
func (*Consumer) GetType ¶
func (c *Consumer) GetType() mediasoupdata.ConsumerType
func (*Consumer) HandleRequest ¶
func (c *Consumer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
func (*Consumer) ReceiveKeyFrameRequest ¶
func (*Consumer) ReceiveRtcpReceiverReport ¶
func (c *Consumer) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)
func (*Consumer) SendRtpPacket ¶
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 *rtp.Packet) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32) GetMediaSsrcs() []uint32 GetKind() mediasoupdata.MediaKind GetConsumableRtpEncodings() []mediasoupdata.RtpEncodingParameters ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport) }
type ITransport ¶
type ITransport interface { Close() FillJson() json.RawMessage HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData) ReceiveRtpPacket(packet *rtp.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 NewKeyFrameRequestManager ¶
func NewKeyFrameRequestManager(param *KeyFrameRequestManagerParam) *KeyFrameRequestManager
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 ParamRtpStreamRecv ¶
type ParamRtpStreamRecv struct { *ParamRtpStream // contains filtered or unexported fields }
type ParamRtpStreamSend ¶
type ParamRtpStreamSend struct { *ParamRtpStream // contains filtered or unexported fields }
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) CreateRtpStream ¶
func (p *Producer) CreateRtpStream(packet *rtp.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) GetRtpStream ¶
func (p *Producer) GetRtpStream(packet *rtp.Packet) *RtpStreamRecv
func (*Producer) HandleRequest ¶
func (p *Producer) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
func (*Producer) MangleRtpPacket ¶
func (p *Producer) MangleRtpPacket(packet *rtp.Packet, rtpStream *RtpStreamRecv) bool
func (*Producer) NotifyNewRtpStream ¶
func (p *Producer) NotifyNewRtpStream(rtpStream *RtpStreamRecv)
func (*Producer) OnKeyFrameNeeded ¶
func (*Producer) OnRtpStreamSendRtcpPacket ¶
func (*Producer) PostProcessRtpPacket ¶
func (*Producer) PreProcessRtpPacket ¶
func (*Producer) ReceiveRtcpSenderReport ¶
func (p *Producer) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)
func (*Producer) ReceiveRtpPacket ¶
func (p *Producer) ReceiveRtpPacket(packet *rtp.Packet) (result ReceiveRtpPacketResult)
func (*Producer) RequestKeyFrame ¶
type ReceiveRtpPacketResult ¶
type ReceiveRtpPacketResult int
const ( ReceiveRtpPacketResultDISCARDED ReceiveRtpPacketResult = iota ReceiveRtpPacketResultMEDIA ReceiveRtpPacketResultRETRANSMISSION )
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
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 (*Router) OnTransportConsumerKeyFrameRequested ¶
func (*Router) OnTransportNewConsumer ¶
func (*Router) OnTransportNewProducer ¶
func (*Router) OnTransportProducerClosed ¶
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 *rtp.Packet)
type RtpHeaderExtensionIds ¶
type RtpListener ¶
type RtpListener struct {
// contains filtered or unexported fields
}
func (*RtpListener) AddProducer ¶
func (r *RtpListener) AddProducer(producer *Producer)
func (*RtpListener) GetProducer ¶
func (r *RtpListener) GetProducer(packet *rtp.Packet) *Producer
func (*RtpListener) GetProducerBySSRC ¶
func (r *RtpListener) GetProducerBySSRC(ssrc uint32) *Producer
type RtpStream ¶
type RtpStream struct {
// contains filtered or unexported fields
}
func (*RtpStream) FillJsonStats ¶ added in v1.0.1
func (r *RtpStream) FillJsonStats(stat *mediasoupdata.ProducerStat)
func (*RtpStream) GetRtxSsrc ¶
type RtpStreamRecv ¶
type RtpStreamRecv struct { *RtpStream // contains filtered or unexported fields }
func (*RtpStreamRecv) FillJsonStats ¶
func (r *RtpStreamRecv) FillJsonStats(stat *mediasoupdata.ProducerStat)
func (*RtpStreamRecv) GetScore ¶
func (r *RtpStreamRecv) GetScore() uint8
func (*RtpStreamRecv) Pause ¶
func (r *RtpStreamRecv) Pause()
func (*RtpStreamRecv) ReceivePacket ¶
func (r *RtpStreamRecv) ReceivePacket(packet *rtp.Packet) bool
func (*RtpStreamRecv) ReceiveRtcpSenderReport ¶
func (r *RtpStreamRecv) ReceiveRtcpSenderReport(report *rtcp.ReceptionReport)
func (*RtpStreamRecv) ReceiveRtxPacket ¶
func (r *RtpStreamRecv) ReceiveRtxPacket(packet *rtp.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) ReceivePacket ¶ added in v1.0.1
func (p *RtpStreamSend) ReceivePacket(packet *rtp.Packet) bool
func (*RtpStreamSend) ReceiveRtcpReceiverReport ¶
func (p *RtpStreamSend) ReceiveRtcpReceiverReport(report *rtcp.ReceptionReport)
func (*RtpStreamSend) UpdateScore ¶
func (p *RtpStreamSend) UpdateScore(report *rtcp.ReceptionReport)
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) ReceiveKeyFrameRequest ¶
func (c *SimpleConsumer) ReceiveKeyFrameRequest(feedbackFormat uint8, ssrc uint32)
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 *rtp.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 *rtp.Packet)
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func (*Transport) Consume ¶
func (t *Transport) Consume(producerId, consumerId string, options mediasoupdata.ConsumerOptions) (*mediasoupdata.ConsumerData, error)
func (*Transport) FillJson ¶
func (t *Transport) FillJson() json.RawMessage
func (*Transport) FillJsonStats ¶
func (t *Transport) FillJsonStats() json.RawMessage
func (*Transport) HandleRequest ¶
func (t *Transport) HandleRequest(request workerchannel.RequestData, response *workerchannel.ResponseData)
func (*Transport) HandleRtcpPacket ¶
func (*Transport) OnConsumerKeyFrameRequested ¶
func (*Transport) OnConsumerSendRtpPacket ¶
func (*Transport) OnProducerRtpPacketReceived ¶
func (*Transport) OnProducerSendRtcpPacket ¶
func (*Transport) Produce ¶
func (t *Transport) Produce(id string, options mediasoupdata.ProducerOptions) (*mediasoupdata.ProducerData, error)
func (*Transport) ReceiveKeyFrameRequest ¶
func (*Transport) ReceiveRtcpPacket ¶
func (*Transport) ReceiveRtpPacket ¶
type WebrtcTransport ¶
type WebrtcTransport struct { ITransport // contains filtered or unexported fields }
func (*WebrtcTransport) Close ¶
func (t *WebrtcTransport) Close()
func (*WebrtcTransport) Connect ¶
func (t *WebrtcTransport) Connect(options mediasoupdata.TransportConnectOptions) (*mediasoupdata.TransportConnectData, error)
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) SendRtcpPacket ¶
func (t *WebrtcTransport) SendRtcpPacket(packet rtcp.Packet)
func (*WebrtcTransport) SendRtpPacket ¶
func (t *WebrtcTransport) SendRtpPacket(packet *rtp.Packet)
Source Files ¶
- consumer.go
- dtls_transport.go
- ice_conn.go
- ice_server.go
- key_frame_request_manager.go
- producer.go
- router.go
- rtp_data_counter.go
- rtp_header_extension_ids.go
- rtp_listener.go
- rtp_packet.go
- rtp_probation_generator.go
- rtp_stream.go
- rtp_stream_recv.go
- rtp_stream_send.go
- rtx_stream.go
- simple_consumer.go
- storage_item.go
- transmission_counter.go
- transport.go
- webrtc_transport.go
Click to show internal directories.
Click to hide internal directories.