Documentation ¶
Index ¶
- Constants
- type PionSrsPlayConnector
- type PionSrsPushConnector
- type RTCTransportState
- type TrackSRSStaticSample
- func (s *TrackSRSStaticSample) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
- func (s *TrackSRSStaticSample) Codec() webrtc.RTPCodecCapability
- func (s *TrackSRSStaticSample) ID() string
- func (s *TrackSRSStaticSample) Kind() webrtc.RTPCodecType
- func (s *TrackSRSStaticSample) RID() string
- func (s *TrackSRSStaticSample) StreamID() string
- func (s *TrackSRSStaticSample) Unbind(t webrtc.TrackLocalContext) error
- func (s *TrackSRSStaticSample) WriteRtpPacket(pkg *rtp.Packet) error
- func (s *TrackSRSStaticSample) WriteSample(sample media.Sample) error
Constants ¶
View Source
const ( H264 = iota + 1 H265 Opus G711A G711U )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PionSrsPlayConnector ¶
type PionSrsPlayConnector struct { OnStateChange func(RTCTransportState) OnRtp func(cid int, pkg *rtp.Packet) // contains filtered or unexported fields }
func NewPionSrsPlayConnector ¶
func NewPionSrsPlayConnector(srsAddr string, app string, streamName string) (c *PionSrsPlayConnector, e error)
func (*PionSrsPlayConnector) Start ¶
func (c *PionSrsPlayConnector) Start() (startDone chan error)
func (*PionSrsPlayConnector) Stop ¶
func (c *PionSrsPlayConnector) Stop()
type PionSrsPushConnector ¶
type PionSrsPushConnector struct { OnStateChange func(RTCTransportState) // contains filtered or unexported fields }
func NewPionSrsPushConnector ¶
func NewPionSrsPushConnector(srsAddr string, app string, streamName string) (c *PionSrsPushConnector, e error)
func (*PionSrsPushConnector) AddTrack ¶
func (c *PionSrsPushConnector) AddTrack(cid int) (id int, e error)
func (*PionSrsPushConnector) Start ¶
func (c *PionSrsPushConnector) Start() error
func (*PionSrsPushConnector) Stop ¶
func (c *PionSrsPushConnector) Stop()
func (*PionSrsPushConnector) WriteFrame ¶
func (c *PionSrsPushConnector) WriteFrame(trackid int, data []byte, duration int64) error
type RTCTransportState ¶
type RTCTransportState int
const ( RTCTransportStateInit RTCTransportState = iota + 1 RTCTransportStateConnecting RTCTransportStateConnect RTCTransportStateDisconnect RTCTransportStateFailed )
func (RTCTransportState) String ¶
func (s RTCTransportState) String() string
type TrackSRSStaticSample ¶
type TrackSRSStaticSample struct {
// contains filtered or unexported fields
}
func NewTrackSRSStaticSample ¶
func NewTrackSRSStaticSample(c webrtc.RTPCodecCapability, id, streamID string, options ...func(*webrtc.TrackLocalStaticRTP)) (*TrackSRSStaticSample, error)
func (*TrackSRSStaticSample) Bind ¶
func (s *TrackSRSStaticSample) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
func (*TrackSRSStaticSample) Codec ¶
func (s *TrackSRSStaticSample) Codec() webrtc.RTPCodecCapability
func (*TrackSRSStaticSample) ID ¶
func (s *TrackSRSStaticSample) ID() string
func (*TrackSRSStaticSample) Kind ¶
func (s *TrackSRSStaticSample) Kind() webrtc.RTPCodecType
func (*TrackSRSStaticSample) RID ¶
func (s *TrackSRSStaticSample) RID() string
func (*TrackSRSStaticSample) StreamID ¶
func (s *TrackSRSStaticSample) StreamID() string
func (*TrackSRSStaticSample) Unbind ¶
func (s *TrackSRSStaticSample) Unbind(t webrtc.TrackLocalContext) error
func (*TrackSRSStaticSample) WriteRtpPacket ¶
func (s *TrackSRSStaticSample) WriteRtpPacket(pkg *rtp.Packet) error
func (*TrackSRSStaticSample) WriteSample ¶
func (s *TrackSRSStaticSample) WriteSample(sample media.Sample) error
Click to show internal directories.
Click to hide internal directories.