Documentation ¶
Overview ¶
Package pcm - support raw (verbatim) PCM 16 bit in the FLAC container: - only 1 channel - only 16 bit per sample - only 8000, 16000, 24000, 48000 sample rate
Package pcm https://www.codeproject.com/Articles/14237/Using-the-G711-standard
Package pcm https://www.codeproject.com/Articles/14237/Using-the-G711-standard
Index ¶
- func DownsampleByte(toPCM func(byte) int16, fromPCM func(int16) byte, n float32, ...) core.HandlerFunc
- func DownsamplePCM(fromPCM func(int16) byte, n float32, handler core.HandlerFunc) core.HandlerFunc
- func FLACEncoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
- func FLACHeader(magic bool, sampleRate uint32) []byte
- func PCMAtoPCM(alaw byte) int16
- func PCMUtoPCM(ulaw byte) int16
- func PCMtoPCMA(pcm int16) byte
- func PCMtoPCMU(pcm int16) byte
- func RepackG711(zeroTS bool, handler core.HandlerFunc) core.HandlerFunc
- func Resample(codec *core.Codec, sampleRate uint32, handler core.HandlerFunc) core.HandlerFunc
- func ResamplePCM(fromPCM func(int16) byte, handler core.HandlerFunc) core.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownsampleByte ¶
func DownsampleByte( toPCM func(byte) int16, fromPCM func(int16) byte, n float32, handler core.HandlerFunc, ) core.HandlerFunc
func DownsamplePCM ¶
func DownsamplePCM(fromPCM func(int16) byte, n float32, handler core.HandlerFunc) core.HandlerFunc
func FLACEncoder ¶
func FLACEncoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
func FLACHeader ¶
func RepackG711 ¶ added in v1.6.0
func RepackG711(zeroTS bool, handler core.HandlerFunc) core.HandlerFunc
RepackG711 - Repack G.711 PCMA/PCMU into frames of size 1024
- Fixes WebRTC audio quality issue (monotonic timestamp)
- Fixes Reolink Doorbell backchannel issue (zero timestamp) https://github.com/AlexxIT/go2rtc/issues/331
func Resample ¶
func Resample(codec *core.Codec, sampleRate uint32, handler core.HandlerFunc) core.HandlerFunc
func ResamplePCM ¶
func ResamplePCM(fromPCM func(int16) byte, handler core.HandlerFunc) core.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.