Struct switch_codec_implementation

Source
#[repr(C)]
pub struct switch_codec_implementation {
Show 24 fields pub codec_type: switch_codec_type_t, pub ianacode: switch_payload_t, pub iananame: *mut c_char, pub fmtp: *mut c_char, pub samples_per_second: u32, pub actual_samples_per_second: u32, pub bits_per_second: c_int, pub microseconds_per_packet: c_int, 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: c_int, pub init: switch_core_codec_init_func_t, pub encode: switch_core_codec_encode_func_t, pub decode: switch_core_codec_decode_func_t, pub encode_video: switch_core_codec_video_encode_func_t, pub decode_video: switch_core_codec_video_decode_func_t, pub codec_control: switch_core_codec_control_func_t, pub destroy: switch_core_codec_destroy_func_t, pub codec_id: u32, pub impl_id: u32, pub modname: *mut c_char, pub next: *mut switch_codec_implementation,
}
Expand description

\brief A table of settings and callbacks that define a paticular implementation of a codec

Fields§

§codec_type: switch_codec_type_t

enumeration defining the type of the codec

§ianacode: switch_payload_t

the IANA code number

§iananame: *mut c_char

the IANA code name

§fmtp: *mut c_char

default fmtp to send (can be overridden by the init function)

§samples_per_second: u32

samples transferred per second

§actual_samples_per_second: u32

actual samples transferred per second for those who are not moron g722 RFC writers

§bits_per_second: c_int

bits transferred per second

§microseconds_per_packet: c_int

number of microseconds of media in one packet (ptime * 1000)

§samples_per_packet: u32

number of samples in one packet

§decoded_bytes_per_packet: u32

number of bytes one packet will decompress to

§encoded_bytes_per_packet: u32

number of encoded bytes in the RTP payload

§number_of_channels: u8

number of channels represented

§codec_frames_per_packet: c_int

number of codec frames packetized into one packet

§init: switch_core_codec_init_func_t

function to initialize a codec handle using this implementation

§encode: switch_core_codec_encode_func_t

function to encode raw data into encoded data

§decode: switch_core_codec_decode_func_t

function to decode encoded data into raw data

§encode_video: switch_core_codec_video_encode_func_t

function to encode video raw data into encoded data

§decode_video: switch_core_codec_video_decode_func_t

function to decode video encoded data into raw data

§codec_control: switch_core_codec_control_func_t

function to send control messages to the codec

§destroy: switch_core_codec_destroy_func_t

deinitalize a codec handle using this implementation

§codec_id: u32§impl_id: u32§modname: *mut c_char§next: *mut switch_codec_implementation

Trait Implementations§

Source§

impl Clone for switch_codec_implementation

Source§

fn clone(&self) -> switch_codec_implementation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for switch_codec_implementation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for switch_codec_implementation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.