Documentation
¶
Index ¶
- func DecodeOpusAudio(data []byte, sampleRate int, numChannels int) (*model.AudioFrame, error)
- type AudioStreamDecoder
- func NewAACAudioStreamDecoder() AudioStreamDecoder
- func NewFFmpegAudioStreamDecoder(inputFormat string, sampleRate int, numChannels int) AudioStreamDecoder
- func NewFLACAudioStreamDecoder() AudioStreamDecoder
- func NewMP3AudioStreamDecoder() AudioStreamDecoder
- func NewOpusAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
- func NewPCMAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
- type DecoderType
- type FFmpegAudioStreamDecoder
- type MP3AudioStreamDecoder
- type OpusAudioStreamDecoder
- type PCMAudioStreamDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeOpusAudio ¶ added in v0.1.2
Types ¶
type AudioStreamDecoder ¶
type AudioStreamDecoder interface {
Push(data []byte)
EndInput()
Next() (*model.AudioFrame, error)
Close() error
}
AudioStreamDecoder is a generic interface for decoding compressed audio formats (like MP3, WAV, FLAC) into raw PCM AudioFrames suitable for LiveKit WebRTC output.
func NewAACAudioStreamDecoder ¶ added in v0.1.3
func NewAACAudioStreamDecoder() AudioStreamDecoder
func NewFFmpegAudioStreamDecoder ¶ added in v0.1.3
func NewFFmpegAudioStreamDecoder(inputFormat string, sampleRate int, numChannels int) AudioStreamDecoder
func NewFLACAudioStreamDecoder ¶ added in v0.1.3
func NewFLACAudioStreamDecoder() AudioStreamDecoder
func NewMP3AudioStreamDecoder ¶
func NewMP3AudioStreamDecoder() AudioStreamDecoder
func NewOpusAudioStreamDecoder ¶ added in v0.1.2
func NewOpusAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
func NewPCMAudioStreamDecoder ¶
func NewPCMAudioStreamDecoder(sampleRate int, numChannels int) AudioStreamDecoder
type DecoderType ¶
type DecoderType string
const ( DecoderTypePCM DecoderType = "pcm" DecoderTypeMP3 DecoderType = "mp3" DecoderTypeOpus DecoderType = "opus" )
type FFmpegAudioStreamDecoder ¶ added in v0.1.3
type FFmpegAudioStreamDecoder struct {
// contains filtered or unexported fields
}
func (*FFmpegAudioStreamDecoder) Close ¶ added in v0.1.3
func (d *FFmpegAudioStreamDecoder) Close() error
func (*FFmpegAudioStreamDecoder) EndInput ¶ added in v0.1.3
func (d *FFmpegAudioStreamDecoder) EndInput()
func (*FFmpegAudioStreamDecoder) Next ¶ added in v0.1.3
func (d *FFmpegAudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*FFmpegAudioStreamDecoder) Push ¶ added in v0.1.3
func (d *FFmpegAudioStreamDecoder) Push(data []byte)
type MP3AudioStreamDecoder ¶
type MP3AudioStreamDecoder struct {
// contains filtered or unexported fields
}
func (*MP3AudioStreamDecoder) Close ¶
func (d *MP3AudioStreamDecoder) Close() error
func (*MP3AudioStreamDecoder) EndInput ¶
func (d *MP3AudioStreamDecoder) EndInput()
func (*MP3AudioStreamDecoder) Next ¶
func (d *MP3AudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*MP3AudioStreamDecoder) Push ¶
func (d *MP3AudioStreamDecoder) Push(data []byte)
type OpusAudioStreamDecoder ¶ added in v0.1.2
type OpusAudioStreamDecoder struct {
// contains filtered or unexported fields
}
func (*OpusAudioStreamDecoder) Close ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) Close() error
func (*OpusAudioStreamDecoder) EndInput ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) EndInput()
func (*OpusAudioStreamDecoder) Next ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*OpusAudioStreamDecoder) Push ¶ added in v0.1.2
func (d *OpusAudioStreamDecoder) Push(data []byte)
type PCMAudioStreamDecoder ¶
type PCMAudioStreamDecoder struct {
// contains filtered or unexported fields
}
PCMAudioStreamDecoder implements AudioStreamDecoder for raw PCM streams
func (*PCMAudioStreamDecoder) Close ¶
func (d *PCMAudioStreamDecoder) Close() error
func (*PCMAudioStreamDecoder) EndInput ¶
func (d *PCMAudioStreamDecoder) EndInput()
func (*PCMAudioStreamDecoder) Next ¶
func (d *PCMAudioStreamDecoder) Next() (*model.AudioFrame, error)
func (*PCMAudioStreamDecoder) Push ¶
func (d *PCMAudioStreamDecoder) Push(data []byte)
Click to show internal directories.
Click to hide internal directories.