Documentation
¶
Index ¶
- Variables
- func Close()
- func DelPipeline(mid string)
- func DelSub(mid, id string)
- func DelSubFromAllPub(id string) map[string]string
- func DelSubFromAllPubByPrefix(id string) map[string]string
- func GetSubs(mid string) map[string]Transport
- func GetWebRtcMIDByPID(id string) []string
- func Init(port int, ices []string)
- func NewRTPTransportSub(mid, sid, addr string)
- type RTPTransport
- func (t *RTPTransport) Close()
- func (t *RTPTransport) ID() string
- func (t *RTPTransport) ReadRTP() (*rtp.Packet, error)
- func (t *RTPTransport) SSRCPT() map[uint32]uint8
- func (t *RTPTransport) WriteRTCP(pkt rtcp.Packet) error
- func (t *RTPTransport) WriteRTP(rtp *rtp.Packet) error
- func (t *RTPTransport) WriteRawRTCP(data []byte) (int, error)
- type Transport
- type WebRTCTransport
- func (t *WebRTCTransport) AnswerPublish(rid string, offer webrtc.SessionDescription, options map[string]interface{}, ...) (answer webrtc.SessionDescription, err error)
- func (t *WebRTCTransport) AnswerSubscribe(offer webrtc.SessionDescription, ssrcPT map[uint32]uint8, mid string) (answer webrtc.SessionDescription, err error)
- func (t *WebRTCTransport) Close()
- func (t *WebRTCTransport) ID() string
- func (t *WebRTCTransport) ReadRTP() (*rtp.Packet, error)
- func (t *WebRTCTransport) SSRCPT() map[uint32]uint8
- func (t *WebRTCTransport) WriteRTCP(pkt rtcp.Packet) error
- func (t *WebRTCTransport) WriteRTP(pkt *rtp.Packet) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //CleanChannel return the dead pub's mid CleanChannel = make(chan string) )
Functions ¶
func DelSubFromAllPub ¶
DelSubFromAllPub del all sub by id
func DelSubFromAllPubByPrefix ¶
DelSubFromAllPubByPrefix del sub from all pipelines by prefix
func NewRTPTransportSub ¶
func NewRTPTransportSub(mid, sid, addr string)
NewRTPTransportSub new a rtp transport suber
Types ¶
type RTPTransport ¶
type RTPTransport struct {
// contains filtered or unexported fields
}
RTPTransport ..
func (*RTPTransport) ReadRTP ¶
func (t *RTPTransport) ReadRTP() (*rtp.Packet, error)
ReadRTP read rtp from transport
func (*RTPTransport) SSRCPT ¶
func (t *RTPTransport) SSRCPT() map[uint32]uint8
SSRCPT playload type and ssrc
func (*RTPTransport) WriteRTP ¶
func (t *RTPTransport) WriteRTP(rtp *rtp.Packet) error
WriteRTP send rtp packet
func (*RTPTransport) WriteRawRTCP ¶
func (t *RTPTransport) WriteRawRTCP(data []byte) (int, error)
WriteRawRTCP write rtcp data
type Transport ¶
type Transport interface { ID() string ReadRTP() (*rtp.Packet, error) WriteRTP(*rtp.Packet) error WriteRTCP(rtcp.Packet) error Close() // contains filtered or unexported methods }
Transport is a interface
type WebRTCTransport ¶
type WebRTCTransport struct {
// contains filtered or unexported fields
}
WebRTCTransport ..
func NewWebRTCTransport ¶
func NewWebRTCTransport(mid, id string, isPub bool) *WebRTCTransport
NewWebRTCTransport new a webrtc transport
func (*WebRTCTransport) AnswerPublish ¶
func (t *WebRTCTransport) AnswerPublish(rid string, offer webrtc.SessionDescription, options map[string]interface{}, fn func(ssrc uint32, pt uint8)) (answer webrtc.SessionDescription, err error)
AnswerPublish answer to pub
func (*WebRTCTransport) AnswerSubscribe ¶
func (t *WebRTCTransport) AnswerSubscribe(offer webrtc.SessionDescription, ssrcPT map[uint32]uint8, mid string) (answer webrtc.SessionDescription, err error)
AnswerSubscribe answer to sub
func (*WebRTCTransport) ReadRTP ¶
func (t *WebRTCTransport) ReadRTP() (*rtp.Packet, error)
ReadRTP read rtp packet
func (*WebRTCTransport) SSRCPT ¶
func (t *WebRTCTransport) SSRCPT() map[uint32]uint8
SSRCPT get SSRC and PayloadType
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
deadline
Package deadline provides deadline timer used to implement net.Conn compatible connection
|
Package deadline provides deadline timer used to implement net.Conn compatible connection |
udp
Package udp provides a connection-oriented listener over a UDP PacketConn
|
Package udp provides a connection-oriented listener over a UDP PacketConn |
Click to show internal directories.
Click to hide internal directories.