Documentation
¶
Index ¶
- Constants
- Variables
- func AACSampleIdxToSample(idx int) int
- func CalcCrc32(crc uint32, buffer []byte) uint32
- func CodecString(codecid CodecID) string
- func ConvertAnnexBToAVCC(annexb []byte) []byte
- func CovertAVCCToAnnexB(avcc []byte)
- func CovertExtradata(extraData []byte) ([][]byte, [][]byte)
- func CovertRbspToSodb(rbsp []byte) []byte
- func CreateH264AVCCExtradata(spss [][]byte, ppss [][]byte) ([]byte, error)
- func FindSyncword(aac []byte, offset int) int
- func GetH264FirstMbInSlice(nalu []byte) uint64
- func GetH264Resolution(sps []byte) (width uint32, height uint32)
- func GetH265FirstMbInSlice(nalu []byte) uint64
- func GetH265PPSId(pps []byte) uint64
- func GetH265PPSIdWithStartCode(pps []byte) uint64
- func GetH265Resolution(sps []byte) (width uint32, height uint32)
- func GetH265SPSId(sps []byte) uint64
- func GetH265SPSIdWithStartCode(sps []byte) uint64
- func GetPPSId(pps []byte) uint64
- func GetPPSIdWithStartCode(pps []byte) uint64
- func GetSPSId(sps []byte) uint64
- func GetSPSIdWithStartCode(sps []byte) uint64
- func GetVPSId(vps []byte) uint8
- func GetVPSIdWithStartCode(vps []byte) uint8
- func IsH264IDRFrame(h264 []byte) bool
- func IsH264VCLNaluType(nal_type H264_NAL_TYPE) bool
- func IsH265IDRFrame(h265 []byte) bool
- func IsH265VCLNaluType(nal_type H265_NAL_TYPE) bool
- func Max(x, y int) int
- func Min(x, y int) int
- func OpusPacketDuration(packet []byte) uint64
- func SampleToAACSampleIndex(sampling int) int
- func ShowPacketHexdump(data []byte)
- func SplitAACFrame(frames []byte, onFrame func(aac []byte))
- func SplitFrame(frames []byte, onFrame func(nalu []byte) bool)
- func SplitFrameWithStartCode(frames []byte, onFrame func(nalu []byte) bool)
- func SplitMp3Frames(data []byte, onFrame func(head *MP3FrameHead, frame []byte)) error
- func WriteDefaultOpusExtraData() []byte
- type AAC_PROFILE
- type AAC_SAMPLING_FREQUENCY
- type ADTS_Fix_Header
- type ADTS_Frame_Header
- type ADTS_Variable_Header
- type AudioSpecificConfiguration
- type BitStream
- func (bs *BitStream) Bits() []byte
- func (bs *BitStream) ByteOffset() int
- func (bs *BitStream) DistanceFromMarkDot() int
- func (bs *BitStream) EOS() bool
- func (bs *BitStream) GetBit() uint8
- func (bs *BitStream) GetBits(n int) uint64
- func (bs *BitStream) GetBytes(n int) []byte
- func (bs *BitStream) Markdot()
- func (bs *BitStream) NextBits(n int) uint64
- func (bs *BitStream) ReadSE() int64
- func (bs *BitStream) ReadUE() uint64
- func (bs *BitStream) RemainBits() int
- func (bs *BitStream) RemainBytes() int
- func (bs *BitStream) RemainData() []byte
- func (bs *BitStream) SkipBits(n int)
- func (bs *BitStream) Uint8(n int) uint8
- func (bs *BitStream) Uint16(n int) uint16
- func (bs *BitStream) Uint32(n int) uint32
- func (bs *BitStream) UnRead(n int)
- type BitStreamWriter
- func (bsw *BitStreamWriter) BitOffset() int
- func (bsw *BitStreamWriter) Bits() []byte
- func (bsw *BitStreamWriter) ByteOffset() int
- func (bsw *BitStreamWriter) DistanceFromMarkDot() int
- func (bsw *BitStreamWriter) FillRemainData(v byte)
- func (bsw *BitStreamWriter) Markdot()
- func (bsw *BitStreamWriter) PutByte(v byte)
- func (bsw *BitStreamWriter) PutBytes(v []byte)
- func (bsw *BitStreamWriter) PutRepetValue(v byte, n int)
- func (bsw *BitStreamWriter) PutUint8(v uint8, n int)
- func (bsw *BitStreamWriter) PutUint16(v uint16, n int)
- func (bsw *BitStreamWriter) PutUint32(v uint32, n int)
- func (bsw *BitStreamWriter) PutUint64(v uint64, n int)
- func (bsw *BitStreamWriter) Reset()
- func (bsw *BitStreamWriter) SetByte(v byte, where int)
- func (bsw *BitStreamWriter) SetUint16(v uint16, where int)
- type ChannelMap
- type ChannelOrder
- type CodecID
- type H264NaluHdr
- type H264_NAL_TYPE
- type H265NaluHdr
- type H265RawPPS
- type H265RawSPS
- type H265_NAL_TYPE
- type HEVCRecordConfiguration
- func (hvcc *HEVCRecordConfiguration) Decode(hevc []byte)
- func (hvcc *HEVCRecordConfiguration) Encode() ([]byte, error)
- func (hvcc *HEVCRecordConfiguration) ToNalus() (nalus []byte)
- func (hvcc *HEVCRecordConfiguration) UpdatePPS(pps []byte)
- func (hvcc *HEVCRecordConfiguration) UpdateSPS(sps []byte)
- func (hvcc *HEVCRecordConfiguration) UpdateVPS(vps []byte)
- type HVCCNALUnitArray
- type ID3V2
- type MP3FrameHead
- type NalUnit
- type OpusContext
- type OpusPacket
- type PPS
- type ProfileTierLevel
- type SEI
- type SEIReaderWriter
- type SPS
- type START_CODE_TYPE
- type SliceHeader
- type UserDataUnregistered
- type VPS
- type VPSTimeInfo
- type VUI_Parameters
Constants ¶
View Source
const ( VERSION_RESERVED = 0 VERSION_MPEG_1 = 1 VERSION_MPEG_2 = 2 VERSION_MPEG_2_5 = 3 )
View Source
const ( LAYER_RESERVED = 0 LAYER_1 = 1 LAYER_2 = 2 LAYER_3 = 3 )
View Source
const ( LEFT_CHANNEL = 0 RIGHT_CHANNEL = 1 )
Variables ¶
View Source
var ( /// 10ms,20ms,40ms,60ms, samplerate 48000 // sample num per millisecond // 48000 / 1000ms * 10 = 480 ... SLKOpusSampleSize [4]int = [4]int{480, 960, 1920, 2880} HybridOpusSampleSize [4]int = [4]int{480, 960} CELTOpusSampleSize [4]int = [4]int{120, 210, 480, 960} )
View Source
var AAC_Sampling_Idx [13]int = [13]int{96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350}
View Source
var BitMask [8]byte = [8]byte{0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF}
View Source
var BitRateTable [2][3][16]int = [2][3][16]int{
{
{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1},
{0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 380, -1},
{0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1},
},
{
{0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1},
{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1},
{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1},
},
}
ffmpeg mpegaudiotabs.h ff_mpa_bitrate_tab
View Source
var SampleRateTable [3][4]int = [3][4]int{
{44100, 48000, 32000, 0},
{22050, 24000, 16000, 0},
{11025, 12000, 8000, 0},
}