liblinphone 3.3.2
Functions

Controlling media parameters

Functions

void linphone_core_set_download_bandwidth (LinphoneCore *lc, int bw)
void linphone_core_set_upload_bandwidth (LinphoneCore *lc, int bw)
int linphone_core_get_download_bandwidth (const LinphoneCore *lc)
int linphone_core_get_upload_bandwidth (const LinphoneCore *lc)
int linphone_core_set_audio_codecs (LinphoneCore *lc, MSList *codecs)
int linphone_core_set_video_codecs (LinphoneCore *lc, MSList *codecs)
int linphone_core_get_audio_jittcomp (LinphoneCore *lc)
int linphone_core_get_nortp_timeout (const LinphoneCore *lc)
void linphone_core_set_audio_jittcomp (LinphoneCore *lc, int value)
void linphone_core_set_nortp_timeout (LinphoneCore *lc, int nortp_timeout)
bool_t linphone_core_get_use_info_for_dtmf (LinphoneCore *lc)
void linphone_core_set_use_info_for_dtmf (LinphoneCore *lc, bool_t use_info)
bool_t linphone_core_get_use_rfc2833_for_dtmf (LinphoneCore *lc)
void linphone_core_set_use_rfc2833_for_dtmf (LinphoneCore *lc, bool_t use_rfc2833)
int linphone_core_get_play_level (LinphoneCore *lc)
int linphone_core_get_ring_level (LinphoneCore *lc)
int linphone_core_get_rec_level (LinphoneCore *lc)
void linphone_core_set_ring_level (LinphoneCore *lc, int level)
void linphone_core_set_playback_gain_db (LinphoneCore *lc, float gaindb)
float linphone_core_get_playback_gain_db (LinphoneCore *lc)
void linphone_core_set_play_level (LinphoneCore *lc, int level)
void linphone_core_set_rec_level (LinphoneCore *lc, int level)
bool_t linphone_core_sound_device_can_capture (LinphoneCore *lc, const char *devid)
bool_t linphone_core_sound_device_can_playback (LinphoneCore *lc, const char *devid)
int linphone_core_set_ringer_device (LinphoneCore *lc, const char *devid)
int linphone_core_set_playback_device (LinphoneCore *lc, const char *devid)
int linphone_core_set_capture_device (LinphoneCore *lc, const char *devid)
const char * linphone_core_get_ringer_device (LinphoneCore *lc)
const char * linphone_core_get_playback_device (LinphoneCore *lc)
const char * linphone_core_get_capture_device (LinphoneCore *lc)
const char ** linphone_core_get_sound_devices (LinphoneCore *lc)
const char ** linphone_core_get_video_devices (const LinphoneCore *lc)
void linphone_core_set_ring (LinphoneCore *lc, const char *path)
const char * linphone_core_get_ring (const LinphoneCore *lc)
void linphone_core_set_ringback (LinphoneCore *lc, const char *path)
const char * linphone_core_get_ringback (const LinphoneCore *lc)
void linphone_core_enable_echo_cancellation (LinphoneCore *lc, bool_t val)
bool_t linphone_core_echo_cancellation_enabled (LinphoneCore *lc)
void linphone_core_mute_mic (LinphoneCore *lc, bool_t val)
void linphone_core_send_dtmf (LinphoneCore *lc, char dtmf)
void linphone_core_enable_video (LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled)
bool_t linphone_core_video_enabled (LinphoneCore *lc)
void linphone_core_enable_video_preview (LinphoneCore *lc, bool_t val)
bool_t linphone_core_video_preview_enabled (const LinphoneCore *lc)
void linphone_core_enable_self_view (LinphoneCore *lc, bool_t val)
bool_t linphone_core_self_view_enabled (const LinphoneCore *lc)
int linphone_core_set_video_device (LinphoneCore *lc, const char *id)
const char * linphone_core_get_video_device (const LinphoneCore *lc)
unsigned long linphone_core_get_native_video_window_id (const LinphoneCore *lc)
const MSVideoSizeDef * linphone_core_get_supported_video_sizes (LinphoneCore *lc)
void linphone_core_set_preferred_video_size (LinphoneCore *lc, MSVideoSize vsize)
void linphone_core_set_preferred_video_size_by_name (LinphoneCore *lc, const char *name)
MSVideoSize linphone_core_get_preferred_video_size (LinphoneCore *lc)
void linphone_core_set_download_ptime (LinphoneCore *lc, int ptime)
int linphone_core_get_download_ptime (LinphoneCore *lc)
bool_t linphone_core_is_mic_muted (LinphoneCore *lc)

Function Documentation

void linphone_core_set_download_bandwidth ( LinphoneCore *  lc,
int  bw 
)

Sets maximum available download bandwidth

This is IP bandwidth, in kbit/s. This information is used signaled to other parties during calls (within SDP messages) so that the remote end can have sufficient knowledge to properly configure its audio & video codec output bitrate to not overflow available bandwidth.

