Changeset 193:ce62e330a677 in mediastreamer2


Ignore:
Timestamp:
Dec 5, 2008 2:56:56 PM (4 years ago)
Author:
smorlat <smorlat@…>
Branch:
default
Message:

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

Location:
linphone
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • linphone/console/linphonec.c

    r174 r193  
    116116static bool_t vcap_enabled=FALSE; 
    117117static bool_t display_enabled=FALSE; 
     118static bool_t preview_enabled=FALSE; 
    118119static bool_t show_general_state=FALSE; 
    119120LPC_AUTH_STACK auth_stack; 
     
    480481                            NULL); 
    481482        linphone_core_enable_video(&linphonec,vcap_enabled,display_enabled); 
    482         if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec.\n"); 
     483        linphone_core_enable_video_preview(&linphonec,preview_enabled); 
     484        if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec, use -V or -C or -D to enable.\n"); 
    483485#ifdef HAVE_READLINE 
    484486        /* 
     
    861863                        display_enabled = TRUE; 
    862864                        vcap_enabled = TRUE; 
     865                        preview_enabled=TRUE; 
    863866                } 
    864867                else if ((strncmp ("-v", argv[arg_num], 2) == 0) 
  • linphone/coreapi/linphonecore.c

    r190 r193  
    19791979        lc->video_conf.capture=vcap_enabled; 
    19801980        lc->video_conf.display=display_enabled; 
    1981         if (vcap_enabled && display_enabled) 
    1982                 lc->video_conf.show_local=1; 
    1983         else 
    1984                 lc->video_conf.show_local=0; 
    19851981 
    19861982        /* need to re-apply network bandwidth settings*/ 
  • linphone/gtk-glade/main.c

    r190 r193  
    374374void linphone_gtk_set_audio_video(){ 
    375375        linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE); 
     376        linphone_core_enable_video_preview(linphone_gtk_get_core(),TRUE); 
    376377} 
    377378 
    378379void linphone_gtk_set_audio_only(){ 
    379380        linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE); 
     381        linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE); 
    380382} 
    381383 
  • linphone/mediastreamer2/src/alsa.c

    r173 r193  
    282282} 
    283283 
    284 static int alsa_can_read(snd_pcm_t *dev, int frames) 
     284static int alsa_can_read(snd_pcm_t *dev) 
    285285{ 
    286286        snd_pcm_sframes_t avail; 
     
    288288 
    289289        avail = snd_pcm_avail_update(dev); 
    290         ms_debug("*** %s %d %d", __FUNCTION__, (long)avail, frames); 
    291290        if (avail < 0) { 
    292291                ms_error("snd_pcm_avail_update: %s", snd_strerror(avail));      // most probably -EPIPE 
     
    832831        } 
    833832        if (ad->handle==NULL) return; 
    834         while (alsa_can_read(ad->handle,samples)>=samples){ 
     833        while (alsa_can_read(ad->handle)>=samples){ 
    835834           
    836835                int size=samples*2; 
  • linphone/mediastreamer2/src/msv4l.c

    r55 r193  
    540540        } 
    541541 
    542         ms_message("Found %s device. (maxsize=%ix%i)",cap.name, cap.maxwidth, cap.maxheight); 
     542        ms_message("Found %s device. (maxsize=%ix%i, minsize=%ix%i)",cap.name, cap.maxwidth, cap.maxheight, 
     543                        cap.minwidth, cap.minheight); 
    543544        for (i=0;i<cap.channels;i++) 
    544545        { 
Note: See TracChangeset for help on using the changeset viewer.