linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] linphone add video command


From: Simon Morlat
Subject: Re: [Linphone-developers] linphone add video command
Date: Wed, 03 Feb 2010 11:10:09 +0100

Hi,

If you want to submit a patch, please submit it against lastest git
tree, and generate it using 'git diff'

git clone git://git.sv.gnu.org/linphone.git --recursive

<do modifications>

git diff > myenhancements.patch

Simon

Le vendredi 29 janvier 2010 à 14:09 +0800, 渭春 汪 a écrit :
> Because project need, i must modify linphone for video . 
> 
> i use linphone-3.1.0 in Fedora8.
>  1) use linphone-console. 
>     when use linphonec -C ,will report segment error. i don't knowe why?
>  2) because project need. i modify linphone, add video command
>      video enable  -- enable video features globally.(= -V)
>      video display -- enable video display only (=-D)
>      video disable -- close video window.
>  3) modify three file: commands.c linphonec.h linphonec.c
>     commands.c --modify
>         1. add: static int lpc_cmd_video(LinphoneCore *, char *);
>           
>         2. and in  LPC_COMMAND commands[] add codes : 
>   LPC_COMMAND commands[] = {
>     {"video", lpc_cmd_video,"Video display:",
>                  "'video' \t: print video mod\n"
>                  "'video enable' \t:print video enable\n"
>                  "'video disable'\t:print vodeo mode is disable\n"
>                  "'video display'\t:print enable video display only\n"
>             },
>   }
>         3. lpc_cmd_video 
>  static int lpc_cmd_video(LinphoneCore *lc,char *args)
>  {
>   if(!args)
>  {
>   if(linphonec_get_video()) { 
>    linphonec_out("Video is enabled. Use 'Video disable' to disable ");
>   }else {
>    linphonec_out("Video is disable.Use 'Video enable or video display' to 
> enable.");
>   }
>   return 1;
>  }
>  
>  if(strstr(args,"enable"))
>  {
>   linphonec_set_video(TRUE);
>   linphonec_out("Video is enable\n");
>  } 
>  else if (strstr(args,"disable")) 
>   {
>   linphonec_set_video_disable(TRUE);
>   linphonec_out("Video is disable\n");
>  } 
>   else if (strstr(args,"display")) 
>   {
>   linphonec_set_video_display(TRUE);
>   linphonec_out("Video is enabled display only.\n");
>  } else return 0;
>  return 1; 
>  
>        }
>      linphonec.h --modify,add:
>         void linphonec_set_video(bool_t enabled);
>  void linphonec_set_video_display(bool_t enabled);
>  void linphonec_set_video_disable(bool_t enabled);
>  bool_t linphonec_get_video();
>      linphonec.c --modify,add
>  //wang-add: enable video features globally
>  void linphonec_set_video(bool_t enabled){
>   display_enabled = TRUE;
>     vcap_enabled = TRUE;
>     preview_enabled=TRUE;
>   linphone_core_enable_video(&linphonec,vcap_enabled,display_enabled);
>   linphone_core_enable_video_preview(&linphonec,preview_enabled);             
>       
>  }
> 
>  //wang-add:enable video display only
>  void linphonec_set_video_display(bool_t enabled)
>  {
>   display_enabled = TRUE;
>     vcap_enabled = false;
>   linphone_core_enable_video(&linphonec,vcap_enabled,display_enabled);       
>  }
>  //wang-add: disable video 
>  void linphonec_set_video_disable(bool_t enabled)
>  {
>   display_enabled =FALSE;
>     vcap_enabled = FALSE;
>     preview_enabled = FALSE;
>   linphone_core_enable_video(&linphonec,vcap_enabled,display_enabled);
>   linphone_core_enable_video_preview(&linphonec,preview_enabled);   
>  }
>  bool_t linphonec_get_video(){
>   return display_enabled;
>  }
>   4) after compile. u can use command: video enable; video disable; video 
> display
>      ./linphonec
>      > video enable
>      > video disable
>      > video display 
> 
> 
>       ___________________________________________________________ 
>   好玩贺卡等你发,邮箱贺卡全新上线! 
> http://card.mail.cn.yahoo.com/
> 
> 
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers






reply via email to

[Prev in Thread] Current Thread [Next in Thread]