Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SoundFormat LPCM_PE SoundFormat = 0 // 线性PCM,平台字节序 ADPCM SoundFormat = 1 MP3 SoundFormat = 2 LPCM_LE SoundFormat = 3 // 线性PCM,小端字节序 AAC SoundFormat = 10 Speex SoundFormat = 11 MP3_8kHz SoundFormat = 14 // MP3 8千赫兹 // SoundRate Rate5kHz SoundRate = 0 // 5.5千赫兹 Rate11kHz SoundRate = 1 // 11千赫兹 Rate22kHz SoundRate = 2 // 22千赫兹 Rate44kHz SoundRate = 3 // 44千赫兹 // SoundSize Sample8 uint8 = 0 // 8位样本 Sample16 uint8 = 1 // 16位样本 // SoundType Mono SoundType = 0 // 单声道音频 Stereo SoundType = 1 // 立体声音频 // AACPacketType AACSeqHeader AACPacketType = 0 AACRaw AACPacketType = 1 )
View Source
const ( // 帧类型 KeyFrame FrameType = 1 // AVC中的关键帧,可寻址帧 InterFrame FrameType = 2 // AVC中的非关键帧,不可寻址帧 DisposableInterFrame FrameType = 3 // 仅用于H.263 GeneratedKeyFrame FrameType = 4 // 仅服务器使用 VideoInfoFrame FrameType = 5 // 视频信息/命令帧 // 编码标识 H263Code CodeID = 2 // Sorenson H.263 ScreenVideoCode CodeID = 3 // 屏幕视频 VP6Code CodeID = 4 // On2 VP6 VP6AlphaCode CodeID = 5 // 带Alpha通道的On2 VP6 ScreenVideoV2Code CodeID = 6 // 屏幕视频版本2 AVCCode CodeID = 7 // AVC // AVC包类型 AVCSeqHeader AVCPacketType = 0 // AVC序列头 AVCNALU AVCPacketType = 1 // NAL单元 AVCEndSeq AVCPacketType = 2 // AVC序列结束(不需要或不支持较低级别的NALU序列结束) )
View Source
const (
Name = "native"
)
Variables ¶
View Source
var ( ErrNotFlvStream = errors.New("非FLV流") ErrUnknownTag = errors.New("未知标签") )
Functions ¶
This section is empty.
Types ¶
type AACPacketType ¶
type AACPacketType uint8
type AVCPacketType ¶
type AVCPacketType uint8
type AudioTagHeader ¶
type AudioTagHeader struct { SoundFormat SoundFormat SoundRate SoundRate SoundSize SoundSize SoundType SoundType AACPacketType AACPacketType }
type Parser ¶
type Parser struct { Metadata Metadata // contains filtered or unexported fields }
func (*Parser) ParseLiveStream ¶
func (p *Parser) ParseLiveStream(ctx context.Context, url *url.URL, live live.Live, file string) error
ParseLiveStream 解析直播流
func (*Parser) PushLiveStream ¶
type SoundFormat ¶
type SoundFormat uint8
type VideoTagHeader ¶
type VideoTagHeader struct { FrameType FrameType CodeID CodeID AVCPacketType AVCPacketType CompositionTime uint32 }
Click to show internal directories.
Click to hide internal directories.