Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PayloadType ¶
type PayloadType struct { // Payload type number (<= 127) assigned by the SDP `rtpmap` attribute. Number uint8 // Encoding name, from the SDP `rtpmap` attribute (e.g. "H264"). Name string // Clock rate in Hz, from the SDP `rtpmap` attribute (e.g. 90000). ClockRate int // Codec-specific format parameters, from the SDP `fmtp` attribute. Format string // Supported feedback RTCP options, from the SDP `rtcp-fb` attributes. FeedbackOptions []string }
Payload type description, as provided via SDP.
type Session ¶
type Session struct { SessionOptions // contains filtered or unexported fields }
A Session represents an established RTP/RTCP connection to a remote peer. It contains one or more streams, each represented by their own SSRC.
func NewSession ¶
func NewSession(opts SessionOptions) *Session
func (*Session) AddStream ¶
func (s *Session) AddStream(opts StreamOptions) *Stream
func (*Session) RemoveStream ¶
type SessionOptions ¶
type SessionOptions struct { // Single connection over which RTP and RTCP are muxed. MuxConn net.Conn // Separate connections for RTP and RTCP. DataConn net.Conn ControlConn net.Conn // SRTP master key material. ReadKey []byte ReadSalt []byte WriteKey []byte WriteSalt []byte // Maximum size of outgoing packets, factoring in MTU and protocol overhead. MaxPacketSize int }
type Stream ¶
type Stream struct { StreamOptions // contains filtered or unexported fields }
func (*Stream) ReceiveVideo ¶
func (s *Stream) ReceiveVideo(quit <-chan struct{}, consume func(buf *packet.SharedBuffer) error) error
type StreamOptions ¶
type StreamOptions struct { LocalSSRC uint32 LocalCNAME string RemoteSSRC uint32 RemoteCNAME string // sendonly, recvonly, or sendrecv Direction string // Negotiated payload types, keyed by 7-bit dynamic payload type number. PayloadTypes map[byte]PayloadType // Maximum size of outgoing packets, factoring in MTU and protocol overhead. MaxPacketSize int }
Click to show internal directories.
Click to hide internal directories.