|
libamsip 4.6.0
|
Data Structures | |
| struct | am_audio_stats |
Functions | |
| int | am_init (const char *name, int debug_level) |
| int | am_reset (const char *name, int debug_level) |
| int | am_option_debug (const char *log_file, int debug_level) |
| int | am_quit (void) |
| char * | am_option_get_version (void) |
| int | am_option_set_option (int opt, void *arg) |
| int | am_option_set_user_agent (const char *user_agent) |
| int | am_option_set_initial_audio_port (int initial_port) |
| int | am_option_enable_stun_server (const char *stun_server, int use_stun_server) |
| int | am_option_enable_turn_server (const char *turn_server, int use_turn_server) |
| int | am_option_enable_relay_server (const char *relay_server, int use_relay_server) |
| int | am_option_set_ipv4_for_gateway (const char *ipv4_for_gateway) |
| int | am_option_enable_rport (int enable) |
| int | am_option_set_dns_capabilities (int dns_capabilities) |
| int | am_option_enable_outbound_proxy (const char *outbound) |
| int | am_option_enable_keepalive (int interval) |
| int | am_option_set_audio_profile (const char *profile) |
| int | am_option_set_video_profile (const char *profile) |
| int | am_option_set_text_profile (const char *profile) |
| int | am_option_set_udpftp_profile (const char *profile) |
| int | am_option_enable_101 (int enable) |
| int | am_option_enable_session_timers (int session_expires) |
| int | am_option_enable_sdp_in_ack (int enable) |
| int | am_option_enable_symmetric_rtp (int enable) |
| int | am_option_find_out_sound_card (struct am_sndcard *sndcard) |
| int | am_option_find_in_sound_card (struct am_sndcard *sndcard) |
| int | am_option_select_in_sound_card (int card) |
| int | am_option_select_out_sound_card (int card) |
| int | am_option_select_in_custom_sound_card (MSSndCard *captcard) |
| int | am_option_select_out_custom_sound_card (MSSndCard *playcard) |
| int | am_option_set_volume_out_sound_card (int card, int mixer, int percent) |
| int | am_option_get_volume_out_sound_card (int card, int mixer) |
| int | am_option_set_volume_in_sound_card (int card, int percent) |
| int | am_option_get_volume_in_sound_card (int card) |
| int | am_option_set_mute_out_sound_card (int card, int mixer, int val) |
| int | am_option_set_mute_in_sound_card (int card, int val) |
| int | am_option_enable_echo_canceller (int enable, int frame_size, int tail_length) |
| int | am_option_enable_vad (int enable, int vad_prob_start, int vad_prob_continue) |
| int | am_option_enable_agc (int enable, int agc_level, int max_gain) |
| int | am_option_set_password (const char *realm, const char *login, const char *passwd) |
| int | am_option_set_password_for_username (const char *from_username, const char *realm, const char *login, const char *passwd) |
| int | am_option_remove_password (void) |
| int | am_option_load_plugins (const char *directory) |
| int | am_option_enable_optionnal_encryption (int optionnal_encryption) |
| int | am_option_add_nortpproxy (int add_nortpproxy) |
| int | am_option_set_dscp_value (int dscp_value) |
| int | am_option_set_sip_dscp (int dscp_value) |
| int | am_option_set_audio_dscp (int dscp_value) |
| int | am_option_set_video_dscp (int dscp_value) |
| int | am_option_set_text_dscp (int dscp_value) |
| int | am_option_set_udpftp_dscp (int dscp_value) |
| int | am_option_add_dns_cache (const char *host, const char *ip) |
| int | am_option_set_supported_extensions (const char *supported_extensions) |
| int | am_option_set_accepted_types (const char *accepted_types) |
| int | am_option_set_allowed_methods (const char *allowed_methods) |
| int | am_option_set_allowed_events (const char *allowed_events) |
| int | am_option_set_input_video_size (int width, int height) |
| int | am_option_set_window_display (MSDisplayDesc *desc, long handle, int width, int height) |
| int | am_option_set_window_handle (long handle, int width, int height) |
| int | am_option_set_window_preview_handle (long handle, int width, int height) |
| int | am_option_set_nowebcam (const char *nowebcam_image) |
| int | am_option_enable_preview (int enable) |
| int | am_option_set_image_callback (on_video_module_new_image_cb func) |
| int | am_option_set_rate (int rate) |
| int | am_option_set_callback (unsigned int id, MSFilterNotifyFunc speex_pp_process, void *userdata) |
| int | am_option_set_volume_gain (float capture_gain, float playback_gain) |
| int | am_option_set_echo_limitation (int enabled, float threshold, float speed, float force, int sustain) |
| int | am_option_set_noise_gate_threshold (int enabled, float threshold) |
| int | am_option_set_equalizer_state (int enable) |
| int | am_option_set_equalizer_params (float freq, float gain, float width) |
| int | am_option_set_mic_equalizer_state (int enable) |
| int | am_option_set_mic_equalizer_params (float freq, float gain, float width) |
| int | am_option_geteventsocket (void) |
| int am_init | ( | const char * | name, |
| int | debug_level | ||
| ) |
Initialize amsip library
| name | Text information for logging. (like vendor id) |
| debug_level | Debug level for application. |
| int am_reset | ( | const char * | name, |
| int | debug_level | ||
| ) |
Reset amsip library
| name | Text information for logging. (like vendor id) |
| debug_level | Debug level for application. |
| int am_option_debug | ( | const char * | log_file, |
| int | debug_level | ||
| ) |
Initialize log facility of library This method MUST be called only ONCE.
| log_file | File name for debugging |
| debug_level | Debug level for application. |
| int am_quit | ( | void | ) |
Close amsip library & release ressource.
| char* am_option_get_version | ( | void | ) |
Get amsip version.
| int am_option_set_option | ( | int | opt, |
| void * | arg | ||
| ) |
Configure amsip options.
| opt | option. |
| arg | pointer to option value. |
| int am_option_set_user_agent | ( | const char * | user_agent | ) |
Configure amsip to use User-Agent header value.
| user_agent | User-Agent header. |
| int am_option_set_initial_audio_port | ( | int | initial_port | ) |
Configure amsip to use a specific audio port.
| initial_port | initial audio port. |
| int am_option_enable_stun_server | ( | const char * | stun_server, |
| int | use_stun_server | ||
| ) |
Configure amsip to use stun server.
| stun_server | IP of stun server. |
| use_stun_server | enable use of stun server |
| int am_option_enable_turn_server | ( | const char * | turn_server, |
| int | use_turn_server | ||
| ) |
Configure amsip to use stun server. INCOMPLETE: the server MUST be actually a STUN server, this options currently ask for enabling STUN connectivity checks and candidates handling in SDP.
This is currently used to use ICE without TURN/relay server: Only STUN and LOCAL candidates.
| turn_server | IP of stun server. |
| use_turn_server | enable use of stun server |
| int am_option_enable_relay_server | ( | const char * | relay_server, |
| int | use_relay_server | ||
| ) |
Configure amsip to use turn server for relay.
EXPERIMENTAL: support for a real TURN server.
| relay_server | IP of relay (turn) server. |
| use_relay_server | enable use of relay server |
| int am_option_set_ipv4_for_gateway | ( | const char * | ipv4_for_gateway | ) |
Configure amsip to detect interface with a specific IP to reach. This method will have an impact on the IP put in the Via header, Contact header, and in the SDP connection address.
| ipv4_for_gateway | specific IP to reach. |
| int am_option_enable_rport | ( | int | enable | ) |
Configure amsip to add "rport" parameter.
| enable | 0: disable 1: enable |
| int am_option_set_dns_capabilities | ( | int | dns_capabilities | ) |
Configure amsip and DNS capabilities:
use '2' for NAPTR+SRV support. use '1' for SRV support. use '0' for neither NAPTR nor SRV.
| dns_capabilities | 0, 1 or 2 |
| int am_option_enable_outbound_proxy | ( | const char * | outbound | ) |
Configure amsip to use an outbound proxy (PLEASE DO NOT USE)
| outbound | proxy parameter. |
| int am_option_enable_keepalive | ( | int | interval | ) |
Configure amsip to send empty UDP packets to keep alive binding behind NATs
| interval | 0: disable X: interval in ms between each UDP packets (default: 25000) |
| int am_option_set_audio_profile | ( | const char * | profile | ) |
Configure amsip to enable SRTP profile.
| profile | profile string (RTP/AVP or RTP/SAVP) |
| int am_option_set_video_profile | ( | const char * | profile | ) |
Configure amsip to enable SRTP profile.
| profile | profile string (RTP/AVP or RTP/SAVP) |
| int am_option_set_text_profile | ( | const char * | profile | ) |
Configure amsip to enable SRTP profile.
| profile | profile string (RTP/AVP or RTP/SAVP) |
| int am_option_set_udpftp_profile | ( | const char * | profile | ) |
Configure amsip to enable SRTP profile.
| profile | profile string (RTP/AVP or RTP/SAVP) |
| int am_option_enable_101 | ( | int | enable | ) |
Configure amsip to send 101
| enable | 0: disable 1: enable |
| int am_option_enable_session_timers | ( | int | session_expires | ) |
Configure amsip to enable session timer and set expiration interval
| session_expires | 0: disable >0: set expiration interval |
| int am_option_enable_sdp_in_ack | ( | int | enable | ) |
Configure amsip to put SDP in ACK
| enable | 0: disable 1: enable |
| int am_option_enable_symmetric_rtp | ( | int | enable | ) |
Configure amsip to use symmetric RTP for streaming
| enable | 0: disable 1: enable |
| int am_option_find_out_sound_card | ( | struct am_sndcard * | sndcard | ) |
Retreive card name from id number: sndcard.card = 0; am_option_find_out_sound_card(&sndcard);
| card | -1: default 0 to N: for selecting audio input |
| int am_option_find_in_sound_card | ( | struct am_sndcard * | sndcard | ) |
Retreive card name from id number: sndcard.card = 0; am_option_find_in_sound_card(&sndcard);
| card | -1: default 0 to N: for selecting audio input |
| int am_option_select_in_sound_card | ( | int | card | ) |
Configure amsip to use a specific audio card for recording audio
| card | -1: default 0 to N: for selecting audio input |
| int am_option_select_out_sound_card | ( | int | card | ) |
Configure amsip to use a specific audio card for playing audio
| card | -1: default 0 to N: for selecting audio output |
| int am_option_select_in_custom_sound_card | ( | MSSndCard * | captcard | ) |
Configure amsip to use a specific audio card for recording audio
| captcard | MSSndCard object pointer |
| int am_option_select_out_custom_sound_card | ( | MSSndCard * | playcard | ) |
Configure amsip to use a specific audio card for playing audio
| playcard | MSSndCard object pointer |
| int am_option_set_volume_out_sound_card | ( | int | card, |
| int | mixer, | ||
| int | percent | ||
| ) |
Configure amsip to set volume of playback card
| card | -1: default 0 to N: for selecting audio output |
| mixer | 0: master, 1: playback |
| percent | 0: no volume, 100: maximum volume |
| int am_option_get_volume_out_sound_card | ( | int | card, |
| int | mixer | ||
| ) |
Configure amsip to get volume of playback card
| card | -1: default 0 to N: for selecting audio output |
| mixer | 0: master, 1: playback |
| int am_option_set_volume_in_sound_card | ( | int | card, |
| int | percent | ||
| ) |
Configure amsip to set volume of capture card
| card | -1: default 0 to N: for selecting audio input |
| percent | 0: no volume, 100: maximum volume |
| int am_option_get_volume_in_sound_card | ( | int | card | ) |
Configure amsip to get volume of capture card
| card | -1: default 0 to N: for selecting audio input |
| int am_option_set_mute_out_sound_card | ( | int | card, |
| int | mixer, | ||
| int | val | ||
| ) |
Configure amsip to mute/unmute playback card
| card | -1: default 0 to N: for selecting audio output |
| mixer | 0: mixer, 1: playback |
| val | 0: unmute, 1: mute |
| int am_option_set_mute_in_sound_card | ( | int | card, |
| int | val | ||
| ) |
Configure amsip to mute/unmute capture card
| card | -1: default 0 to N: for selecting audio output |
| val | 0: unmute, 1: mute |
| int am_option_enable_echo_canceller | ( | int | enable, |
| int | frame_size, | ||
| int | tail_length | ||
| ) |
Configure amsip to enable or disable echo canceller.
| enable | 0 to disable, 1 to enable |
| frame_size | frame size for echo canceller (should be 128 or 160) |
| tail_length | tail_length for echo canceller (should be 2048 or 4096) |
| int am_option_enable_vad | ( | int | enable, |
| int | vad_prob_start, | ||
| int | vad_prob_continue | ||
| ) |
Configure amsip to enable or disable internal VAD -used to discard silence packets upon buffer overflow-. Please refer to speex documentation for values.
| enable | 0 to disable, 1 to enable |
| vad_prob_start | value for speex VAD_PROB_START (between 0 and 100) |
| vad_prob_continue | value for speex VAD_PROB_CONTINUE (between 0 and 100) |
| int am_option_enable_agc | ( | int | enable, |
| int | agc_level, | ||
| int | max_gain | ||
| ) |
Configure amsip to use AGC on MIC input. Please refer to speex documentation for values.
| enable | 0 to disable, 1 to enable |
| agc_level | value for speex AGC_LEVEL |
| max_gain | value for speex MAX_GAIN |
| int am_option_set_password | ( | const char * | realm, |
| const char * | login, | ||
| const char * | passwd | ||
| ) |
Configure amsip to add new SĪP realm/login/password entry.
| realm | SIP realm on server. |
| login | SIP login on server. |
| passwd | SIP password on server. |
| int am_option_set_password_for_username | ( | const char * | from_username, |
| const char * | realm, | ||
| const char * | login, | ||
| const char * | passwd | ||
| ) |
Configure amsip to add new SĪP realm/login/password entry.
| from_username | SIP username which appears in From headers. |
| realm | SIP realm on server. |
| login | SIP login on server. |
| passwd | SIP password on server. |
| int am_option_remove_password | ( | void | ) |
Configure amsip to remove all previous SIP realm/login/password entries.
| int am_option_load_plugins | ( | const char * | directory | ) |
Configure amsip to read mediastreamer2 plugins from a specific directory.
| directory | directory on host. |
| int am_option_enable_optionnal_encryption | ( | int | optionnal_encryption | ) |
Configure amsip to suppport optionnal encryption (using RTP/AVP).
| optionnal_encryption | 0 to disable, 1 to enable. |
| int am_option_add_nortpproxy | ( | int | add_nortpproxy | ) |
Configure amsip to add a=nortpproxy attribute in SDP.
| add_nortpproxy | 0 to not add, 1 to add the attribute. |
| int am_option_set_dscp_value | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in RTP streams. DEPRECATED: use instead: am_option_set_audio_dscp am_option_set_video_dscp am_option_set_text_dscp am_option_set_udpftp_dscp
| dscp_value | DSCP value to use in RTP streams. |
| int am_option_set_sip_dscp | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in SIP streams. Note: may not work on windows platform.
| dscp_value | DSCP value to use in SIP streams. |
| int am_option_set_audio_dscp | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in audio RTP streams (default is 0x38).
| dscp_value | DSCP value to use in audio RTP streams. |
| int am_option_set_video_dscp | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in video RTP streams (default is 0x28).
| dscp_value | DSCP value to use in video RTP streams. |
| int am_option_set_text_dscp | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in text RTP streams (default is 0x38).
| dscp_value | DSCP value to use in text RTP streams. |
| int am_option_set_udpftp_dscp | ( | int | dscp_value | ) |
Configure amsip to use a specific DSCP value in udpftp RTP streams (default is 0x28).
| dscp_value | DSCP value to use in udpftp RTP streams. |
| int am_option_add_dns_cache | ( | const char * | host, |
| const char * | ip | ||
| ) |
Configure amsip to resolv host argument to this IP.
| host | host that will be resolved to ip. |
| ip | ip for resolution of host. |
| int am_option_set_supported_extensions | ( | const char * | supported_extensions | ) |
Configure amsip to support those extensions. Supported header will be added in OPTIONS and request/response initiating dialogs and REGISTER.
| supported_extensions | list of supported extensions. |
| int am_option_set_accepted_types | ( | const char * | accepted_types | ) |
Configure amsip to accept those content-types. Accepted header will be added in OPTIONS
| accepted_types | list of accepted types. |
| int am_option_set_allowed_methods | ( | const char * | allowed_methods | ) |
Configure amsip to support those METHODS. Allow header will be added in OPTIONS and request/response initiating dialogs.
| allowed_methods | list of supported METHODS. |
| int am_option_set_allowed_events | ( | const char * | allowed_events | ) |
Configure amsip to support those Events. Allow-events header will be added in OPTIONS and request/response initiating dialogs and in REGISTER.
| allowed_methods | list of supported Events. |
| int am_option_set_input_video_size | ( | int | width, |
| int | height | ||
| ) |
Configure amsip to TRY to open webcam using the specified size. WINDOWS PLATFORM ONLY
| handle | handle of a window. |
| width | width size of window. |
| height | height size of window. |
| int am_option_set_window_display | ( | MSDisplayDesc * | desc, |
| long | handle, | ||
| int | width, | ||
| int | height | ||
| ) |
Configure amsip to output video on this windows.
| desc | Display plugin description |
| handle | handle of a window. (native windows only) |
| width | width size of window. |
| height | height size of window. |
| int am_option_set_window_handle | ( | long | handle, |
| int | width, | ||
| int | height | ||
| ) |
Configure amsip to output video on this windows. handle is set on WINDOWS PLATFORM ONLY
| handle | handle of a window. |
| width | width size of window. |
| height | height size of window. |
| int am_option_set_window_preview_handle | ( | long | handle, |
| int | width, | ||
| int | height | ||
| ) |
Configure amsip to output video preview on this windows. ** NOT IMPLEMENTED IN AMSIP, video preview is inserted inside main view**
| handle | handle of a window. |
| width | width size of window. |
| height | height size of window. |
| int am_option_set_nowebcam | ( | const char * | nowebcam_image | ) |
Configure amsip to use this image when no webcam is used.
| enable | open or close preview. |
| int am_option_enable_preview | ( | int | enable | ) |
Configure amsip to start/stop video preview.
| enable | open or close preview. |
| int am_option_set_image_callback | ( | on_video_module_new_image_cb | func | ) |
Configure amsip to provide images to application via a callback.
| func | the callback |
| int am_option_set_rate | ( | int | rate | ) |
Configure amsip to use 16kHz internally and allow wideband codecs.
| rate | internal rate to use. |
| int am_option_set_callback | ( | unsigned int | id, |
| MSFilterNotifyFunc | speex_pp_process, | ||
| void * | userdata | ||
| ) |
Set callback to analyse mic/speaker signal.
| speex_pp_process | Callback. |
| int am_option_set_volume_gain | ( | float | capture_gain, |
| float | playback_gain | ||
| ) |
Set capture and playback amplification.
1 -> no change >1 -> amplify volume <1 -> decrease volume
| capture_gain | Linear amplification to recorded signal. |
| playback_gain | Linear amplification to plback signal. |
| int am_option_set_echo_limitation | ( | int | enabled, |
| float | threshold, | ||
| float | speed, | ||
| float | force, | ||
| int | sustain | ||
| ) |
Activate and Set Echo Limiter with parameters.
| enabled | 0 disabled / 1 enabled. |
| threshold | threshold parameter for capture. |
| speed | speed parameter for capture. |
| force | force parameter for capture. |
| sustain | delay (ms) for which e.l. remains active after resuming from speech to silence. |
| int am_option_set_noise_gate_threshold | ( | int | enabled, |
| float | threshold | ||
| ) |
Activate and set noise gate parameter for Echo Limiter.
| enabled | 0 disabled / 1 enabled. |
| threshold | threshold parameter. |
| int am_option_set_equalizer_state | ( | int | enable | ) |
Enable equalizer to control gain on some specific frequency.
| enable | 0: Disabled, 1: Enabled |
| int am_option_set_equalizer_params | ( | float | freq, |
| float | gain, | ||
| float | width | ||
| ) |
Set equalizer parameter for a specific frequency.
| freq | frequency. |
| gain | gain to apply to frequency. |
| width | width. |
| int am_option_set_mic_equalizer_state | ( | int | enable | ) |
Enable equalizer to control gain on some specific frequency (on microphone side).
| enable | 0: Disabled, 1: Enabled |
| int am_option_set_mic_equalizer_params | ( | float | freq, |
| float | gain, | ||
| float | width | ||
| ) |
Set equalizer parameter for a specific frequency (on microphone side).
| freq | frequency. |
| gain | gain to apply to frequency. |
| width | width. |
| int am_option_geteventsocket | ( | void | ) |
Retreive a socket where data is written when a eXosip_event is available in amsip/eXosip2 fifo.
1.7.3