Documentation
¶
Index ¶
- Constants
- func CodecVersion() string
- type Application
- type Bandwidth
- type Bitrate
- type Encoder
- func (e *Encoder) Bitrate() (int, error)
- func (e *Encoder) Complexity() (int, error)
- func (e *Encoder) DTX() (bool, error)
- func (e *Encoder) Encode(pcm []int16) ([]byte, error)
- func (e *Encoder) FEC() (bool, error)
- func (e *Encoder) GetInfo() string
- func (e *Encoder) MaxBandwidth() (Bandwidth, error)
- func (e *Encoder) PacketLossPerc() (int, error)
- func (e *Encoder) Reset() error
- func (e *Encoder) ResetState() error
- func (e *Encoder) SampleRate() (int, error)
- func (e *Encoder) SetBitrate(b Bitrate) error
- func (e *Encoder) SetComplexity(complexity int) error
- func (e *Encoder) SetDTX(dtx bool) error
- func (e *Encoder) SetFEC(fec bool) error
- func (e *Encoder) SetMaxBandwidth(b Bandwidth) error
- func (e *Encoder) SetPacketLossPerc(lossPerc int) error
- type Error
Constants ¶
View Source
const ( // AppRestrictedLowDelay optimizes encoding for low latency applications AppRestrictedLowDelay = Application(C.OPUS_APPLICATION_RESTRICTED_LOWDELAY) // FullBand is 20 kHz bandpass FullBand = Bandwidth(C.OPUS_BANDWIDTH_FULLBAND) )
Variables ¶
This section is empty.
Functions ¶
func CodecVersion ¶
func CodecVersion() string
Types ¶
type Application ¶
type Application int
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) Complexity ¶
Complexity returns the value of the complexity.
func (*Encoder) MaxBandwidth ¶
MaxBandwidth returns the maximum allowed bandpass value.
func (*Encoder) PacketLossPerc ¶
PacketLossPerc returns configured packet loss percentage.
func (*Encoder) ResetState ¶
func (*Encoder) SampleRate ¶
SampleRate returns the sample rate of the encoder.
func (*Encoder) SetBitrate ¶
SetBitrate sets the bitrate of the encoder. BitrateMax / BitrateAuto can be used here.
func (*Encoder) SetComplexity ¶
SetComplexity sets the complexity factor for the encoder. Complexity is a value from 1 to 10, where 1 is the lowest complexity and 10 is the highest.
func (*Encoder) SetMaxBandwidth ¶
SetMaxBandwidth sets the upper limit of the bandpass.
func (*Encoder) SetPacketLossPerc ¶
SetPacketLossPerc sets expected packet loss percentage.
Click to show internal directories.
Click to hide internal directories.