Documentation
¶
Index ¶
- Constants
- Variables
- func NewJessibucaSession(appName, streamid string, writeChanSize int, pc *peerConnection, ...) *jessibucaSession
- func NewWhepSession(appName, streamid string, writeChanSize int, pc *peerConnection, ...) *whepSession
- func NewWhipSession(streamid string, pc *peerConnection, lalServer logic.ILalServer) *whipSession
- type G711RtpDecoder
- type G711RtpEncoder
- type H264RtpDecoder
- type H264RtpEncoder
- type H265RtpDecoder
- type HevcRtpEncoder
- type IRtpDecoder
- type IRtpEncoder
- type OpusRtpDecoder
- type OpusRtpEncoder
- type Packer
- type RtcServer
- type StreamNotFoundFn
- type UnPacker
Constants ¶
View Source
const ( PacketH264 = "H264" PacketHEVC = "HEVC" PacketPCMA = "PCMA" PacketPCMU = "PCMU" PacketOPUS = "OPUS" )
Variables ¶
View Source
var ErrNeedMoreFrames = errors.New("need more frames")
Functions ¶
func NewJessibucaSession ¶
func NewJessibucaSession(appName, streamid string, writeChanSize int, pc *peerConnection, lalServer logic.ILalServer) *jessibucaSession
func NewWhepSession ¶
func NewWhepSession(appName, streamid string, writeChanSize int, pc *peerConnection, lalServer logic.ILalServer) *whepSession
func NewWhipSession ¶
func NewWhipSession(streamid string, pc *peerConnection, lalServer logic.ILalServer) *whipSession
Types ¶
type G711RtpDecoder ¶
type G711RtpDecoder struct {
IRtpDecoder
// contains filtered or unexported fields
}
func NewG711RtpDecoder ¶
func NewG711RtpDecoder(f format.Format) *G711RtpDecoder
type G711RtpEncoder ¶
type G711RtpEncoder struct {
IRtpEncoder
// contains filtered or unexported fields
}
func NewG711RtpEncoder ¶
func NewG711RtpEncoder(pt uint8) *G711RtpEncoder
type H264RtpDecoder ¶
type H264RtpDecoder struct {
IRtpDecoder
// contains filtered or unexported fields
}
func NewH264RtpDecoder ¶
func NewH264RtpDecoder(f format.Format) *H264RtpDecoder
type H264RtpEncoder ¶
type H264RtpEncoder struct {
IRtpEncoder
// contains filtered or unexported fields
}
func NewH264RtpEncoder ¶
func NewH264RtpEncoder(codec []byte) *H264RtpEncoder
func (*H264RtpEncoder) UpdateVideoCodec ¶ added in v0.3.6
func (enc *H264RtpEncoder) UpdateVideoCodec(_ []byte, sps, pps []byte)
type H265RtpDecoder ¶ added in v0.3.3
type H265RtpDecoder struct {
IRtpDecoder
// contains filtered or unexported fields
}
func NewH265RtpDecoder ¶ added in v0.3.3
func NewH265RtpDecoder(f format.Format) *H265RtpDecoder
type HevcRtpEncoder ¶ added in v0.3.4
type HevcRtpEncoder struct {
IRtpEncoder
// contains filtered or unexported fields
}
func NewHevcRtpEncoder ¶ added in v0.3.4
func NewHevcRtpEncoder(codec []byte) *HevcRtpEncoder
func (*HevcRtpEncoder) UpdateVideoCodec ¶ added in v0.3.6
func (enc *HevcRtpEncoder) UpdateVideoCodec(vps, sps, pps []byte)
type OpusRtpDecoder ¶
type OpusRtpDecoder struct {
IRtpDecoder
// contains filtered or unexported fields
}
func NewOpusRtpDecoder ¶
func NewOpusRtpDecoder(f format.Format) *OpusRtpDecoder
type OpusRtpEncoder ¶
type OpusRtpEncoder struct {
IRtpEncoder
// contains filtered or unexported fields
}
func NewOpusRtpEncoder ¶
func NewOpusRtpEncoder(pt uint8) *OpusRtpEncoder
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
func (*Packer) UpdateVideoCodec ¶ added in v0.3.6
type RtcServer ¶
type RtcServer struct {
// contains filtered or unexported fields
}
func NewRtcServer ¶
func (*RtcServer) HandleJessibuca ¶
func (*RtcServer) HandleWHEP ¶
func (*RtcServer) HandleWHIP ¶
func (*RtcServer) HandleZlmWebrtcPlay ¶ added in v0.3.6
HandleZlmWebrtcPlay ZLM 兼容 WebRTC 播放,返回 SDP answer 为什么独立方法:ZLM 信令格式为 JSON {"code":0,"sdp":"..."},与 WHEP 纯 SDP 不同
func (*RtcServer) SetStreamNotFoundFn ¶ added in v0.3.6
func (s *RtcServer) SetStreamNotFoundFn(fn StreamNotFoundFn)
SetStreamNotFoundFn 注入流不存在回调
type StreamNotFoundFn ¶ added in v0.3.6
type StreamNotFoundFn func(app, stream, schema string)
StreamNotFoundFn 流不存在时的回调,触发 on_stream_not_found 通知上层拉流
Click to show internal directories.
Click to hide internal directories.