Parameters:
lcthe LinphoneCore object
bwthe bandwidth in kbits/s, 0 for infinite
void linphone_core_set_upload_bandwidth ( LinphoneCore *  lc,
int  bw 
)

Sets maximum available upload bandwidth

This is IP bandwidth, in kbit/s. This information is used by liblinphone together with remote side available bandwidth signaled in SDP messages to properly configure audio & video codec's output bitrate.

Parameters:
lcthe LinphoneCore object
bwthe bandwidth in kbits/s, 0 for infinite
int linphone_core_get_download_bandwidth ( const LinphoneCore *  lc)

Retrieve the maximum available download bandwidth.

This value was set by linphone_core_set_download_bandwidth().

int linphone_core_get_upload_bandwidth ( const LinphoneCore *  lc)

Retrieve the maximum available upload bandwidth.

This value was set by linphone_core_set_upload_bandwidth().

int linphone_core_set_audio_codecs ( LinphoneCore *  lc,
MSList *  codecs 
)

Sets the list of audio codecs.

The list is taken by the LinphoneCore thus the application should not free it. This list is made of struct PayloadType describing the codec parameters.

int linphone_core_set_video_codecs ( LinphoneCore *  lc,
MSList *  codecs 
)

Sets the list of video codecs.

The list is taken by the LinphoneCore thus the application should not free it. This list is made of struct PayloadType describing the codec parameters.

int linphone_core_get_audio_jittcomp ( LinphoneCore *  lc)

Returns the nominal jitter buffer size in milliseconds.

int linphone_core_get_nortp_timeout ( const LinphoneCore *  lc)

Returns the value in seconds of the no-rtp timeout.

When no RTP or RTCP packets have been received for a while LinphoneCore will consider the call is broken (remote end crashed or disconnected from the network), and thus will terminate the call. The no-rtp timeout is the duration above which the call is considered broken.

void linphone_core_set_audio_jittcomp ( LinphoneCore *  lc,
int  value 
)

Sets the nominal audio jitter buffer size in milliseconds.

void linphone_core_set_nortp_timeout ( LinphoneCore *  lc,
int  nortp_timeout 
)

Sets the no-rtp timeout value in seconds.

See linphone_core_get_nortp_timeout() for details.

bool_t linphone_core_get_use_info_for_dtmf ( LinphoneCore *  lc)

Indicates whether SIP INFO is used for sending digits.

void linphone_core_set_use_info_for_dtmf ( LinphoneCore *  lc,
bool_t  use_info 
)

Sets whether SIP INFO is to be used for sending digits.

bool_t linphone_core_get_use_rfc2833_for_dtmf ( LinphoneCore *  lc)

Indicates whether RFC2833 is used for sending digits.

void linphone_core_set_use_rfc2833_for_dtmf ( LinphoneCore *  lc,
bool_t  use_rfc2833 
)

Sets whether RFC2833 is to be used for sending digits.

int linphone_core_get_play_level ( LinphoneCore *  lc)

Get playback sound level in 0-100 scale.

int linphone_core_get_ring_level ( LinphoneCore *  lc)

Get ring sound level in 0-100 scale

int linphone_core_get_rec_level ( LinphoneCore *  lc)

Get sound capture level in 0-100 scale

void linphone_core_set_ring_level ( LinphoneCore *  lc,
int  level 
)

Set sound ring level in 0-100 scale

void linphone_core_set_playback_gain_db ( LinphoneCore *  lc,
float  gaindb 
)

Allow to control play level before entering sound card: gain in db

float linphone_core_get_playback_gain_db ( LinphoneCore *  lc)

Get playback gain in db before entering sound card.

void linphone_core_set_play_level ( LinphoneCore *  lc,
int  level 
)

Set sound playback level in 0-100 scale

void linphone_core_set_rec_level ( LinphoneCore *  lc,
int  level 
)

Set sound capture level in 0-100 scale

bool_t linphone_core_sound_device_can_capture ( LinphoneCore *  lc,
const char *  devid 
)

Returns true if the specified sound device can capture sound.

Parameters:
devidthe device name as returned by linphone_core_get_sound_devices()
bool_t linphone_core_sound_device_can_playback ( LinphoneCore *  lc,
const char *  devid 
)

Returns true if the specified sound device can play sound.

Parameters:
devidthe device name as returned by linphone_core_get_sound_devices()
int linphone_core_set_ringer_device ( LinphoneCore *  lc,
const char *  devid 
)

Sets the sound device used for ringing.

Parameters:
devidthe device name as returned by linphone_core_get_sound_devices()
int linphone_core_set_playback_device ( LinphoneCore *  lc,
const char *  devid 
)

Sets the sound device used for playback.

Parameters:
devidthe device name as returned by linphone_core_get_sound_devices()
int linphone_core_set_capture_device ( LinphoneCore *  lc,
const char *  devid 
)

Sets the sound device used for capture.

Parameters:
devidthe device name as returned by linphone_core_get_sound_devices()
const char* linphone_core_get_ringer_device ( LinphoneCore *  lc)

