Documentation ¶
Index ¶
Constants ¶
View Source
const ( // spec-rtmp_specification_1.0.pdf // 7.1. Types of Messages RTMPTypeIDAudio uint8 = 8 RTMPTypeIDVideo uint8 = 9 RTMPTypeIDMetadata uint8 = 18 // RTMPTypeIDDataMessageAMF0 RTMPTypeIDSetChunkSize uint8 = 1 RTMPTypeIDAck uint8 = 3 RTMPTypeIDUserControl uint8 = 4 RTMPTypeIDWinAckSize uint8 = 5 RTMPTypeIDBandwidth uint8 = 6 RTMPTypeIDCommandMessageAMF3 uint8 = 17 RTMPTypeIDCommandMessageAMF0 uint8 = 20 // user control message type RTMPUserControlStreamBegin uint8 = 0 RTMPUserControlRecorded uint8 = 4 // spec-video_file_format_spec_v10.pdf // Video tags // VIDEODATA // FrameType UB[4] // CodecID UB[4] // AVCVIDEOPACKET // AVCPacketType UI8 // CompositionTime SI24 // Data UI8[n] RTMPFrameTypeKey uint8 = 1 RTMPFrameTypeInter uint8 = 2 RTMPCodecIDAVC uint8 = 7 RTMPCodecIDHEVC uint8 = 12 RTMPAVCPacketTypeSeqHeader uint8 = 0 RTMPAVCPacketTypeNALU uint8 = 1 RTMPHEVCPacketTypeSeqHeader = RTMPAVCPacketTypeSeqHeader RTMPHEVCPacketTypeNALU = RTMPAVCPacketTypeNALU RTMPAVCKeyFrame = RTMPFrameTypeKey<<4 | RTMPCodecIDAVC RTMPHEVCKeyFrame = RTMPFrameTypeKey<<4 | RTMPCodecIDHEVC RTMPAVCInterFrame = RTMPFrameTypeInter<<4 | RTMPCodecIDAVC RTMPHEVCInterFrame = RTMPFrameTypeInter<<4 | RTMPCodecIDHEVC // spec-video_file_format_spec_v10.pdf // Audio tags // AUDIODATA // SoundFormat UB[4] // SoundRate UB[2] // SoundSize UB[1] // SoundType UB[1] // AACAUDIODATA // AACPacketType UI8 // Data UI8[n] RTMPSoundFormatAAC uint8 = 10 RTMPAACPacketTypeSeqHeader = 0 RTMPAACPacketTypeRaw = 1 )
View Source
const ( // 注意,AVC和HEVC都可能使用96,所以不能直接通过96判断是AVC还是HEVC RTPPacketTypeAVCOrHEVC = 96 RTPPacketTypeAAC = 97 )
View Source
const ( // StatGroup.AudioCodec AudioCodecAAC = "AAC" // StatGroup.VideoCodec VideoCodecAVC = "H264" VideoCodecHEVC = "H265" // StatSession.Protocol ProtocolRTMP = "RTMP" ProtocolRTSP = "RTSP" ProtocolHTTPFLV = "HTTP-FLV" ProtocolHTTPTS = "HTTP-TS" )
Variables ¶
View Source
var ( LALLibraryName = "lal" LALGitHubRepo = "github.com/q191201771/lal" // e.g. lal v0.12.3 (github.com/q191201771/lal) LALFullInfo = LALLibraryName + " " + LALVersion + " (" + LALGitHubRepo + ")" // e.g. 0.12.3 LALVersionDot string // e.g. 0,12,3 LALVersionComma string )
View Source
var ( // 植入rtmp握手随机字符串中 // e.g. lal v0.12.3 (github.com/q191201771/lal) LALRTMPHandshakeWaterMark string // 植入rtmp server中的connect result信令中 // 注意,有两个object,第一个object中的fmsVer我们保持通用公认的值,在第二个object中植入 // e.g. 0,12,3 LALRTMPConnectResultVersion string // e.g. lal0.12.3 LALRTMPPushSessionConnectVersion string // e.g. lal0.12.3 LALRTMPBuildMetadataEncoder string // e.g. lal/0.12.3 LALHTTPFLVPullSessionUA string // e.g. lal0.12.3 LALHTTPFLVSubSessionServer string // e.g. lal0.12.3 LALHLSM3U8Server string // e.g. lal0.12.3 LALHLSTSServer string // e.g. lal0.12.3 LALRTSPOptionsResponseServer string // e.g. lal0.12.3 LALHTTPTSSubSessionServer string // e.g. lal0.12.3 LALHTTPAPIServer string )
View Source
var LALVersion = "v0.15.1"
版本,该变量由build脚本修改维护
Functions ¶
This section is empty.
Types ¶
type AVPacket ¶
type AVPacket struct { Timestamp uint32 PayloadType AVPacketPT Payload []byte }
目前供package rtsp使用。以后可能被多个package使用。 不排除不同package使用时,字段含义也不同的情况出现。 使用AVPacket的地方,应注明各字段的含义。
type AVPacketPT ¶ added in v0.16.0
type AVPacketPT int
var ( AVPacketPTAVC AVPacketPT = RTPPacketTypeAVCOrHEVC AVPacketPTAAC AVPacketPT = RTPPacketTypeAAC AVPacketPTHEVC AVPacketPT = 98 )
type RTMPHeader ¶
type RTMPMsg ¶
type RTMPMsg struct { Header RTMPHeader Payload []byte // 不包含 rtmp 头 }
func (RTMPMsg) IsAACSeqHeader ¶
func (RTMPMsg) IsAVCKeyNALU ¶
func (RTMPMsg) IsAVCKeySeqHeader ¶
func (RTMPMsg) IsHEVCKeyNALU ¶
func (RTMPMsg) IsHEVCKeySeqHeader ¶
func (RTMPMsg) IsVideoKeyNALU ¶
func (RTMPMsg) IsVideoKeySeqHeader ¶
type StatPub ¶ added in v0.16.0
type StatPub struct {
StatSession
}
func StatSession2Pub ¶ added in v0.16.0
func StatSession2Pub(ss StatSession) (ret StatPub)
type StatSession ¶ added in v0.16.0
type StatSub ¶ added in v0.16.0
type StatSub struct {
StatSession
}
func StatSession2Sub ¶ added in v0.16.0
func StatSession2Sub(ss StatSession) (ret StatSub)
Click to show internal directories.
Click to hide internal directories.