Struct switch_file_handle

Source
#[repr(C)]
pub struct switch_file_handle {
Show 53 fields pub file_interface: *mut switch_file_interface_t, pub flags: u32, pub fd: *mut switch_file_t, pub samples: c_uint, pub samplerate: u32, pub native_rate: u32, pub channels: u32, pub real_channels: u32, pub format: c_uint, pub sections: c_uint, pub seekable: c_int, pub sample_count: switch_size_t, pub speed: c_int, pub memory_pool: *mut switch_memory_pool_t, pub prebuf: u32, pub interval: u32, pub private_info: *mut c_void, pub handler: *mut c_char, pub pos: i64, pub audio_buffer: *mut switch_buffer_t, pub sp_audio_buffer: *mut switch_buffer_t, pub thresh: u32, pub silence_hits: u32, pub offset_pos: u32, pub samples_in: switch_size_t, pub samples_out: switch_size_t, pub vol: i32, pub volgranular: i32, pub resampler: *mut switch_audio_resampler_t, pub buffer: *mut switch_buffer_t, pub dbuf: *mut switch_byte_t, pub dbuflen: switch_size_t, pub pre_buffer: *mut switch_buffer_t, pub pre_buffer_data: *mut c_uchar, pub pre_buffer_datalen: switch_size_t, pub file: *const c_char, pub func: *const c_char, pub line: c_int, pub file_path: *mut c_char, pub spool_path: *mut c_char, pub prefix: *const c_char, pub max_samples: c_int, pub params: *mut switch_event_t, pub cur_channels: u32, pub cur_samplerate: u32, pub stream_name: *mut c_char, pub modname: *mut c_char, pub mm: switch_mm_t, pub flag_mutex: *mut switch_mutex_t, pub duration: i64, pub vpos: i64, pub muxbuf: *mut c_void, pub muxlen: switch_size_t,
}
Expand description

an abstract representation of a file handle (some parameters based on compat with libsndfile)

Fields§

§file_interface: *mut switch_file_interface_t

the interface of the module that implemented the current file type

§flags: u32

flags to control behaviour

§fd: *mut switch_file_t

a file descriptor if neceessary

§samples: c_uint

samples position of the handle

§samplerate: u32

the current samplerate

§native_rate: u32

the current native samplerate

§channels: u32

the number of channels

§real_channels: u32§format: c_uint

integer representation of the format

§sections: c_uint

integer representation of the sections

§seekable: c_int

is the file seekable

§sample_count: switch_size_t

the sample count of the file

§speed: c_int

the speed of the file playback

§memory_pool: *mut switch_memory_pool_t

the handle’s memory pool

§prebuf: u32

pre-buffer x bytes for streams

§interval: u32

private data for the format module to store handle specific info

§private_info: *mut c_void§handler: *mut c_char§pos: i64§audio_buffer: *mut switch_buffer_t§sp_audio_buffer: *mut switch_buffer_t§thresh: u32§silence_hits: u32§offset_pos: u32§samples_in: switch_size_t§samples_out: switch_size_t§vol: i32§volgranular: i32§resampler: *mut switch_audio_resampler_t§buffer: *mut switch_buffer_t§dbuf: *mut switch_byte_t§dbuflen: switch_size_t§pre_buffer: *mut switch_buffer_t§pre_buffer_data: *mut c_uchar§pre_buffer_datalen: switch_size_t§file: *const c_char§func: *const c_char§line: c_int§file_path: *mut c_char§spool_path: *mut c_char§prefix: *const c_char§max_samples: c_int§params: *mut switch_event_t§cur_channels: u32§cur_samplerate: u32§stream_name: *mut c_char§modname: *mut c_char§mm: switch_mm_t§flag_mutex: *mut switch_mutex_t§duration: i64

total video duration, or total page in pdf

§vpos: i64

current video position, or current page in pdf

§muxbuf: *mut c_void§muxlen: switch_size_t

Trait Implementations§

Source§

impl Clone for switch_file_handle

Source§

fn clone(&self) -> switch_file_handle

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_file_handle

Source§

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

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

impl Copy for switch_file_handle

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.