Returns the name of the currently assigned sound device for ringing.

const char* linphone_core_get_playback_device ( LinphoneCore *  lc)

Returns the name of the currently assigned sound device for playback.

const char* linphone_core_get_capture_device ( LinphoneCore *  lc)

Returns the name of the currently assigned sound device for capture.

const char** linphone_core_get_sound_devices ( LinphoneCore *  lc)

Returns an unmodifiable array of available sound devices.

The array is NULL terminated.

const char** linphone_core_get_video_devices ( const LinphoneCore *  lc)

Returns an unmodifiable array of available video capture devices.

The array is NULL terminated.

void linphone_core_set_ring ( LinphoneCore *  lc,
const char *  path 
)

Sets the path to a wav file used for ringing.

The file must be a wav 16bit linear.

const char* linphone_core_get_ring ( const LinphoneCore *  lc)

Returns the path to the wav file used for ringing.

void linphone_core_set_ringback ( LinphoneCore *  lc,
const char *  path 
)

Sets the path to a wav file used for ringing back.

Ringback means the ring that is heard when it's ringing at the remote party. The file must be a wav 16bit linear.

const char* linphone_core_get_ringback ( const LinphoneCore *  lc)

Returns the path to the wav file used for ringing back.

void linphone_core_enable_echo_cancellation ( LinphoneCore *  lc,
bool_t  val 
)

Enables or disable echo cancellation.

bool_t linphone_core_echo_cancellation_enabled ( LinphoneCore *  lc)

Returns TRUE if echo cancellation is enabled.

void linphone_core_mute_mic ( LinphoneCore *  lc,
bool_t  val 
)

Mutes or unmutes the local microphone.

void linphone_core_send_dtmf ( LinphoneCore *  lc,
char  dtmf 
)

Send the specified dtmf.

This function only works during calls. The dtmf is automatically played to the user.

Parameters:
lcThe LinphoneCore object
dtmfThe dtmf name specified as a char, such as '0', '#' etc...
void linphone_core_enable_video ( LinphoneCore *  lc,
bool_t  vcap_enabled,
bool_t  display_enabled 
)

Enables video globally.

This function does not have any effect during calls. It just indicates LinphoneCore to initiate future calls with video or not. The two boolean parameters indicate in which direction video is enabled. Setting both to false disables video entirely.

Parameters:
vcap_enabledindicates whether video capture is enabled
display_enabledindicates whether video display should be shown
bool_t linphone_core_video_enabled ( LinphoneCore *  lc)

Returns TRUE if video is enabled, FALSE otherwise.

void linphone_core_enable_video_preview ( LinphoneCore *  lc,
bool_t  val 
)

Controls video preview enablement.

Video preview refers to the action of displaying the local webcam image to the user while not in call.

bool_t linphone_core_video_preview_enabled ( const LinphoneCore *  lc)

Returns TRUE if video previewing is enabled.

void linphone_core_enable_self_view ( LinphoneCore *  lc,
bool_t  val 
)

Enables or disable self view during calls.

Self-view refers to having local webcam image inserted in corner of the video window during calls. This function works at any time, including during calls.

bool_t linphone_core_self_view_enabled ( const LinphoneCore *  lc)

Returns TRUE if self-view is enabled, FALSE otherwise.

Refer to linphone_core_enable_self_view() for details.

int linphone_core_set_video_device ( LinphoneCore *  lc,
const char *  id 
)

Sets the active video device.

Parameters:
idthe name of the video device as returned by linphone_core_get_video_devices()
const char* linphone_core_get_video_device ( const LinphoneCore *  lc)

Returns the name of the currently active video device.

unsigned long linphone_core_get_native_video_window_id ( const LinphoneCore *  lc)

Returns the native window handle of the video window, casted as an unsigned long.

const MSVideoSizeDef* linphone_core_get_supported_video_sizes ( LinphoneCore *  lc)

Returns the zero terminated table of supported video resolutions.

void linphone_core_set_preferred_video_size ( LinphoneCore *  lc,
MSVideoSize  vsize 
)

Sets the preferred video size.

This applies only to the stream that is captured and sent to the remote party, since we accept all standard video size on the receive path.

void linphone_core_set_preferred_video_size_by_name ( LinphoneCore *  lc,
const char *  name 
)

Sets the preferred video size by its name.

This is identical to linphone_core_set_preferred_video_size() except that it takes the name of the video resolution as input. Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...

MSVideoSize linphone_core_get_preferred_video_size ( LinphoneCore *  lc)

Returns the current preferred video size for sending.

void linphone_core_set_download_ptime ( LinphoneCore *  lc,
int  ptime 
)

set audio packetization time linphone expect to received from peer

int linphone_core_get_download_ptime ( LinphoneCore *  lc)

get audio packetization time linphone expect to received from peer, 0 means unspecified

bool_t linphone_core_is_mic_muted ( LinphoneCore *  lc)

return mic state.