Description | Hierarchy | Fields | Methods | Properties |
type unaSpeexEncoder = class(unaSpeexCoder)
Speex Encoder.
function encode_int(samples: pointer; size: int): int; |
|
function doGetFrameSize(): int; override; |
|
function doGetSamplingRate(): int; override; |
|
function doInit(): pointer; override; |
|
procedure AfterConstruction(); override; |
|
procedure assignDSP(dsp: unaSpeexDSP; aec: bool = false); |
|
procedure add_frame_int(samples: pointer; vad: bool); virtual; |
|
procedure doClose(); override; |
|
procedure doOpen(); override; |
|
procedure encoder_write(sampleDelta: uint; data: pointer; size: uint; numFrames: uint); virtual; |
property abr: int read getABR write setABR; |
|
property aec: bool read f_aec write f_aec; |
|
property bitrate: int read getBitrate write setBitrate; |
|
property complexity: int read getComplexity write setComplexity; |
|
property dsp: unaSpeexDSP read f_dsp; |
|
property optimizeForRTP: bool read f_op4RTP write f_op4RTP; |
|
property quality: int read getQuality write setQuality; |
|
property vbr: bool read getVbr write setVbr; |
|
property vbrQuality: float read getVbrQ write setVbrQ; |
function encode_int(samples: pointer; size: int): int; |
|
Writes full frames from samples buffer. Rest will be stored internally. Size is in bytes. Samples are 16 bits integer values from -32768 to +32767, mono. Return number of bytes consumed by encoder or -1 in case of some error. |
function doGetFrameSize(): int; override; |
|
function doGetSamplingRate(): int; override; |
|
function doInit(): pointer; override; |
|
procedure AfterConstruction(); override; |
|
procedure assignDSP(dsp: unaSpeexDSP; aec: bool = false); |
|
Makes encoder aware (or unaware if nil is passed) of DSP. |
procedure add_frame_int(samples: pointer; vad: bool); virtual; |
|
Adds new frame to encoder. samples is pointing to exactly 1 frame of audio (20 ms). Samples are 16 bits integer values from -32768 to +32767, mono. |
procedure doClose(); override; |
|
procedure doOpen(); override; |
|
procedure encoder_write(sampleDelta: uint; data: pointer; size: uint; numFrames: uint); virtual; |
|
Called when new block of encoded data is available. numFrames is number of frames encoded in buffer. |
property abr: int read getABR write setABR; |
|
property aec: bool read f_aec write f_aec; |
|
Enable/disable aec (only when dsp is assigned) |
property bitrate: int read getBitrate write setBitrate; |
|
property complexity: int read getComplexity write setComplexity; |
|
property dsp: unaSpeexDSP read f_dsp; |
|
Assigned DSP (if any) |
property optimizeForRTP: bool read f_op4RTP write f_op4RTP; |
|
When True, up to c_opt4RTP_numframes frames but no more than c_opt4RTP_numbytes bytes will be packed before output encoded buffer will be notified. |
property quality: int read getQuality write setQuality; |
|
set below properties to adjust output bitrate (and quality) |
property vbr: bool read getVbr write setVbr; |
|
property vbrQuality: float read getVbrQ write setVbrQ; |
|
(c) 2012 Lake of Soft