#[repr(C)]pub struct codec_c_interface {
pub init: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, inputSamplesPerSecond: u32, inputBitsPerSample: u8, inputChannels: u8, datacallback: AUDIO_ENCODER_ONENCODEDDATA, pContext: *mut c_void) -> AZACHR>,
pub get_format_type: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, buffer: *mut c_char, buffersize: *mut u64) -> AZACHR>,
pub encode: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, pBuffer: *const u8, bytesToWrite: size_t) -> AZACHR>,
pub flush: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>,
pub endstream: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>,
pub destroy: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>,
}
Fields
init: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, inputSamplesPerSecond: u32, inputBitsPerSample: u8, inputChannels: u8, datacallback: AUDIO_ENCODER_ONENCODEDDATA, pContext: *mut c_void) -> AZACHR>
@param codec codec Object returned by the codec_create call to be initialized @param inputSamplesPerSecond sample rate for the input audio @param inputBitsPerSample bits per sample for the input audio @param inputChannels number of channel of the input audio @param dataCallback An application defined callback. @param pContext A pointer to the application-defined callback context. @return A return code or zero if successful.
get_format_type: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, buffer: *mut c_char, buffersize: *mut u64) -> AZACHR>
@param codec codec object returned by the codec_create call. @param buffer caller provided buffer to receive the value of the property @param buffersize buffer size. If buffer is passed as null it will return the required buffer size. @return A return code or zero if successful.
encode: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE, pBuffer: *const u8, bytesToWrite: size_t) -> AZACHR>
Encodes raw PCM data. @param codec codec object returned by the codec_create call. @param pBuffer The PCM data. @param bytesToWrite The length pBuffer. @return A return code or zero if successful.
flush: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>
Flushes the encoder. @param codec codec object returned by the codec_create call. @return A return code or zero if successful.
endstream: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>
Terminate the encoded stream immediately @param codec codec object returned by the codec_create call. @return A return code or zero if successful.
destroy: Option<unsafe extern "C" fn(codec: SPXCODECCTYPE) -> AZACHR>
Destroys the encoder. The codec object should not be used anymore after this call. @param codec codec object returned by the codec_create call. @return A return code or zero if successful.
Trait Implementations
sourceimpl Clone for codec_c_interface
impl Clone for codec_c_interface
sourcefn clone(&self) -> codec_c_interface
fn clone(&self) -> codec_c_interface
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for codec_c_interface
impl Debug for codec_c_interface
impl Copy for codec_c_interface
Auto Trait Implementations
impl RefUnwindSafe for codec_c_interface
impl Send for codec_c_interface
impl Sync for codec_c_interface
impl Unpin for codec_c_interface
impl UnwindSafe for codec_c_interface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more