#[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_tthe interface of the module that implemented the current file type
flags: u32flags to control behaviour
fd: *mut switch_file_ta file descriptor if neceessary
samples: c_uintsamples position of the handle
samplerate: u32the current samplerate
native_rate: u32the current native samplerate
channels: u32the number of channels
real_channels: u32§format: c_uintinteger representation of the format
sections: c_uintinteger representation of the sections
seekable: c_intis the file seekable
sample_count: switch_size_tthe sample count of the file
speed: c_intthe speed of the file playback
memory_pool: *mut switch_memory_pool_tthe handle’s memory pool
prebuf: u32pre-buffer x bytes for streams
interval: u32private 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: i64total video duration, or total page in pdf
vpos: i64current video position, or current page in pdf
muxbuf: *mut c_void§muxlen: switch_size_tTrait Implementations§
Source§impl Clone for switch_file_handle
impl Clone for switch_file_handle
Source§fn clone(&self) -> switch_file_handle
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for switch_file_handle
impl Debug for switch_file_handle
impl Copy for switch_file_handle
Auto Trait Implementations§
impl Freeze for switch_file_handle
impl RefUnwindSafe for switch_file_handle
impl !Send for switch_file_handle
impl !Sync for switch_file_handle
impl Unpin for switch_file_handle
impl UnwindSafe for switch_file_handle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more