Documentation ¶
Index ¶
- func DecodeSDP(in string, sdp *webrtc.SessionDescription) error
- func EncodeSDP(sdp *webrtc.SessionDescription) (string, error)
- type LoggerFactory
- type TrackLocalStaticSample
- func (s *TrackLocalStaticSample) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
- func (s *TrackLocalStaticSample) Codec() webrtc.RTPCodecCapability
- func (s *TrackLocalStaticSample) ID() string
- func (s *TrackLocalStaticSample) Kind() webrtc.RTPCodecType
- func (s *TrackLocalStaticSample) StreamID() string
- func (s *TrackLocalStaticSample) Unbind(t webrtc.TrackLocalContext) error
- func (s *TrackLocalStaticSample) WriteFrame(frame []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoggerFactory ¶
LoggerFactory wraps a golog.Logger for use with pion's webrtc logging system.
func (LoggerFactory) NewLogger ¶
func (lf LoggerFactory) NewLogger(scope string) logging.LeveledLogger
NewLogger returns a new webrtc logger under the given scope.
type TrackLocalStaticSample ¶
type TrackLocalStaticSample struct {
// contains filtered or unexported fields
}
TrackLocalStaticSample is a TrackLocal that has a pre-set codec and accepts Samples. If you wish to send a RTP Packet use trackLocalStaticRTP
func NewTrackLocalStaticSample ¶
func NewTrackLocalStaticSample(c webrtc.RTPCodecCapability, id, streamID string) (*TrackLocalStaticSample, error)
NewTrackLocalStaticSample returns a TrackLocalStaticSample
func (*TrackLocalStaticSample) Bind ¶
func (s *TrackLocalStaticSample) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
Bind is called by the PeerConnection after negotiation is complete This asserts that the code requested is supported by the remote peer. If so it setups all the state (SSRC and PayloadType) to have a call
func (*TrackLocalStaticSample) Codec ¶
func (s *TrackLocalStaticSample) Codec() webrtc.RTPCodecCapability
Codec gets the Codec of the track
func (*TrackLocalStaticSample) ID ¶
func (s *TrackLocalStaticSample) ID() string
ID is the unique identifier for this Track. This should be unique for the stream, but doesn't have to globally unique. A common example would be 'audio' or 'video' and StreamID would be 'desktop' or 'webcam'
func (*TrackLocalStaticSample) Kind ¶
func (s *TrackLocalStaticSample) Kind() webrtc.RTPCodecType
Kind controls if this TrackLocal is audio or video
func (*TrackLocalStaticSample) StreamID ¶
func (s *TrackLocalStaticSample) StreamID() string
StreamID is the group this track belongs too. This must be unique
func (*TrackLocalStaticSample) Unbind ¶
func (s *TrackLocalStaticSample) Unbind(t webrtc.TrackLocalContext) error
Unbind implements the teardown logic when the track is no longer needed. This happens because a track has been stopped.
func (*TrackLocalStaticSample) WriteFrame ¶
func (s *TrackLocalStaticSample) WriteFrame(frame []byte) error
WriteFrame writes a frane to the TrackLocalStaticSample If one PeerConnection fails the packets will still be sent to all PeerConnections. The error message will contain the ID of the failed PeerConnections so you can remove them