mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
allow to disable video preview when video is enabled.
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@196 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
86e72134ad
commit
80c31033e5
5 changed files with 10 additions and 9 deletions
|
|
@ -115,6 +115,7 @@ static bool_t auto_answer=FALSE;
|
|||
static bool_t answer_call=FALSE;
|
||||
static bool_t vcap_enabled=FALSE;
|
||||
static bool_t display_enabled=FALSE;
|
||||
static bool_t preview_enabled=FALSE;
|
||||
static bool_t show_general_state=FALSE;
|
||||
LPC_AUTH_STACK auth_stack;
|
||||
static int trace_level = 0;
|
||||
|
|
@ -479,7 +480,8 @@ linphonec_init(int argc, char **argv)
|
|||
linphone_core_init (&linphonec, &linphonec_vtable, configfile_name,
|
||||
NULL);
|
||||
linphone_core_enable_video(&linphonec,vcap_enabled,display_enabled);
|
||||
if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec.\n");
|
||||
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
|
||||
/*
|
||||
* Initialize readline
|
||||
|
|
@ -860,6 +862,7 @@ linphonec_parse_cmdline(int argc, char **argv)
|
|||
{
|
||||
display_enabled = TRUE;
|
||||
vcap_enabled = TRUE;
|
||||
preview_enabled=TRUE;
|
||||
}
|
||||
else if ((strncmp ("-v", argv[arg_num], 2) == 0)
|
||||
||
|
||||
|
|
|
|||
|
|
@ -1978,10 +1978,6 @@ void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t di
|
|||
#endif
|
||||
lc->video_conf.capture=vcap_enabled;
|
||||
lc->video_conf.display=display_enabled;
|
||||
if (vcap_enabled && display_enabled)
|
||||
lc->video_conf.show_local=1;
|
||||
else
|
||||
lc->video_conf.show_local=0;
|
||||
|
||||
/* need to re-apply network bandwidth settings*/
|
||||
linphone_core_set_download_bandwidth(lc,
|
||||
|
|
|
|||
|
|
@ -373,10 +373,12 @@ void linphone_gtk_accept_call(GtkWidget *button){
|
|||
|
||||
void linphone_gtk_set_audio_video(){
|
||||
linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
|
||||
linphone_core_enable_video_preview(linphone_gtk_get_core(),TRUE);
|
||||
}
|
||||
|
||||
void linphone_gtk_set_audio_only(){
|
||||
linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
|
||||
linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
|
||||
}
|
||||
|
||||
void linphone_gtk_enable_self_view(GtkWidget *w){
|
||||
|
|
|
|||
|
|
@ -281,13 +281,12 @@ static snd_pcm_t * alsa_open_w(const char *pcmdev,int bits,int stereo,int rate)
|
|||
return pcm_handle;
|
||||
}
|
||||
|
||||
static int alsa_can_read(snd_pcm_t *dev, int frames)
|
||||
static int alsa_can_read(snd_pcm_t *dev)
|
||||
{
|
||||
snd_pcm_sframes_t avail;
|
||||
int err;
|
||||
|
||||
avail = snd_pcm_avail_update(dev);
|
||||
ms_debug("*** %s %d %d", __FUNCTION__, (long)avail, frames);
|
||||
if (avail < 0) {
|
||||
ms_error("snd_pcm_avail_update: %s", snd_strerror(avail)); // most probably -EPIPE
|
||||
/* overrun occured, snd_pcm_state() would return SND_PCM_STATE_XRUN
|
||||
|
|
@ -831,7 +830,7 @@ void alsa_read_process(MSFilter *obj){
|
|||
ad->handle=alsa_open_r(ad->pcmdev,16,ad->nchannels==2,ad->rate);
|
||||
}
|
||||
if (ad->handle==NULL) return;
|
||||
while (alsa_can_read(ad->handle,samples)>=samples){
|
||||
while (alsa_can_read(ad->handle)>=samples){
|
||||
|
||||
int size=samples*2;
|
||||
om=allocb(size,0);
|
||||
|
|
|
|||
|
|
@ -539,7 +539,8 @@ static int v4l_configure(V4lState *s)
|
|||
return -1;
|
||||
}
|
||||
|
||||
ms_message("Found %s device. (maxsize=%ix%i)",cap.name, cap.maxwidth, cap.maxheight);
|
||||
ms_message("Found %s device. (maxsize=%ix%i, minsize=%ix%i)",cap.name, cap.maxwidth, cap.maxheight,
|
||||
cap.minwidth, cap.minheight);
|
||||
for (i=0;i<cap.channels;i++)
|
||||
{
|
||||
chan.channel=i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue