Documentation ¶
Index ¶
- Variables
- func FlvTag2RtmpChunks(tag httpflv.Tag) []byte
- func FlvTag2RtmpMsg(tag httpflv.Tag) (msg base.RtmpMsg)
- func FlvTagHeader2RtmpHeader(in httpflv.TagHeader) (out base.RtmpHeader)
- func MakeDefaultRtmpHeader(in base.RtmpHeader) (out base.RtmpHeader)
- func RtmpMsg2FlvTag(msg base.RtmpMsg) *httpflv.Tag
- type AvPacket2RtmpRemuxer
- func (r *AvPacket2RtmpRemuxer) FeedAvPacket(pkt base.AvPacket)
- func (r *AvPacket2RtmpRemuxer) InitWithAvConfig(asc, vps, sps, pps []byte)
- func (r *AvPacket2RtmpRemuxer) OnAvPacket(pkt base.AvPacket)
- func (r *AvPacket2RtmpRemuxer) OnRtpPacket(pkt rtprtcp.RtpPacket)
- func (r *AvPacket2RtmpRemuxer) OnSdp(sdpCtx sdp.LogicContext)
- type OnRtpPacket
- type OnSdp
- type Rtmp2RtspRemuxer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRemux = errors.New("lal.remux: fxxk")
Functions ¶
func FlvTag2RtmpChunks ¶ added in v0.24.1
@return 返回的内存块为内部新申请
func FlvTag2RtmpMsg ¶ added in v0.24.1
@return msg: 返回的内存块引用参数`tag`的内存块
func FlvTagHeader2RtmpHeader ¶ added in v0.24.1
func FlvTagHeader2RtmpHeader(in httpflv.TagHeader) (out base.RtmpHeader)
func MakeDefaultRtmpHeader ¶ added in v0.24.1
func MakeDefaultRtmpHeader(in base.RtmpHeader) (out base.RtmpHeader)
Types ¶
type AvPacket2RtmpRemuxer ¶ added in v0.24.1
type AvPacket2RtmpRemuxer struct {
// contains filtered or unexported fields
}
AvPacket转换为RTMP 目前AvPacket来自RTSP的sdp以及rtp的合帧包。理论上也支持webrtc,后续接入webrtc时再验证
func NewAvPacket2RtmpRemuxer ¶ added in v0.24.1
func NewAvPacket2RtmpRemuxer(onRtmpAvMsg rtmp.OnReadRtmpAvMsg) *AvPacket2RtmpRemuxer
func (*AvPacket2RtmpRemuxer) FeedAvPacket ¶ added in v0.24.1
func (r *AvPacket2RtmpRemuxer) FeedAvPacket(pkt base.AvPacket)
@param pkt: 内部不持有该内存块
func (*AvPacket2RtmpRemuxer) InitWithAvConfig ¶ added in v0.24.1
func (r *AvPacket2RtmpRemuxer) InitWithAvConfig(asc, vps, sps, pps []byte)
rtsp场景下,有时sps、pps等信息只包含在sdp中,有时包含在rtp包中, 这里提供输入sdp的sps、pps等信息的机会,如果没有,可以不调用
内部不持有输入参数的内存块
func (*AvPacket2RtmpRemuxer) OnAvPacket ¶ added in v0.24.1
func (r *AvPacket2RtmpRemuxer) OnAvPacket(pkt base.AvPacket)
func (*AvPacket2RtmpRemuxer) OnRtpPacket ¶ added in v0.24.1
func (r *AvPacket2RtmpRemuxer) OnRtpPacket(pkt rtprtcp.RtpPacket)
实现RTSP回调数据的三个接口,使得接入时方便些
func (*AvPacket2RtmpRemuxer) OnSdp ¶ added in v0.24.1
func (r *AvPacket2RtmpRemuxer) OnSdp(sdpCtx sdp.LogicContext)
type OnRtpPacket ¶ added in v0.24.1
type OnSdp ¶ added in v0.24.1
type OnSdp func(sdpCtx sdp.LogicContext)
type Rtmp2RtspRemuxer ¶ added in v0.24.1
type Rtmp2RtspRemuxer struct {
// contains filtered or unexported fields
}
提供rtmp数据向sdp+rtp数据的转换
func NewRtmp2RtspRemuxer ¶ added in v0.24.1
func NewRtmp2RtspRemuxer(onSdp OnSdp, onRtpPacket OnRtpPacket) *Rtmp2RtspRemuxer
@param onSdp: 每次回调为独立的内存块,回调结束后,内部不再使用该内存块 @param onRtpPacket: 每次回调为独立的内存块,回调结束后,内部不再使用该内存块
func (*Rtmp2RtspRemuxer) FeedRtmpMsg ¶ added in v0.24.1
func (r *Rtmp2RtspRemuxer) FeedRtmpMsg(msg base.RtmpMsg)
@param msg: 函数调用结束后,内部不持有`msg`内存块
Click to show internal directories.
Click to hide internal directories.