amsip init interface
[General purpose API.]


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 ()
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 (char *outbound)
int am_option_enable_keepalive (int interval)
int am_option_set_audio_profile (char *profile)
int am_option_set_video_profile (char *profile)
int am_option_set_text_profile (char *profile)
int am_option_set_udpftp_profile (char *profile)
int am_option_enable_101 (int enable)
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_half_duplex (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_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_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_input_video_size (int width, int height)
int am_option_set_window_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_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 ELController, float capture_threshold, float capture_speed, float capture_force, float playback_threshold, float playback_speed, float playback_force)
int am_option_geteventsocket (void)

Function Documentation

int am_init ( const char *  name,
int  debug_level 
)

Initialize amsip library

Parameters:
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

Parameters:
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.

Parameters:
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 (  ) 

Get amsip version.

int am_option_set_user_agent ( const char *  user_agent  ) 

Configure amsip to use User-Agent header value.

Parameters:
user_agent User-Agent header.

int am_option_set_initial_audio_port ( int  initial_port  ) 

Configure amsip to use a specific audio port.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
ipv4_for_gateway specific IP to reach.

int am_option_enable_rport ( int  enable  ) 

Configure amsip to add "rport" parameter.

Parameters:
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.

Parameters:
dns_capabilities 0, 1 or 2

int am_option_enable_outbound_proxy ( char *  outbound  ) 

Configure amsip to use an outbound proxy (PLEASE DO NOT USE)

Parameters:
outbound proxy parameter.

int am_option_enable_keepalive ( int  interval  ) 

Configure amsip to send empty UDP packets to keep alive binding behind NATs

Parameters:
interval 0: disable X: interval in ms between each UDP packets (default: 25000)

int am_option_set_audio_profile ( char *  profile  ) 

Configure amsip to enable SRTP profile.

Parameters:
profile profile string (RTP/AVP or RTP/SAVP)

int am_option_set_video_profile ( char *  profile  ) 

Configure amsip to enable SRTP profile.

Parameters:
profile profile string (RTP/AVP or RTP/SAVP)

int am_option_set_text_profile ( char *  profile  ) 

Configure amsip to enable SRTP profile.

Parameters:
profile profile string (RTP/AVP or RTP/SAVP)

int am_option_set_udpftp_profile ( char *  profile  ) 

Configure amsip to enable SRTP profile.

Parameters:
profile profile string (RTP/AVP or RTP/SAVP)

int am_option_enable_101 ( int  enable  ) 

Configure amsip to send 101

Parameters:
enable 0: disable 1: enable

int am_option_enable_sdp_in_ack ( int  enable  ) 

Configure amsip to put SDP in ACK

Parameters:
enable 0: disable 1: enable

int am_option_enable_symmetric_rtp ( int  enable  ) 

Configure amsip to use symmetric RTP for streaming

Parameters:
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);

Parameters:
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);

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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.

Parameters:
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_half_duplex ( int  enable,
int  vad_prob_start,
int  vad_prob_continue 
)

Configure amsip to enable or disable echo canceller. Please refer to speex documentation for values.

Parameters:
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.

Parameters:
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.

Parameters:
realm SIP realm on server.
login SIP login on server.
passwd SIP password on server.

int am_option_load_plugins ( const char *  directory  ) 

Configure amsip to read mediastreamer2 plugins from a specific directory.

Parameters:
directory directory on host.

int am_option_enable_optionnal_encryption ( int  optionnal_encryption  ) 

Configure amsip to suppport optionnal encryption (using RTP/AVP).

Parameters:
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.

Parameters:
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 (default is 0x2e).

Parameters:
dscp_value DSCP value to use in RTP streams.

int am_option_add_dns_cache ( const char *  host,
const char *  ip 
)

Configure amsip to resolv host argument to this IP.

Parameters:
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.

Parameters:
supported_extensions list of supported extensions.

int am_option_set_accepted_types ( const char *  accepted_types  ) 

Configure amsip to accept those content-types.

Parameters:
accepted_types list of accepted types.

int am_option_set_allowed_methods ( const char *  allowed_methods  ) 

Configure amsip to support those METHODS.

Parameters:
allowed_methods list of supported METHODS.

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

Parameters:
handle handle of a window.
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

Parameters:
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.

Parameters:
enable open or close preview.

int am_option_enable_preview ( int  enable  ) 

Configure amsip to start/stop video preview.

Parameters:
enable open or close preview.

int am_option_set_rate ( int  rate  ) 

Configure amsip to use 16kHz internally and allow wideband codecs.

Parameters:
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.

Parameters:
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

Parameters:
capture_gain Linear amplification to recorded signal.
playback_gain Linear amplification to plback signal.

int am_option_set_echo_limitation ( int  ELController,
float  capture_threshold,
float  capture_speed,
float  capture_force,
float  playback_threshold,
float  playback_speed,
float  playback_force 
)

Set Echo Limiter with capture and playback parameters.

Parameters:
ELController 0: Disabled, 1:MIC Controlled, 2:Speaker Controlled.
capture_threshold threshold parameter for capture.
capture_speed speed parameter for capture.
capture_force force parameter for capture.
playback_threshold threshold parameter for playback.
playback_speed speed parameter for playback.
playback_force force parameter for playback.

int am_option_geteventsocket ( void   ) 

Retreive a socket where data is written when a eXosip_event is available in amsip/eXosip2 fifo.


Generated on Tue Jun 16 19:18:37 2009 for libamsip by  doxygen 1.5.9