mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Merge branch 'master' of git.savannah.nongnu.org:/srv/git/linphone
This commit is contained in:
commit
95f0b3f96e
5 changed files with 62 additions and 14 deletions
|
|
@ -83,6 +83,7 @@ static int lpc_cmd_acodec(LinphoneCore *lc, char *args);
|
|||
static int lpc_cmd_vcodec(LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_codec(int type, LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_pause(LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_resume(LinphoneCore *lc, char *args);
|
||||
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args);
|
||||
|
|
@ -269,6 +270,10 @@ static LPC_COMMAND advanced_commands[] = {
|
|||
"'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
|
||||
"'ec off' : turn echo cancellation (EC) off\n"
|
||||
"'ec show' : show EC status" },
|
||||
{ "el", lpc_cmd_echolimiter, "Echo limiter",
|
||||
"'el on turns on echo limiter (automatic half duplex, for cases where echo canceller cannot work)\n"
|
||||
"'el off' : turn echo limiter off\n"
|
||||
"'el show' : show echo limiter status" },
|
||||
{ "nortp-on-audio-mute", lpc_cmd_rtp_no_xmit_on_audio_mute,
|
||||
"Set the rtp_no_xmit_on_audio_mute configuration parameter",
|
||||
" If set to 1 then rtp transmission will be muted when\n"
|
||||
|
|
@ -2210,6 +2215,18 @@ static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args){
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args){
|
||||
if (args){
|
||||
if (strcmp(args,"on")==0){
|
||||
linphone_core_enable_echo_limiter (lc,TRUE);
|
||||
}else if (strcmp(args,"off")==0){
|
||||
linphone_core_enable_echo_limiter (lc,FALSE);
|
||||
}
|
||||
}
|
||||
linphonec_out("Echo limiter is now %s.\n",linphone_core_echo_limiter_enabled (lc) ? "on":"off");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args)
|
||||
{
|
||||
linphone_core_mute_mic(lc, 1);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#endif /*_WIN32_WCE*/
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <linphonecore.h>
|
||||
|
||||
|
|
@ -162,6 +163,7 @@ static char *logfile_name = NULL;
|
|||
static char configfile_name[PATH_MAX];
|
||||
static const char *factory_configfile_name=NULL;
|
||||
static char *sipAddr = NULL; /* for autocall */
|
||||
static int window_id = 0; /* 0=standalone window, or window id for embedding video */
|
||||
#if !defined(_WIN32_WCE)
|
||||
static ortp_pipe_t client_sock=ORTP_PIPE_INVALID;
|
||||
#endif /*_WIN32_WCE*/
|
||||
|
|
@ -391,7 +393,7 @@ static void
|
|||
linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
|
||||
const LinphoneAddress *from, const char *msg)
|
||||
{
|
||||
printf("%s: %s\n", linphone_address_as_string(from), msg);
|
||||
linphonec_out("Message received from %s: %s\n", linphone_address_as_string(from), msg);
|
||||
// TODO: provide mechanism for answering.. ('say' command?)
|
||||
}
|
||||
|
||||
|
|
@ -716,6 +718,12 @@ linphonec_init(int argc, char **argv)
|
|||
*/
|
||||
linphonec=linphone_core_new (&linphonec_vtable, configfile_name, factory_configfile_name, NULL);
|
||||
linphone_core_enable_video(linphonec,vcap_enabled,display_enabled);
|
||||
if (display_enabled && window_id != 0)
|
||||
{
|
||||
printf ("Setting window_id: 0x%x\n", window_id);
|
||||
linphone_core_set_native_video_window_id(linphonec,window_id);
|
||||
}
|
||||
|
||||
linphone_core_enable_video_preview(linphonec,preview_enabled);
|
||||
if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec, use -V or -C or -D to enable.\n");
|
||||
#ifdef HAVE_READLINE
|
||||
|
|
@ -878,6 +886,7 @@ usage: linphonec [-c file] [-s sipaddr] [-a] [-V] [-d level ] [-l logfile]\n\
|
|||
-C enable video capture only (disabled by default)\n\
|
||||
-D enable video display only (disabled by default)\n\
|
||||
-S show general state messages (disabled by default)\n\
|
||||
--wid windowid force embedding of video window into provided windowid (disabled by default)\n\
|
||||
-v or --version display version and exits.\n");
|
||||
|
||||
exit(exit_status);
|
||||
|
|
@ -1226,6 +1235,14 @@ linphonec_parse_cmdline(int argc, char **argv)
|
|||
{
|
||||
unix_socket=1;
|
||||
}
|
||||
else if (strncmp ("--wid", argv[arg_num], 5) == 0)
|
||||
{
|
||||
arg_num++;
|
||||
if (arg_num < argc) {
|
||||
char *tmp;
|
||||
window_id = strtol( argv[arg_num], &tmp, 0 );
|
||||
}
|
||||
}
|
||||
else if (old_arg_num == arg_num)
|
||||
{
|
||||
fprintf (stderr, "ERROR: bad arguments\n");
|
||||
|
|
|
|||
|
|
@ -678,6 +678,7 @@ static void post_configure_audio_streams(LinphoneCall*call){
|
|||
thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
|
||||
float force=lp_config_get_float(lc->config,"sound","el_force",-1);
|
||||
int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
|
||||
float transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
|
||||
MSFilter *f=NULL;
|
||||
if (st->el_type!=ELInactive){
|
||||
f=st->volsend;
|
||||
|
|
@ -689,6 +690,8 @@ static void post_configure_audio_streams(LinphoneCall*call){
|
|||
ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
|
||||
if (sustain!=-1)
|
||||
ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
|
||||
if (transmit_thres!=-1)
|
||||
ms_filter_call_method(f,MS_VOLUME_SET_EA_TRANSMIT_THRESHOLD,&transmit_thres);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2162,23 +2162,34 @@ bool_t linphone_core_inc_invite_pending(LinphoneCore*lc){
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates a running call according to supplied call parameters.
|
||||
* Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore.
|
||||
*
|
||||
* For the moment, this is limited to enabling or disabling the video stream.
|
||||
* In this version this is limited to the following use cases:
|
||||
* - setting up/down the video stream according to the video parameter of the LinphoneCallParams (see linphone_call_params_enable_video() ).
|
||||
* - changing the size of the transmitted video after calling linphone_core_set_preferred_video_size()
|
||||
*
|
||||
* In case no changes are requested through the LinphoneCallParams argument, then this argument can be ommitted and set to NULL.
|
||||
*
|
||||
* @return 0 if successful, -1 otherwise.
|
||||
**/
|
||||
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
|
||||
int err;
|
||||
if (call->localdesc)
|
||||
sal_media_description_unref(call->localdesc);
|
||||
call->params=*params;
|
||||
call->localdesc=create_local_media_description (lc,call);
|
||||
call->camera_active=params->has_video;
|
||||
if (lc->vtable.display_status)
|
||||
lc->vtable.display_status(lc,_("Modifying call parameters..."));
|
||||
sal_call_set_local_media_description (call->op,call->localdesc);
|
||||
err=sal_call_update(call->op);
|
||||
int err=0;
|
||||
if (params!=NULL){
|
||||
if (call->localdesc)
|
||||
sal_media_description_unref(call->localdesc);
|
||||
call->params=*params;
|
||||
call->localdesc=create_local_media_description (lc,call);
|
||||
call->camera_active=params->has_video;
|
||||
if (lc->vtable.display_status)
|
||||
lc->vtable.display_status(lc,_("Modifying call parameters..."));
|
||||
sal_call_set_local_media_description (call->op,call->localdesc);
|
||||
err=sal_call_update(call->op);
|
||||
}else{
|
||||
if (call->videostream!=NULL){
|
||||
video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
|
||||
video_stream_update_video_params (call->videostream);
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 82220afa1b04a9ba380c720d5e2bf83347d7404b
|
||||
Subproject commit e3fe3eb2896b03a41b82e0b864f4e56b0666a2e7
|
||||
Loading…
Add table
Reference in a new issue