remux

package
v0.24.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRemux = errors.New("lal.remux: fxxk")

Functions

func FlvTag2RtmpChunks added in v0.24.1

func FlvTag2RtmpChunks(tag httpflv.Tag) []byte

@return 返回的内存块为内部新申请

func FlvTag2RtmpMsg added in v0.24.1

func FlvTag2RtmpMsg(tag httpflv.Tag) (msg base.RtmpMsg)

@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)

func RtmpMsg2FlvTag added in v0.24.1

func RtmpMsg2FlvTag(msg base.RtmpMsg) *httpflv.Tag

@return 返回的内存块为新申请的独立内存块

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 OnRtpPacket func(pkt rtprtcp.RtpPacket)

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`内存块

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL