pub type switch_codec_implementation_t = switch_codec_implementation;Expand description
\brief A table of settings and callbacks that define a paticular implementation of a codec
Aliased Type§
#[repr(C)]pub struct switch_codec_implementation_t {Show 24 fields
pub codec_type: u32,
pub ianacode: u8,
pub iananame: *mut i8,
pub fmtp: *mut i8,
pub samples_per_second: u32,
pub actual_samples_per_second: u32,
pub bits_per_second: i32,
pub microseconds_per_packet: i32,
pub samples_per_packet: u32,
pub decoded_bytes_per_packet: u32,
pub encoded_bytes_per_packet: u32,
pub number_of_channels: u8,
pub codec_frames_per_packet: i32,
pub init: Option<unsafe extern "C" fn(*mut switch_codec, u32, *const switch_codec_settings) -> switch_status_t>,
pub encode: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_codec, *mut c_void, u32, u32, *mut c_void, *mut u32, *mut u32, *mut u32) -> switch_status_t>,
pub decode: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_codec, *mut c_void, u32, u32, *mut c_void, *mut u32, *mut u32, *mut u32) -> switch_status_t>,
pub encode_video: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_frame) -> switch_status_t>,
pub decode_video: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_frame) -> switch_status_t>,
pub codec_control: Option<unsafe extern "C" fn(*mut switch_codec, u32, u32, *mut c_void, u32, *mut c_void, *mut u32, *mut *mut c_void) -> switch_status_t>,
pub destroy: Option<unsafe extern "C" fn(*mut switch_codec) -> switch_status_t>,
pub codec_id: u32,
pub impl_id: u32,
pub modname: *mut i8,
pub next: *mut switch_codec_implementation,
}Fields§
§codec_type: u32enumeration defining the type of the codec
ianacode: u8the IANA code number
iananame: *mut i8the IANA code name
fmtp: *mut i8default fmtp to send (can be overridden by the init function)
samples_per_second: u32samples transferred per second
actual_samples_per_second: u32actual samples transferred per second for those who are not moron g722 RFC writers
bits_per_second: i32bits transferred per second
microseconds_per_packet: i32number of microseconds of media in one packet (ptime * 1000)
samples_per_packet: u32number of samples in one packet
decoded_bytes_per_packet: u32number of bytes one packet will decompress to
encoded_bytes_per_packet: u32number of encoded bytes in the RTP payload
number_of_channels: u8number of channels represented
codec_frames_per_packet: i32number of codec frames packetized into one packet
init: Option<unsafe extern "C" fn(*mut switch_codec, u32, *const switch_codec_settings) -> switch_status_t>function to initialize a codec handle using this implementation
encode: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_codec, *mut c_void, u32, u32, *mut c_void, *mut u32, *mut u32, *mut u32) -> switch_status_t>function to encode raw data into encoded data
decode: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_codec, *mut c_void, u32, u32, *mut c_void, *mut u32, *mut u32, *mut u32) -> switch_status_t>function to decode encoded data into raw data
encode_video: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_frame) -> switch_status_t>function to encode video raw data into encoded data
decode_video: Option<unsafe extern "C" fn(*mut switch_codec, *mut switch_frame) -> switch_status_t>function to decode video encoded data into raw data
codec_control: Option<unsafe extern "C" fn(*mut switch_codec, u32, u32, *mut c_void, u32, *mut c_void, *mut u32, *mut *mut c_void) -> switch_status_t>function to send control messages to the codec
destroy: Option<unsafe extern "C" fn(*mut switch_codec) -> switch_status_t>deinitalize a codec handle using this implementation
codec_id: u32§impl_id: u32§modname: *mut i8§next: *mut switch_codec_implementation