pub type switch_file_handle_t = switch_file_handle;Expand description
an abstract representation of a file handle (some parameters based on compat with libsndfile)
Aliased Type§
#[repr(C)]pub struct switch_file_handle_t {Show 53 fields
pub file_interface: *mut switch_file_interface,
pub flags: u32,
pub fd: *mut fspr_file_t,
pub samples: u32,
pub samplerate: u32,
pub native_rate: u32,
pub channels: u32,
pub real_channels: u32,
pub format: u32,
pub sections: u32,
pub seekable: i32,
pub sample_count: usize,
pub speed: i32,
pub memory_pool: *mut fspr_pool_t,
pub prebuf: u32,
pub interval: u32,
pub private_info: *mut c_void,
pub handler: *mut i8,
pub pos: i64,
pub audio_buffer: *mut switch_buffer,
pub sp_audio_buffer: *mut switch_buffer,
pub thresh: u32,
pub silence_hits: u32,
pub offset_pos: u32,
pub samples_in: usize,
pub samples_out: usize,
pub vol: i32,
pub volgranular: i32,
pub resampler: *mut switch_audio_resampler_t,
pub buffer: *mut switch_buffer,
pub dbuf: *mut u8,
pub dbuflen: usize,
pub pre_buffer: *mut switch_buffer,
pub pre_buffer_data: *mut u8,
pub pre_buffer_datalen: usize,
pub file: *const i8,
pub func: *const i8,
pub line: i32,
pub file_path: *mut i8,
pub spool_path: *mut i8,
pub prefix: *const i8,
pub max_samples: i32,
pub params: *mut switch_event,
pub cur_channels: u32,
pub cur_samplerate: u32,
pub stream_name: *mut i8,
pub modname: *mut i8,
pub mm: switch_mm_s,
pub flag_mutex: *mut fspr_thread_mutex_t,
pub duration: i64,
pub vpos: i64,
pub muxbuf: *mut c_void,
pub muxlen: usize,
}Fields§
§file_interface: *mut switch_file_interfacethe interface of the module that implemented the current file type
flags: u32flags to control behaviour
fd: *mut fspr_file_ta file descriptor if neceessary
samples: u32samples position of the handle
samplerate: u32the current samplerate
native_rate: u32the current native samplerate
channels: u32the number of channels
real_channels: u32§format: u32integer representation of the format
sections: u32integer representation of the sections
seekable: i32is the file seekable
sample_count: usizethe sample count of the file
speed: i32the speed of the file playback
memory_pool: *mut fspr_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 i8§pos: i64§audio_buffer: *mut switch_buffer§sp_audio_buffer: *mut switch_buffer§thresh: u32§silence_hits: u32§offset_pos: u32§samples_in: usize§samples_out: usize§vol: i32§volgranular: i32§resampler: *mut switch_audio_resampler_t§buffer: *mut switch_buffer§dbuf: *mut u8§dbuflen: usize§pre_buffer: *mut switch_buffer§pre_buffer_data: *mut u8§pre_buffer_datalen: usize§file: *const i8§func: *const i8§line: i32§file_path: *mut i8§spool_path: *mut i8§prefix: *const i8§max_samples: i32§params: *mut switch_event§cur_channels: u32§cur_samplerate: u32§stream_name: *mut i8§modname: *mut i8§mm: switch_mm_s§flag_mutex: *mut fspr_thread_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: usize