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 BytesPerDuration(codec *core.Codec, duration time.Duration) int
- func BytesPerFrame(codec *core.Codec) int
- func BytesPerSample(codec *core.Codec) int
- func ConsumerCodecs() []*core.Codec
- func Downsample(k float32) func([]int16) []int16
- func FLACEncoder(codecName string, clockRate uint32, handler core.HandlerFunc) core.HandlerFunc
- func FLACHeader(magic bool, sampleRate uint32) []byte
- func FlipEndian(src []byte) (dst []byte)
- func FramesPerDuration(codec *core.Codec, duration time.Duration) int
- func LittleToBig(handler core.HandlerFunc) core.HandlerFunc
- func NewBackchannel(cmd *shell.Command, audio string) (core.Producer, error)
- func PCMAtoPCM(alaw byte) int16
- func PCMUtoPCM(ulaw byte) int16
- func PCMtoPCMA(pcm int16) byte
- func PCMtoPCMU(pcm int16) byte
- func ProducerCodecs() []*core.Codec
- func RepackG711(zeroTS bool, handler core.HandlerFunc) core.HandlerFunc
- func Transcode(dst, src *core.Codec) func([]byte) []byte
- func TranscodeHandler(dst, src *core.Codec, handler core.HandlerFunc) core.HandlerFunc
- func Upsample(k float32) func([]int16) []int16
- type Backchannel
- type Producer
- type ProducerSync
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesPerDuration ¶ added in v1.9.10
func BytesPerFrame ¶ added in v1.9.10
func BytesPerSample ¶ added in v1.9.10
func ConsumerCodecs ¶ added in v1.9.10
func Downsample ¶ added in v1.9.10
func FLACEncoder ¶
func FLACEncoder(codecName string, clockRate uint32, handler core.HandlerFunc) core.HandlerFunc
func FLACHeader ¶
func FlipEndian ¶ added in v1.9.10
func FramesPerDuration ¶ added in v1.9.10
func LittleToBig ¶ added in v1.6.1
func LittleToBig(handler core.HandlerFunc) core.HandlerFunc
LittleToBig - convert PCM little endian to PCM big endian
func NewBackchannel ¶ added in v1.9.10
func ProducerCodecs ¶ added in v1.9.10
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 TranscodeHandler ¶ added in v1.9.10
func TranscodeHandler(dst, src *core.Codec, handler core.HandlerFunc) core.HandlerFunc
Types ¶
type Backchannel ¶ added in v1.9.10
type Backchannel struct {
core.Connection
// contains filtered or unexported fields
}
func (*Backchannel) Start ¶ added in v1.9.10
func (c *Backchannel) Start() error
type Producer ¶ added in v1.9.8
type Producer struct {
core.Connection
// contains filtered or unexported fields
}
type ProducerSync ¶ added in v1.9.10
type ProducerSync struct {
core.Connection
// contains filtered or unexported fields
}
func (*ProducerSync) OnClose ¶ added in v1.9.10
func (p *ProducerSync) OnClose(f func())
func (*ProducerSync) Start ¶ added in v1.9.10
func (p *ProducerSync) Start() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.