RTS API Documentation
1.10.11
|
Functions | |
DoxyDefine (void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen, switch_bitpack_mode_t mode)) static inline int8_t switch_bitpack_init(switch_bitpack_t *pack | |
Initialize a bitpack object. More... | |
memset (buf, 0, buflen) | |
static void | pack_check_over (switch_bitpack_t *pack) |
DoxyDefine (int8_t switch_bitpack_done(switch_bitpack_t *pack)) static inline int8_t switch_bitpack_done(switch_bitpack_t *pack) | |
finalize a bitpack object More... | |
DoxyDefine (int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t in)) static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack | |
pull data out of a bitpack object into it's buffer More... | |
if ((uint32_t)(unpack->cur - unpack->buf) > unpack->buflen) | |
pack_check_over (unpack) | |
while (unpack->bits_cur<=SWITCH_BITS_PER_BYTE) | |
DoxyDefine (int8_t switch_bitpack_in(switch_bitpack_t *pack, switch_byte_t in)) static inline int8_t switch_bitpack_in(switch_bitpack_t *pack | |
pack data into a bitpack object's buffer More... | |
if ((uint32_t)(pack->cur - pack->buf) > pack->buflen) | |
if (next > SWITCH_BITS_PER_BYTE) | |
Variables | |
static const uint8_t | SWITCH_BITPACKED_MASKS [] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 } |
static const uint8_t | SWITCH_REVERSE_BITPACKED_MASKS [] = { 255, 254, 252, 248, 240, 224, 192, 128 } |
switch_byte_t | bitlen |
switch_byte_t switch_byte_t * | buf = buf |
switch_byte_t switch_byte_t uint32_t | buflen = buflen |
switch_byte_t switch_byte_t uint32_t switch_bitpack_mode_t | mode |
pack | frame_bits = bitlen |
pack | cur = pack->buf |
return | |
switch_byte_t | in |
unpack | bits_cur = 0 |
unpack | this_byte = this_byte = in |
pack | bits_tot = pack->frame_bits |
else | |
DoxyDefine | ( | void | switch_bitpack_initswitch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen, switch_bitpack_mode_t mode | ) |
Initialize a bitpack object.
pack | the pack object |
bitlen | the number of bits per packet |
buf | the buffer to use for storage |
buflen | the length of the storage buffer |
mode | RFC3551 or AAL2 mode (curse you backwards folks) |
Referenced by DoxyDefine(), and while().
DoxyDefine | ( | int8_t | switch_bitpack_doneswitch_bitpack_t *pack | ) |
finalize a bitpack object
pack | the pack/unpack object |
Definition at line 128 of file switch_bitpack.h.
References switch_bitpack_t::bits_cur, switch_bitpack_t::bytes, switch_bitpack_t::cur, DoxyDefine(), in, switch_bitpack_t::mode, switch_bitpack_t::over, pack_check_over(), SWITCH_BITPACK_MODE_AAL2, and SWITCH_BITS_PER_BYTE.
DoxyDefine | ( | int8_t | switch_bitpack_outswitch_bitpack_t *unpack, switch_byte_t in | ) |
pull data out of a bitpack object into it's buffer
unpack | the pack/unpack object |
in | a 1 byte int packed with bits |
DoxyDefine | ( | int8_t | switch_bitpack_inswitch_bitpack_t *pack, switch_byte_t in | ) |
pack data into a bitpack object's buffer
pack | the pack/unpack object |
in | a 1 byte int with 1 packet worth of bits |
Definition at line 157 of file switch_bitpack.h.
Referenced by build_red_packet(), check_ice(), check_jb_size(), early_thread_run(), parse_presence_data_cols(), read_rtcp_packet(), record_callback(), rtp_common_read(), switch_apr_queue_pop(), switch_apr_queue_pop_timeout(), switch_apr_queue_push(), switch_apr_queue_trypop(), switch_apr_queue_trypush(), switch_channel_get_cap_string(), switch_channel_get_flag_string(), switch_console_save_history(), switch_console_sort_matches(), switch_core_media_absorb_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_process_udptl(), switch_core_media_receive_message(), switch_core_session_read_frame(), switch_core_session_write_frame(), switch_img_copy_rect(), switch_ivr_process_fh(), switch_ivr_record_file_event(), switch_ivr_wait_for_silence(), switch_kalman_cusum_detect_change(), SWITCH_STANDARD_SCHED_FUNC(), switch_stun_packet_attribute_get_xor_mapped_address(), switch_stun_packet_parse(), switch_xml_attr(), switch_xml_config_parse_event(), timer_init(), tzparse(), and vxprintf().
Definition at line 228 of file switch_bitpack.h.
if | ( | next | , |
SWITCH_BITS_PER_BYTE | |||
) |
Definition at line 234 of file switch_bitpack.h.
References b, switch_bitpack_t::bits_cur, switch_bitpack_t::bytes, switch_bitpack_t::cur, switch_bitpack_t::frame_bits, switch_bitpack_t::mode, switch_bitpack_t::shiftby, SWITCH_BITPACK_MODE_RFC3551, SWITCH_BITPACKED_MASKS, and SWITCH_BITS_PER_BYTE.
Referenced by add_xml_header(), cJSON_New_Item(), clear_ice(), collect_thread_run(), db_pick_path(), do_2833(), dtls_state_setup(), early_thread_run(), ecd_deliver(), fct_dotted_line_start(), fct_logger__init(), fct_namespace_init(), fct_timer__init(), fctkern__init(), fetch_device_stats(), SimpleGlobBase< SOCHAR >::FindDone(), freeswitch_kill_background(), generate_m(), CoreSession::getDigits(), handle_ice(), hashtable_expand(), inband_dtmf_generate_callback(), inet_pton4(), init_upnp(), main(), meta_on_dtmf(), new_header(), play_and_collect(), CoreSession::playAndGetDigits(), preprocess(), print(), read_displace_callback(), read_rtp_packet(), CoreSession::recordFile(), reincarnate_protect(), rtp_common_read(), session_audio_callback(), setup_ringback(), SimpleGlobBase< SOCHAR >::SimpleGlobBase(), CoreSession::streamFile(), switch_apr_queue_create(), switch_ast2regex(), switch_buffer_create_dynamic(), switch_buffer_write(), switch_cache_db_execute_sql2str(), switch_cache_db_status(), switch_caller_profile_new(), switch_change_sln_volume_granular(), switch_channel_dequeue_dtmf_string(), switch_channel_expand_variables_check(), switch_channel_global_init(), switch_channel_set_timestamps(), switch_chromakey_autocolor(), switch_chromakey_clear_colors(), switch_config_close_file(), switch_config_open_file(), switch_console_loop(), switch_console_save_history(), switch_core_codec_add_video_implementation(), switch_core_codec_decode(), switch_core_codec_destroy(), switch_core_codec_init_with_bitrate(), switch_core_codec_parse_fmtp(), switch_core_gen_encoded_silence(), switch_core_get_stacksizes(), switch_core_hash_insert_alloc_destructor(), switch_core_init(), switch_core_measure_time(), switch_core_media_activate_rtp(), switch_core_media_bug_read(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_read_frame(), switch_core_memory_init(), switch_core_perform_alloc(), switch_core_perform_permanent_alloc(), switch_core_perform_session_alloc(), switch_core_session_clear_crypto(), switch_core_session_get_read_impl(), switch_core_session_get_video_read_impl(), switch_core_session_get_video_write_impl(), switch_core_session_get_write_impl(), switch_core_session_init(), switch_core_session_queue_indication(), switch_core_session_raw_read(), switch_core_session_read_frame(), switch_core_session_set_codec_slin(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_video_read_codec(), switch_core_session_write_frame(), switch_core_setrlimits(), switch_core_timer_destroy(), switch_core_timer_init(), switch_create_hashtable(), switch_dir_open(), switch_event_add_array(), switch_event_create_subclass_detailed(), switch_event_expand_headers_check(), switch_fd_read_dline(), switch_find_local_ip(), switch_fp_read_dline(), switch_g711a_decode(), switch_g711u_decode(), switch_generate_sln_silence(), switch_get_addr(), switch_img_fill(), switch_img_gray(), switch_img_sepia(), switch_img_write_text_img(), switch_ivr_digit_stream_new(), switch_ivr_digit_stream_parser_new(), switch_ivr_dmachine_check_match(), switch_ivr_dmachine_clear(), switch_ivr_gentones(), switch_ivr_menu_execute(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_read(), switch_ivr_record_file_event(), switch_ivr_set_json_chan_vars(), switch_ivr_set_xml_chan_var(), switch_ivr_speak_text(), switch_ivr_speak_text_handle(), switch_ivr_tone_detect_session(), switch_ivr_unbind_dtmf_meta_session(), switch_ivr_wait_for_answer(), switch_jb_set_jitter_estimator(), switch_load_core_config(), switch_load_network_lists(), switch_load_timezones(), switch_loadable_module_init(), switch_log_meta_vprintf(), SWITCH_MODULE_LOAD_FUNCTION(), switch_msrp_init(), switch_msrp_msg_create(), switch_msrp_msg_dup(), switch_nat_init(), switch_nat_multicast_runtime(), switch_odbc_handle_callback_exec_detailed(), switch_odbc_handle_new(), switch_packetizer_create(), switch_packetizer_feed(), switch_play_and_get_digits(), switch_rtp_add_crypto_key(), switch_rtp_change_interval(), switch_rtp_create(), switch_rtp_enable_vad(), switch_rtp_reset(), switch_rtp_udptl_mode(), switch_say_file_handle_create(), switch_separate_string(), switch_separate_string_cheap(), switch_socket_create_pollfd(), switch_speex_init(), switch_stream_spawn(), switch_stristr(), switch_system_fork(), switch_vad_init(), switch_xml_add_child(), switch_xml_locate_language(), switch_xml_new(), switch_xml_toxml_buf_ex(), system_thread(), teletone_init_session(), teletone_mux_tones(), teletone_run(), tm2switchtime(), tztime(), and write_displace_callback().
|
inlinestatic |
Definition at line 94 of file switch_bitpack.h.
References switch_bitpack_t::bits_cur, switch_bitpack_t::bytes, switch_bitpack_t::cur, switch_bitpack_t::mode, switch_bitpack_t::over, switch_assert, SWITCH_BITPACK_MODE_RFC3551, SWITCH_BITPACKED_MASKS, SWITCH_BITS_PER_BYTE, SWITCH_REVERSE_BITPACKED_MASKS, this_byte, switch_bitpack_t::this_byte, and switch_bitpack_t::under.
Referenced by DoxyDefine().
pack_check_over | ( | unpack | ) |
while | ( | unpack->bits_cur<= | SWITCH_BITS_PER_BYTE | ) |
Definition at line 167 of file switch_bitpack.h.
References switch_bitpack_t::bits_cur, switch_bitpack_t::bytes, switch_bitpack_t::cur, DoxyDefine(), switch_bitpack_t::frame_bits, switch_bitpack_t::mode, switch_bitpack_t::over, SWITCH_BITPACK_MODE_RFC3551, SWITCH_BITPACKED_MASKS, SWITCH_BITS_PER_BYTE, SWITCH_REVERSE_BITPACKED_MASKS, this_byte, switch_bitpack_t::this_byte, and switch_bitpack_t::under.
Referenced by switch_core_perform_file_open(), switch_xml_child(), switch_xml_locate_language(), and timesub().
switch_byte_t bitlen |
Definition at line 76 of file switch_bitpack.h.
unpack bits_cur = 0 |
Definition at line 161 of file switch_bitpack.h.
pack bits_tot = pack->frame_bits |
Definition at line 232 of file switch_bitpack.h.
pack buf = buf |
Definition at line 76 of file switch_bitpack.h.
Referenced by build_red_packet(), collect_thread_run(), do_dtls(), eavesdrop_callback(), ecd_deliver(), expand_vars(), find_delim(), get_addr(), get_addr6(), CoreSession::get_cb_args(), get_rtt_payload(), get_rtt_red_seq(), handle_ice(), ice_out(), inband_dtmf_generate_callback(), main(), merge_recording_variables(), msrp_parse_buffer(), msrp_reply(), msrp_report(), msrp_worker(), preprocess(), preprocess_exec(), read_displace_callback(), reincarnate_protect(), separate_string_blank_delim(), separate_string_blank_delim_cheap(), separate_string_char_delim(), separate_string_char_delim_cheap(), switch_amp_encode(), switch_channel_event_set_extended_data(), switch_console_complete(), switch_console_save_history(), switch_core_media_gen_local_sdp(), switch_core_media_read_frame(), switch_core_media_sdp_map(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_udptl_image_sdp(), switch_core_session_get_text_buffer(), switch_core_session_write_blank_video(), switch_core_speech_open(), switch_dir_next_file(), switch_escape_string_pool(), switch_event_serialize(), switch_false(), switch_fd_read_dline(), switch_fd_read_line(), switch_fp_read_dline(), switch_get_addr(), switch_ivr_eavesdrop_session(), switch_ivr_originate(), switch_known_bitrate(), switch_loadable_module_get_codecs_sorted(), switch_msrp_do_send(), switch_nat_multicast_runtime(), switch_network_port_range_to_string(), switch_parse_codec_buf(), switch_print_bits(), switch_print_host(), switch_say_file(), switch_separate_string_string(), switch_simple_email(), switch_speex_decode(), switch_speex_encode(), SWITCH_STANDARD_APP(), switch_strerror_r(), switch_string_has_escaped_data(), switch_stun_host_lookup(), switch_stun_lookup(), switch_stun_packet_attribute_add_controlled(), switch_stun_packet_attribute_add_controlling(), switch_stun_packet_build_header(), switch_url_encode_opt(), switch_uuid_format(), switch_uuid_str(), switch_vasprintf(), switch_xml_parse_section_string(), switch_xml_toxml_buf_ex(), teletone_handler(), video_bug_thread(), video_helper_thread(), video_write_thread(), vxprintf(), and write_displace_callback().
pack buflen = buflen |
Definition at line 76 of file switch_bitpack.h.
Referenced by CoreSession::get_cb_args(), switch_core_session_write_blank_video(), switch_false(), switch_ivr_originate(), switch_ivr_play_file(), switch_vasprintf(), switch_xml_toxml_buf_ex(), teletone_handler(), teletone_init_session(), video_bug_thread(), video_helper_thread(), and video_write_thread().
pack cur = pack->buf |
Definition at line 88 of file switch_bitpack.h.
Referenced by comp_callback(), preprocess(), switch_console_free_matches(), switch_core_file_seek(), switch_core_media_bug_remove_callback(), switch_core_media_bug_transfer_callback(), switch_core_remove_state_handler(), switch_dow_cmp(), switch_fd_read_dline(), switch_fd_read_line(), switch_fulldate_cmp(), switch_ivr_play_file(), switch_ivr_schedule_broadcast(), switch_ivr_schedule_transfer(), switch_live_array_clear(), switch_live_array_del(), switch_parse_codec_buf(), switch_tod_cmp(), switch_xml_cut(), switch_xml_insert(), and teletone_run().
else |
Definition at line 258 of file switch_bitpack.h.
pack frame_bits = bitlen |
Definition at line 85 of file switch_bitpack.h.
Definition at line 154 of file switch_bitpack.h.
Referenced by DoxyDefine(), switch_channel_expand_variables_check(), switch_cut_path(), switch_escape_char(), switch_event_expand_headers_check(), switch_simple_email(), switch_split_user_domain(), switch_strchr_strict(), switch_string_has_escaped_data(), switch_strip_commas(), and switch_strip_nonnumerics().
pack mode |
Definition at line 78 of file switch_bitpack.h.
Referenced by switch_speex_fmtp_parse(), and switch_speex_init().
return |
Definition at line 91 of file switch_bitpack.h.
|
static |
Definition at line 64 of file switch_bitpack.h.
Referenced by if(), pack_check_over(), and while().
|
static |
Definition at line 65 of file switch_bitpack.h.
Referenced by pack_check_over(), and while().
unpack this_byte = this_byte = in |
Definition at line 162 of file switch_bitpack.h.
Referenced by pack_check_over(), and while().