Documentation ¶
Index ¶
- Constants
- func IsValidAACPacketType(aacPacketType AACPacketType) error
- func IsValidCodecID(codecID uint8) error
- func IsValidFlvTagType(tagType FlvTagType) error
- func IsValidFrameType(frameType uint8) error
- func IsValidSamplingRate(rate uint8) error
- func IsValidSoundFormat(format uint8) error
- func IsValidSoundSize(size uint8) error
- func IsValidSoundType(soundType uint8) error
- type AACPacketType
- type AVCPacketType
- type CodecID
- type Flv
- type FlvAACAudioData
- type FlvAudioTag
- type FlvAvcVideoPacket
- type FlvBody
- type FlvDataTag
- type FlvHeader
- type FlvScriptDataDate
- type FlvScriptDataLongString
- type FlvScriptDataObject
- type FlvScriptDataString
- type FlvScriptDataValue
- type FlvScriptDataVariable
- type FlvScriptDataVariableEnd
- type FlvTag
- type FlvTagType
- type FlvVideoTag
- type FrameType
- type SamplingRate
- type SoundFormat
- type SoundSize
- type SoundType
- type TagnSize
Constants ¶
View Source
const ( ASCII_F = 0x46 ASCII_L = 0x4C ASCII_V = 0x56 V1 = 0x01 )
View Source
const (
OBJECTENDMET = "SCRIPTDATAOBJECTEND"
)
View Source
const (
SCRIPTDATAOBJECTEND uint8 = 0x09
)
Variables ¶
This section is empty.
Functions ¶
func IsValidAACPacketType ¶
func IsValidAACPacketType(aacPacketType AACPacketType) error
func IsValidCodecID ¶
func IsValidFlvTagType ¶
func IsValidFlvTagType(tagType FlvTagType) error
func IsValidFrameType ¶
func IsValidSamplingRate ¶
func IsValidSoundFormat ¶
func IsValidSoundSize ¶
func IsValidSoundType ¶
Types ¶
type AACPacketType ¶
type AACPacketType uint8
const ( AAC_SequenceHeader AACPacketType = iota AAC_Raw )
type AVCPacketType ¶
type AVCPacketType uint8
const ( AVC_SequenceHeader AVCPacketType = iota AVC_NALU AVC_EndOfSequence )
type FlvAACAudioData ¶
type FlvAACAudioData struct { AACPacketType AACPacketType Data []byte }
func (*FlvAACAudioData) Parse ¶
func (aacdata *FlvAACAudioData) Parse(data []byte) error
type FlvAudioTag ¶
type FlvAudioTag struct { Format SoundFormat Rate SamplingRate Size SoundSize Type SoundType Data []byte }
func (*FlvAudioTag) Parse ¶
func (audioTag *FlvAudioTag) Parse(data []byte) error
type FlvAvcVideoPacket ¶
type FlvAvcVideoPacket struct { AVCPacketType AVCPacketType CompositionTime int32 Data []byte }
func (*FlvAvcVideoPacket) Parse ¶
func (avp *FlvAvcVideoPacket) Parse(data []byte) error
type FlvBody ¶
type FlvBody struct {
Tag []TagnSize
}
func EmptyFlvBody ¶
func EmptyFlvBody() *FlvBody
type FlvDataTag ¶
type FlvDataTag struct { Objects []FlvScriptDataObject End uint32 }
type FlvHeader ¶
func EmptyFlvHeader ¶
func EmptyFlvHeader() *FlvHeader
type FlvScriptDataDate ¶
type FlvScriptDataLongString ¶
type FlvScriptDataObject ¶
type FlvScriptDataObject struct { ObjectName FlvScriptDataString ObjectData FlvScriptDataValue }
type FlvScriptDataString ¶
type FlvScriptDataValue ¶
type FlvScriptDataVariable ¶
type FlvScriptDataVariable struct { VariableName FlvScriptDataString VariableData FlvScriptDataValue }
type FlvScriptDataVariableEnd ¶
type FlvScriptDataVariableEnd struct { // Always 9 VariableEndMarker1 uint32 }
type FlvTag ¶
type FlvTag struct { TagType FlvTagType DataSize uint32 TimeStamp uint32 StreamID uint32 // Keep as-is, as it's not consumed by the parser Data []byte }
func (*FlvTag) TryIntoAudio ¶
func (tag *FlvTag) TryIntoAudio(audioTag *FlvAudioTag) error
func (*FlvTag) TryIntoVideo ¶
func (tag *FlvTag) TryIntoVideo(videoTag *FlvVideoTag) error
type FlvTagType ¶
type FlvTagType uint8
const ( AUDIO FlvTagType = 8 VIDEO FlvTagType = 9 SCRIPTDATA FlvTagType = 18 OTHER FlvTagType = 0 )
type FlvVideoTag ¶
func (*FlvVideoTag) Parse ¶
func (videoTag *FlvVideoTag) Parse(data []byte) error
type SamplingRate ¶
type SamplingRate uint8
const ( // Sampling rate. For AAC, it's always 3 KHZ5P5 SamplingRate = iota KHZ11 KHZ22 KHZ44 )
type SoundFormat ¶
type SoundFormat uint8
const ( // 7, 8, 14, 15 are reserved for internal use LinearPCMPlatformEndian SoundFormat = iota ADPCM MP3 LinearPCMLittleEndian Nellymoser16KHzMono Nellymoser8KHzMono Nellymoser G711ALawLogarithmicPCM G711MuLawLogarithmicPCM Reserved AAC Speex MP38KHz DeviceSpecificSound )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.