RTS API Documentation
1.10.11
|
Go to the source code of this file.
Macros | |
#define | DUP_CHECK(dup) if (oldfh->dup && !(fh->dup = switch_core_strdup(pool, oldfh->dup))) {switch_goto_status(SWITCH_STATUS_MEMERR, err);} |
#define DUP_CHECK | ( | dup | ) | if (oldfh->dup && !(fh->dup = switch_core_strdup(pool, oldfh->dup))) {switch_goto_status(SWITCH_STATUS_MEMERR, err);} |
Referenced by switch_core_file_handle_dup().
|
static |
Definition at line 40 of file switch_core_file.c.
References switch_file_handle::file_path, switch_file_handle::memory_pool, switch_file_handle::spool_path, switch_assert, switch_core_sprintf(), switch_file_close(), switch_file_get_size(), switch_file_open(), SWITCH_FOPEN_READ, SWITCH_FPROT_OS_DEFAULT, SWITCH_SIZE_T_FMT, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_file_get_string().
switch_status_t switch_core_file_close | ( | switch_file_handle_t * | fh | ) |
Definition at line 1051 of file switch_core_file.c.
References switch_file_handle::buffer, switch_file_handle::dbuf, switch_file_interface::file_close, switch_file_handle::file_interface, switch_file_handle::file_path, switch_file_handle::max_samples, switch_file_handle::memory_pool, switch_file_handle::muxbuf, switch_file_handle::params, switch_file_handle::resampler, switch_file_handle::samples_in, switch_file_handle::spool_path, switch_buffer_destroy(), SWITCH_CHANNEL_LOG, switch_clear_flag_locked, switch_core_destroy_memory_pool, switch_core_file_pre_close(), switch_event_destroy(), SWITCH_FILE_FLAG_FREE_POOL, SWITCH_FILE_OPEN, SWITCH_FILE_PRE_CLOSED, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_mprintf(), switch_resample_destroy(), switch_safe_free, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, and UNPROTECT_INTERFACE.
switch_status_t switch_core_file_get_string | ( | switch_file_handle_t * | fh, |
switch_audio_col_t | col, | ||
const char ** | string | ||
) |
Definition at line 846 of file switch_core_file.c.
References switch_file_interface::file_get_string, switch_file_handle::file_interface, get_file_size(), switch_assert, SWITCH_AUDIO_COL_STR_FILE_SIZE, SWITCH_FILE_OPEN, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
switch_status_t switch_core_file_pre_close | ( | switch_file_handle_t * | fh | ) |
Definition at line 936 of file switch_core_file.c.
References switch_file_handle::channels, switch_file_handle::file_interface, switch_file_interface::file_pre_close, switch_file_interface::file_write, switch_file_handle::pre_buffer, switch_file_handle::pre_buffer_data, switch_file_handle::pre_buffer_datalen, switch_assert, switch_buffer_destroy(), switch_buffer_inuse(), switch_buffer_read(), switch_clear_flag_locked, SWITCH_FILE_FLAG_WRITE, SWITCH_FILE_NATIVE, SWITCH_FILE_OPEN, SWITCH_FILE_PRE_CLOSED, switch_set_flag_locked, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by switch_core_file_close().
switch_status_t switch_core_file_read | ( | switch_file_handle_t * | fh, |
void * | data, | ||
switch_size_t * | len | ||
) |
Definition at line 487 of file switch_core_file.c.
References switch_file_handle::buffer, switch_file_handle::channels, switch_file_handle::dbuf, switch_file_handle::dbuflen, switch_file_handle::file_interface, switch_file_interface::file_read, switch_file_handle::max_samples, switch_file_handle::native_rate, switch_file_handle::pre_buffer, switch_file_handle::pre_buffer_data, switch_file_handle::pre_buffer_datalen, switch_file_handle::real_channels, switch_file_handle::resampler, switch_file_handle::samplerate, switch_file_handle::samples_in, switch_assert, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), SWITCH_CHANNEL_LOG, switch_clear_flag_locked, SWITCH_FILE_BUFFER_DONE, SWITCH_FILE_DONE, SWITCH_FILE_NATIVE, SWITCH_FILE_NOMUX, SWITCH_FILE_OPEN, SWITCH_LOG_CRIT, switch_log_printf(), switch_mux_channels(), switch_resample_create, switch_resample_process(), SWITCH_RESAMPLE_QUALITY, switch_set_flag_locked, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_audio_resampler_t::to, and switch_audio_resampler_t::to_len.
switch_status_t switch_core_file_seek | ( | switch_file_handle_t * | fh, |
unsigned int * | cur_pos, | ||
int64_t | samples, | ||
int | whence | ||
) |
Definition at line 779 of file switch_core_file.c.
References switch_file_handle::buffer, cur, switch_file_handle::file_interface, switch_file_interface::file_seek, switch_file_handle::offset_pos, switch_file_handle::pre_buffer, switch_file_handle::samples_out, switch_assert, switch_buffer_zero(), SWITCH_FILE_FLAG_READ, SWITCH_FILE_FLAG_WRITE, SWITCH_FILE_OPEN, SWITCH_FILE_SEEK, SWITCH_FILE_WRITE_APPEND, SWITCH_FILE_WRITE_OVER, SWITCH_SEEK_CUR, switch_set_flag_locked, SWITCH_STATUS_FALSE, and switch_test_flag.
switch_status_t switch_core_file_set_string | ( | switch_file_handle_t * | fh, |
switch_audio_col_t | col, | ||
const char * | string | ||
) |
Definition at line 830 of file switch_core_file.c.
References switch_file_handle::file_interface, switch_file_interface::file_set_string, switch_assert, SWITCH_FILE_OPEN, SWITCH_STATUS_FALSE, and switch_test_flag.
switch_status_t switch_core_file_write | ( | switch_file_handle_t * | fh, |
void * | data, | ||
switch_size_t * | len | ||
) |
Definition at line 624 of file switch_core_file.c.
References switch_file_handle::channels, switch_file_handle::dbuf, switch_file_handle::dbuflen, switch_file_handle::file_interface, switch_file_interface::file_write, switch_file_handle::muxbuf, switch_file_handle::muxlen, switch_file_handle::native_rate, switch_file_handle::pre_buffer, switch_file_handle::pre_buffer_data, switch_file_handle::pre_buffer_datalen, switch_file_handle::real_channels, switch_file_handle::resampler, switch_file_handle::samplerate, switch_file_handle::samples_out, switch_assert, switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), SWITCH_CHANNEL_LOG, SWITCH_FILE_NATIVE, SWITCH_FILE_NOMUX, SWITCH_FILE_OPEN, SWITCH_FILE_PAUSE, SWITCH_LOG_CRIT, switch_log_printf(), switch_mux_channels(), switch_resample_create, switch_resample_process(), SWITCH_RESAMPLE_QUALITY, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_audio_resampler_t::to, and switch_audio_resampler_t::to_len.
switch_status_t switch_core_file_write_video | ( | switch_file_handle_t * | fh, |
switch_frame_t * | frame | ||
) |
Definition at line 734 of file switch_core_file.c.
References switch_file_handle::file_interface, switch_file_interface::file_write_video, switch_assert, SWITCH_FILE_OPEN, SWITCH_FILE_PAUSE, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and switch_test_flag.
switch_status_t switch_core_perform_file_open | ( | const char * | file, |
const char * | func, | ||
int | line, | ||
switch_file_handle_t * | fh, | ||
const char * | file_path, | ||
uint32_t | channels, | ||
uint32_t | rate, | ||
unsigned int | flags, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 65 of file switch_core_file.c.
References switch_mm_s::ab, switch_mm_s::auth_password, switch_mm_s::auth_username, switch_mm_s::cbr, switch_file_handle::channels, switch_mm_s::channels, switch_file_handle::cur_channels, switch_stream_handle::data, end_of, end_of_p, fail, switch_file_handle::file, switch_file_interface::file_close, switch_file_handle::file_interface, switch_file_interface::file_open, switch_file_handle::file_path, switch_file_interface::file_read_video, switch_file_handle::flag_mutex, switch_file_handle::flags, format, switch_mm_s::fps, switch_file_handle::func, switch_file_handle::handler, switch_mm_s::keyint, switch_file_handle::line, switch_file_handle::max_samples, switch_file_handle::memory_pool, switch_file_handle::mm, switch_file_handle::modname, switch_file_handle::native_rate, switch_file_handle::params, pool, switch_file_handle::pre_buffer, switch_file_handle::pre_buffer_data, switch_file_handle::pre_buffer_datalen, switch_file_handle::real_channels, switch_file_handle::samplerate, switch_mm_s::samplerate, switch_file_handle::samples_in, switch_file_handle::spool_path, switch_file_handle::stream_name, switch_api_execute(), SWITCH_AUDIO_SPOOL_PATH_VARIABLE, switch_buffer_create_dynamic(), SWITCH_CHANNEL_LOG, switch_clear_flag_locked, switch_copy_string(), switch_core_alloc, switch_core_destroy_memory_pool, switch_core_get_variable_pdup(), switch_core_max_audio_channels(), switch_core_new_memory_pool, switch_core_sprintf(), switch_core_strdup, switch_directory_exists(), switch_event_create_brackets(), switch_event_destroy(), switch_event_get_header, SWITCH_FALSE, switch_false(), switch_file_exists(), SWITCH_FILE_FLAG_FREE_POOL, SWITCH_FILE_FLAG_READ, SWITCH_FILE_FLAG_VIDEO, SWITCH_FILE_FLAG_WRITE, SWITCH_FILE_NOMUX, SWITCH_FILE_OPEN, switch_goto_status, switch_loadable_module_get_file_interface(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_PATH_SEPARATOR, switch_safe_free, switch_set_flag, switch_set_flag_locked, SWITCH_STANDARD_STREAM, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_stristr(), switch_test_flag, switch_true(), switch_url_encode(), SWITCH_URL_SEPARATOR, switch_uuid_format(), SWITCH_UUID_FORMATTED_LENGTH, switch_uuid_get(), SWITCH_VIDEO_ENCODE_SPEED_DEFAULT, SWITCH_VIDEO_ENCODE_SPEED_FAST, SWITCH_VIDEO_ENCODE_SPEED_MEDIUM, SWITCH_VIDEO_ENCODE_SPEED_SLOW, SWITCH_VIDEO_PROFILE_BASELINE, SWITCH_VIDEO_PROFILE_HIGH, SWITCH_VIDEO_PROFILE_MAIN, to, switch_mm_s::try_hardware_encoder, UNPROTECT_INTERFACE, switch_mm_s::vb, switch_mm_s::vbuf, switch_mm_s::vencspd, switch_mm_s::vh, switch_mm_s::vprofile, switch_mm_s::vw, while(), and zstr.