Commit 34e84d78 authored by smorlat's avatar smorlat

add evrcb0

wizard in progress
improve theora packer
add \n to dtmf printout.



git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@440 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 3ee8c2c0
linphone-3.1.2 --
* make it work with lastest ffmpeg swscale
* improve theora packer
linphone-3.1.1 -- April 14, 2009
* fix crash when opening property box, in some rare case
* windows version uses the new libmsdscap plugin (video capture using directshow)
......
......@@ -300,7 +300,7 @@ linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf){
printf("Receiving tone %c",dtmf);
printf("Receiving tone %c\n",dtmf);
}
static void
......
......@@ -2333,7 +2333,6 @@ void linphone_core_stop_waiting(LinphoneCore *lc){
}
}
void net_config_uninit(LinphoneCore *lc)
{
net_config_t *config=&lc->net_conf;
......
......@@ -762,6 +762,9 @@ The "show" callback is called for the other linphone, causing gui to show up.
The method returns 0 if an already running linphone was found*/
int linphone_core_wake_up_possible_already_running_instance(const char *config_file);
/*returns the list of registered SipSetup (linphonecore plugins) */
const MSList * linphone_core_get_sip_setups(LinphoneCore *lc);
void linphone_core_uninit(LinphoneCore *lc);
void linphone_core_destroy(LinphoneCore *lc);
......
......@@ -49,6 +49,10 @@ void sip_setup_register_all(void){
}
}
const MSList * linphone_core_get_sip_setups(LinphoneCore *lc){
return registered_sip_setups;
}
SipSetup *sip_setup_lookup(const char *type_name){
MSList *elem;
for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
......@@ -94,6 +98,10 @@ SipSetupContext *sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig
return obj;
}
unsigned int sip_setup_get_capabilities(SipSetup *s){
return s->capabilities;
}
int sip_setup_context_get_capabilities(SipSetupContext *ctx){
return ctx->funcs->capabilities;
}
......
......@@ -100,6 +100,7 @@ void sip_setup_register(SipSetup *ss);
void sip_setup_register_all(void);
SipSetup *sip_setup_lookup(const char *type_name);
void sip_setup_unregister_all(void);
unsigned int sip_setup_get_capabilities(SipSetup *s);
SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg);
int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd);
......
......@@ -794,6 +794,18 @@ static void linphone_gtk_check_menu_items(void){
audio_only ? "audio_only_item" : "video_item")), TRUE);
}
static gboolean linphone_gtk_can_manage_accounts(){
LinphoneCore *lc=linphone_gtk_get_core();
const MSList *elem;
for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
SipSetup *ss=(SipSetup*)elem->data;
if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
return TRUE;
}
}
return FALSE;
}
static void linphone_gtk_configure_main_window(){
static gboolean config_loaded=FALSE;
static const char *title;
......@@ -809,7 +821,10 @@ static void linphone_gtk_configure_main_window(){
config_loaded=TRUE;
}
linphone_gtk_configure_window(w,"main_window");
if (title) gtk_window_set_title(GTK_WINDOW(w),title);
if (title) {
gtk_window_set_title(GTK_WINDOW(w),title);
gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
}
if (start_call_icon){
GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
......@@ -826,6 +841,8 @@ static void linphone_gtk_configure_main_window(){
tmp=g_strdup(home);
g_object_set_data(G_OBJECT(menu_item),"home",tmp);
}
if (!linphone_gtk_can_manage_accounts())
gtk_widget_hide(linphone_gtk_get_widget(w,"run_assistant"));
}
static void linphone_gtk_init_main_window(){
......
This diff is collapsed.
......@@ -65,7 +65,15 @@ GtkWidget *create_finish_page(){
return vbox;
}
GtkWidget * linphone_gtk_create_setup_wizard(void){
static int next_page_handler(int curpage, gpointer data){
return curpage+1;
}
static void linphone_gtk_assistant_closed(GtkWidget *w){
gtk_widget_destroy(w);
}
GtkWidget * linphone_gtk_create_assistant(void){
GtkWidget *w=gtk_assistant_new();
GtkWidget *p1=create_intro();
GtkWidget *p2=create_setup_signin_choice();
......@@ -74,15 +82,23 @@ GtkWidget * linphone_gtk_create_setup_wizard(void){
gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Account setup assistant - enter your information"));
gtk_assistant_append_page(GTK_ASSISTANT(w),p4);
gtk_assistant_set_page_type(GTK_ASSISTANT(w),p4,GTK_ASSISTANT_PAGE_SUMMARY);
gtk_assistant_set_page_title(GTK_ASSISTANT(w),p4,_("Now ready !"));
gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),next_page_handler,w,NULL);
g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
gtk_widget_show(w);
return w;
}
......@@ -108,9 +108,30 @@ AC_DEFUN([MS_CHECK_VIDEO],[
fi
fi
AC_ARG_ENABLE(theora,
[ --disable-theora Disable theora support],
[case "${enableval}" in
yes) theora=true ;;
no) theora=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-theora) ;;
esac],[theora=true])
if test x$theora = xtrue; then
PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7 ], [have_theora=yes],
[have_theora=no])
fi
AC_ARG_ENABLE(x11,
[ --disable-x11 Disable X11 support],
[case "${enableval}" in
yes) enable_x11=true ;;
no) enable_x11=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
esac],[enable_x11=true])
if test "$enable_x11" = "true"; then
AC_CHECK_HEADERS(X11/Xlib.h)
fi
VIDEO_CFLAGS=" $FFMPEG_CFLAGS -DVIDEO_ENABLED"
VIDEO_LIBS=" $FFMPEG_LIBS $SWSCALE_LIBS"
......
......@@ -152,6 +152,15 @@ dnl *********************************
found_sound=no
AC_ARG_ENABLE(oss,
[ --enable-oss Disable oss support],
[case "${enableval}" in
yes) oss=true ;;
no) oss=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
esac],[oss=true])
if "$oss" = "true"; then
AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h sys/audio.h)
if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
test "${ac_cv_header_soundcard_h}" = "yes" || \
......@@ -159,6 +168,7 @@ if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
test "${ac_cv_header_machine_soundcard_h}" = "yes"; then
found_sound=yes
fi
fi
AM_CONDITIONAL(BUILD_OSS, test x$found_sound = xyes)
......@@ -188,12 +198,12 @@ AM_CONDITIONAL(BUILD_ALSA, test x$alsa_enabled = xtrue)
AC_ARG_ENABLE(artsc,
[ --enable-artsc Turn on artsc (kde) sound input/output (auto) ],
[ --enable-artsc Turn on artsc (kde<4) sound input/output (no) ],
[case "${enableval}" in
yes) artsc=true ;;
no) artsc=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
esac],[artsc=true])
esac],[artsc=no])
arts_enabled=false
......@@ -280,6 +290,16 @@ fi
AM_CONDITIONAL(BUILD_MACAQSND, test x$macaqsnd_enabled = xtrue)
AC_ARG_ENABLE(jack,
[ --disable-jack Disable jack support],
[case "${enableval}" in
yes) jack=true ;;
no) jack=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
esac],[jack=true])
if test x$jack = xtrue; then
dnl Check for samplerate libraries
dnl Check for jack libraries (sound output plugin)
PKG_CHECK_MODULES(JACK,jack >= 0.15.0,
......@@ -306,6 +326,8 @@ fi
AC_SUBST(JACK_CFLAGS)
AC_SUBST(JACK_LIBS)
fi
if test "$found_sound" = "no"; then
AC_MSG_ERROR([Could not find a support sound driver API])
fi
......@@ -315,6 +337,16 @@ dnl *************************************
dnl check for various codecs libraries
dnl *************************************
AC_ARG_ENABLE(speex,
[ --disable-speex Disable speex support],
[case "${enableval}" in
yes) speex=true ;;
no) speex=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-speex) ;;
esac],[speex=true])
if test x$speex = xtrue; then
dnl check for installed version of speex
PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3,
[ AC_DEFINE(HAVE_SPEEX_NOISE,1,[tells whether the noise arg of speex_echo_cancel can be used]) ],
......@@ -331,9 +363,22 @@ PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2beta3,
)
AC_SUBST(SPEEX_CFLAGS)
AC_SUBST(SPEEX_LIBS)
fi
AM_CONDITIONAL(BUILD_SPEEX, test x$build_speex = xyes )
AM_CONDITIONAL(BUILD_RESAMPLE, test x$build_resample = xyes )
AC_ARG_ENABLE(gsm,
[ --disable-gsm Disable gsm support],
[case "${enableval}" in
yes) gsm=true ;;
no) gsm=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-gsm) ;;
esac],[gsm=true])
if test x$gsm = xtrue; then
dnl check for gsm
build_gsm=no
AC_ARG_WITH( gsm,
......@@ -350,6 +395,9 @@ if test x"$gsmdir" != xno ; then
else
build_gsm=no
fi
fi
AM_CONDITIONAL(BUILD_GSM, test x$build_gsm = xyes )
MS_CHECK_VIDEO
......
......@@ -31,6 +31,7 @@ typedef struct EncState{
uint64_t start_time;
uint64_t conf_time;
unsigned int mtu;
unsigned int nframes;
} EncState;
static void enc_init(MSFilter *f){
......@@ -63,6 +64,7 @@ static void enc_init(MSFilter *f){
s->start_time=0;
s->conf_time=0;
s->mtu=ms_get_payload_max_size()-6;
s->nframes=0;
f->data=s;
}
......@@ -121,7 +123,7 @@ static int enc_set_br(MSFilter *f, void*data){
vsize.width=s->tinfo.width;
vsize.height=s->tinfo.height;
fps=s->tinfo.fps_numerator;
s->tinfo.target_bitrate=codecbr*0.8;
s->tinfo.target_bitrate=codecbr*0.9;
s->tinfo.keyframe_data_target_bitrate=codecbr;
/*those default settings would need to be affined*/
if (br>=1024000){
......@@ -237,7 +239,7 @@ static void enc_preprocess(MSFilter *f){
s->yuv.uv_stride=s->tinfo.width/2;
create_packed_conf(s);
s->conf_time=0;
s->start_time=f->ticker->time;
s->nframes=0;
}
static void enc_postprocess(MSFilter *f){
......@@ -306,8 +308,9 @@ bool_t need_send_conf(EncState *s, uint64_t elapsed){
}
#else
/*send immediately then 10 seconds later */
if ( (elapsed<1000 && s->conf_time==0)
|| (elapsed>10000 && s->conf_time==1)){
if ( (elapsed==0 && s->conf_time==0)
|| (elapsed>=3000 && s->conf_time==1)
|| (elapsed>=10000 && s->conf_time==2)){
s->conf_time++;
return TRUE;
}
......@@ -321,10 +324,16 @@ static void enc_process(MSFilter *f){
EncState *s=(EncState*)f->data;
uint64_t timems=f->ticker->time;
uint32_t timestamp=timems*90;
uint64_t elapsed=timems-s->start_time;
uint64_t elapsed;
while((im=ms_queue_get(f->inputs[0]))!=NULL){
/*for the firsts frames only send theora packed conf*/
om=NULL;
if (s->nframes==0){
s->start_time=timems;
}
elapsed=timems-s->start_time;
if (need_send_conf(s,elapsed)){
if (s->packed_conf) {
......
......@@ -183,6 +183,7 @@ VAR_DECLSPEC PayloadType payload_type_amr;
VAR_DECLSPEC PayloadType payload_type_amrwb;
VAR_DECLSPEC PayloadType payload_type_truespeech;
VAR_DECLSPEC PayloadType payload_type_evrc0;
VAR_DECLSPEC PayloadType payload_type_evrcb0;
/* video */
VAR_DECLSPEC PayloadType payload_type_mpv;
......
......@@ -412,6 +412,16 @@ PayloadType payload_type_evrc0={
CHANNELS(1)
};
PayloadType payload_type_evrcb0={
TYPE(PAYLOAD_AUDIO_PACKETIZED),
CLOCK_RATE(8000),
BITS_PER_SAMPLE(0),
ZERO_PATTERN(NULL),
PATTERN_LENGTH(0),
NORMAL_BITRATE(0),
MIME_TYPE ("EVRCB0"),
CHANNELS(1)
};
PayloadType payload_type_h263_1998={
TYPE( PAYLOAD_VIDEO),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment