Merge remote-tracking branch 'origin/master' into dev_videoios

Conflicts:
	mediastreamer2
	oRTP
This commit is contained in:
Jehan Monnier 2011-10-04 09:26:21 +02:00
commit e1dfc98054
20 changed files with 270 additions and 92 deletions

View file

@ -12,7 +12,7 @@
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Library General Public License for more details.
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
@ -123,13 +123,12 @@ LOCAL_STATIC_LIBRARIES += libspeex
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_CFLAGS += -DHAVE_ILBC=1
LOCAL_STATIC_LIBRARIES += libmsilbc
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES)
endif
LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES)
LOCAL_WHOLE_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
LOCAL_SRC_FILES += $(LIBLINPHONE_EXTENDED_SRC_FILES)
LOCAL_LDLIBS += -lGLESv2
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto
ifeq ($(BUILD_GPLV3_ZRTP),1)

View file

@ -333,7 +333,8 @@ static void call_accepted(SalOp *op){
}
linphone_core_update_streams (lc,call,md);
linphone_call_set_state(call, LinphoneCallStreamsRunning, "Streams running");
lc->current_call=call;
if (!call->current_params.in_conference)
lc->current_call=call;
}
}else{
/*send a bye*/
@ -391,7 +392,8 @@ static void call_updating(SalOp *op){
if(lc->vtable.display_status)
lc->vtable.display_status(lc,_("We have been resumed..."));
linphone_call_set_state (call,LinphoneCallStreamsRunning,"Connected (streams running)");
lc->current_call=call;
if (!call->current_params.in_conference)
lc->current_call=call;
}else{
prevstate=call->state;
linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote");

View file

@ -186,6 +186,7 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char
/*try adding domain part from default current proxy*/
LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc));
if (id!=NULL){
linphone_address_set_display_name(id,NULL);
linphone_address_set_username(id,uri);
*result=linphone_address_as_string(id);
linphone_address_destroy(id);

View file

@ -41,6 +41,10 @@ static MSWebCam *get_nowebcam_device(){
}
#endif
LinphoneCore *linphone_call_get_core(const LinphoneCall *call){
return call->core;
}
static const char* get_hexa_zrtp_identifier(LinphoneCore *lc){
const char *confZid=lp_config_get_string(lc->config,"rtp","zid",NULL);
if (confZid != NULL) {
@ -1264,9 +1268,9 @@ bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call){
**/
float linphone_call_get_play_volume(LinphoneCall *call){
AudioStream *st=call->audiostream;
if (st && st->volsend){
if (st && st->volrecv){
float vol=0;
ms_filter_call_method(st->volsend,MS_VOLUME_GET,&vol);
ms_filter_call_method(st->volrecv,MS_VOLUME_GET,&vol);
return vol;
}
@ -1279,9 +1283,9 @@ float linphone_call_get_play_volume(LinphoneCall *call){
**/
float linphone_call_get_record_volume(LinphoneCall *call){
AudioStream *st=call->audiostream;
if (st && st->volrecv){
if (st && st->volsend && !call->audio_muted && call->state==LinphoneCallStreamsRunning){
float vol=0;
ms_filter_call_method(st->volrecv,MS_VOLUME_GET,&vol);
ms_filter_call_method(st->volsend,MS_VOLUME_GET,&vol);
return vol;
}

View file

@ -982,6 +982,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
linphone_core_assign_payload_type(lc,&payload_type_speex_wb,111,"vbr=on");
linphone_core_assign_payload_type(lc,&payload_type_speex_uwb,112,"vbr=on");
linphone_core_assign_payload_type(lc,&payload_type_telephone_event,101,"0-11");
linphone_core_assign_payload_type(lc,&payload_type_g722,9,NULL);
#if defined(ANDROID) || defined (__IPHONE_OS_VERSION_MIN_REQUIRED)
/*shorten the DNS lookup time and send more retransmissions on mobiles:
@ -3161,6 +3162,8 @@ const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc)
int error;
char ipstring [INET6_ADDRSTRLEN];
if (lc->net_conf.nat_address==NULL) return NULL;
if (parse_hostname_to_addr (lc->net_conf.nat_address, &ss, &ss_len)<0) {
return lc->net_conf.nat_address;
}
@ -4330,3 +4333,22 @@ void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file){
}
lc->zrtp_secrets_cache=file ? ms_strdup(file) : NULL;
}
// if (stringUri.equals(call.getRemoteAddress().asStringUriOnly())) {
const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri) {
if (uri == NULL) return NULL;
MSList *calls=lc->calls;
while(calls) {
const LinphoneCall *c=(LinphoneCall*)calls->data;
calls=calls->next;
const LinphoneAddress *address = linphone_call_get_remote_address(c);
char *current_uri=linphone_address_as_string_uri_only(address);
if (strcmp(uri,current_uri)==0) {
ms_free(current_uri);
return c;
} else {
ms_free(current_uri);
}
}
return NULL;
}

View file

@ -235,7 +235,7 @@ typedef enum _LinphoneCallState{
const char *linphone_call_state_to_string(LinphoneCallState cs);
LinphoneCore *linphone_call_get_core(const LinphoneCall *call);
LinphoneCallState linphone_call_get_state(const LinphoneCall *call);
bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call);
const LinphoneAddress * linphone_core_get_current_call_remote_address(struct _LinphoneCore *lc);
@ -1018,6 +1018,8 @@ bool_t linphone_call_are_all_streams_encrypted(LinphoneCall *call);
const char* linphone_call_get_authentication_token(LinphoneCall *call);
bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call);
const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri);
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_add_all_to_conference(LinphoneCore *lc);
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);

View file

@ -53,6 +53,10 @@ static void linphone_android_log_handler(OrtpLogLevel lev, const char *fmt, va_l
}
__android_log_vprint(prio, LOG_DOMAIN, fmt, args);
}
int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() {
return (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0);
}
#endif /*ANDROID*/
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved)
@ -264,9 +268,28 @@ public:
,env->CallStaticObjectMethod(lcData->registrationStateClass,lcData->registrationStateFromIntId,(jint)state),
message ? env->NewStringUTF(message) : NULL);
}
jobject getCall(JNIEnv *env , LinphoneCall *call){
jobject jobj=0;
if (call!=NULL){
void *up=linphone_call_get_user_pointer(call);
if (up==NULL){
jobj=env->NewObject(callClass,callCtrId,(jlong)call);
jobj=env->NewGlobalRef(jobj);
linphone_call_set_user_pointer(call,(void*)jobj);
linphone_call_ref(call);
}else{
jobj=(jobject)up;
}
}
return jobj;
}
static void callStateChange(LinphoneCore *lc, LinphoneCall* call,LinphoneCallState state,const char* message) {
JNIEnv *env = 0;
jint result = jvm->AttachCurrentThread(&env,NULL);
jobject jcall;
if (result != 0) {
ms_error("cannot attach VM\n");
return;
@ -275,9 +298,13 @@ public:
env->CallVoidMethod(lcData->listener
,lcData->callStateId
,lcData->core
,env->NewObject(lcData->callClass,lcData->callCtrId,(jlong)call)
,(jcall=lcData->getCall(env,call))
,env->CallStaticObjectMethod(lcData->callStateClass,lcData->callStateFromIntId,(jint)state),
message ? env->NewStringUTF(message) : NULL);
if (state==LinphoneCallReleased){
linphone_call_set_user_pointer(call,NULL);
env->DeleteGlobalRef(jcall);
}
}
static void callEncryptionChange(LinphoneCore *lc, LinphoneCall* call, bool_t encrypted,const char* authentication_token) {
JNIEnv *env = 0;
@ -290,7 +317,7 @@ public:
env->CallVoidMethod(lcData->listener
,lcData->callEncryptionChangedId
,lcData->core
,env->NewObject(lcData->callClass,lcData->callCtrId,(jlong)call)
,lcData->getCall(env,call)
,encrypted
,authentication_token ? env->NewStringUTF(authentication_token) : NULL);
}
@ -444,20 +471,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_iterate( JNIEnv* env
,jlong lc) {
linphone_core_iterate((LinphoneCore*)lc);
}
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_invite( JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_invite( JNIEnv* env
,jobject thiz
,jlong lc
,jstring juri) {
const char* uri = env->GetStringUTFChars(juri, NULL);
LinphoneCoreData *lcd=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)lc);
LinphoneCall* lCall = linphone_core_invite((LinphoneCore*)lc,uri);
env->ReleaseStringUTFChars(juri, uri);
return (jlong)lCall;
return lcd->getCall(env,lCall);
}
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_inviteAddress( JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_inviteAddress( JNIEnv* env
,jobject thiz
,jlong lc
,jlong to) {
return (jlong) linphone_core_invite_address((LinphoneCore*)lc,(LinphoneAddress*)to);
LinphoneCoreData *lcd=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)lc);
return lcd->getCall(env, linphone_core_invite_address((LinphoneCore*)lc,(LinphoneAddress*)to));
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateCall( JNIEnv* env
@ -640,11 +669,13 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isEchoCancellationEn
return linphone_core_echo_cancellation_enabled((LinphoneCore*)lc);
}
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_getCurrentCall(JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_getCurrentCall(JNIEnv* env
,jobject thiz
,jlong lc
) {
return (jlong)linphone_core_get_current_call((LinphoneCore*)lc);
LinphoneCoreData *lcdata=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)lc);
return lcdata->getCall(env,linphone_core_get_current_call((LinphoneCore*)lc));
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addFriend(JNIEnv* env
,jobject thiz
@ -1003,16 +1034,11 @@ extern "C" jint Java_org_linphone_core_PayloadTypeImpl_getRate(JNIEnv* env,jobj
}
//LinphoneCall
extern "C" void Java_org_linphone_core_LinphoneCallImpl_ref(JNIEnv* env
extern "C" void Java_org_linphone_core_LinphoneCallImpl_finalize(JNIEnv* env
,jobject thiz
,jlong ptr) {
linphone_call_ref((LinphoneCall*)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneCallImpl_unref(JNIEnv* env
,jobject thiz
,jlong ptr) {
linphone_call_unref((LinphoneCall*)ptr);
LinphoneCall *call=(LinphoneCall*)ptr;
linphone_call_unref(call);
}
extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getCallLog( JNIEnv* env
@ -1062,10 +1088,11 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_isEchoLimiterEnabled
return linphone_call_echo_limiter_enabled((LinphoneCall*)ptr);
}
extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getReplacedCall( JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getReplacedCall( JNIEnv* env
,jobject thiz
,jlong ptr) {
return (jlong)linphone_call_get_replaced_call((LinphoneCall*)ptr);
LinphoneCoreData *lcd=(LinphoneCoreData*)linphone_core_get_user_data(linphone_call_get_core((LinphoneCall*)ptr));
return lcd->getCall(env,linphone_call_get_replaced_call((LinphoneCall*)ptr));
}
extern "C" jfloat Java_org_linphone_core_LinphoneCallImpl_getCurrentQuality( JNIEnv* env
@ -1239,8 +1266,9 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_cameraEnabled(JNIEnv
linphone_call_camera_enabled((LinphoneCall *)lc);
}
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_inviteAddressWithParams(JNIEnv *env, jobject thiz, jlong lc, jlong addr, jlong params){
return (jlong) linphone_core_invite_address_with_params((LinphoneCore *)lc, (const LinphoneAddress *)addr, (const LinphoneCallParams *)params);
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_inviteAddressWithParams(JNIEnv *env, jobject thiz, jlong lc, jlong addr, jlong params){
LinphoneCoreData *lcd=(LinphoneCoreData*)linphone_core_get_user_data((LinphoneCore*)lc);
return lcd->getCall(env,linphone_core_invite_address_with_params((LinphoneCore *)lc, (const LinphoneAddress *)addr, (const LinphoneCallParams *)params));
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_updateAddressWithParams(JNIEnv *env, jobject thiz, jlong lc, jlong call, jlong params){
@ -1329,17 +1357,6 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_adjustSoftwareVolume(JNI
linphone_core_set_playback_gain_db((LinphoneCore *) ptr, db);
}
extern "C" jboolean Java_org_linphone_core_Version_nativeHasNeon(JNIEnv *env){
if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0)
{
return 1;
}
return 0;
}
extern "C" jboolean Java_org_linphone_core_Version_nativeHasZrtp(JNIEnv *env){
return ortp_zrtp_available();
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_pauseCall(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
return linphone_core_pause_call((LinphoneCore *) pCore, (LinphoneCall *) pCall);
}
@ -1403,6 +1420,14 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setZrtpSecretsCache(JNIE
}
}
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_findCallFromUri(JNIEnv *env,jobject thiz,jlong pCore, jstring jUri) {
const char* cUri=env->GetStringUTFChars(jUri, NULL);
const LinphoneCall *call=linphone_core_find_call_from_uri((LinphoneCore *) pCore,cUri);
env->ReleaseStringUTFChars(jUri, cUri);
return (jlong) call;
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_setVideoDevice(JNIEnv *env,jobject thiz,jlong pCore,jint id) {
LinphoneCore* lc = (LinphoneCore *) pCore;
const char** devices = linphone_core_get_video_devices(lc);

View file

@ -761,7 +761,7 @@ int sal_call_refer_with_replaces(SalOp *h, SalOp *other_call_h){
}
SalOp *sal_call_get_replaces(SalOp *h){
if (h->replaces!=NULL){
if (h!=NULL && h->replaces!=NULL){
int cid;
eXosip_lock();
cid=eXosip_call_find_by_replaces(h->replaces);
@ -1112,6 +1112,13 @@ static void call_accepted(Sal *sal, eXosip_event_t *ev){
if (op->base.local_media) sdp_process(op);
}
eXosip_call_build_ack(ev->did,&msg);
if (msg==NULL) {
ms_warning("This call has been already terminated.");
eXosip_lock();
eXosip_call_terminate(ev->cid,ev->did);
eXosip_unlock();
return ;
}
contact=sal_op_get_contact(op);
if (contact) {
_osip_list_set_empty(&msg->contacts,(void (*)(void*))osip_contact_free);

View file

@ -198,7 +198,9 @@ static void update_star(GtkEntry *entry, gboolean is_known){
unstarred=g_object_get_data(G_OBJECT(entry),"unstarred_icon");
if (is_known && (active==unstarred)){
gtk_entry_set_icon_from_pixbuf(entry,GTK_ENTRY_ICON_SECONDARY,starred);
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,NULL);
}else if ((!is_known) && (active==starred)){
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,_("Add to addressbook"));
gtk_entry_set_icon_from_pixbuf(entry,GTK_ENTRY_ICON_SECONDARY,unstarred);
}
}

View file

@ -319,6 +319,67 @@ static gboolean linphone_gtk_in_call_view_refresh(LinphoneCall *call){
return TRUE;
}
typedef float (*get_volume_t)(void *data);
typedef struct _volume_ctx{
GtkWidget *widget;
get_volume_t get_volume;
void *data;
float last_value;
}volume_ctx_t;
#define UNSIGNIFICANT_VOLUME (-26)
#define SMOOTH 0.15
static gboolean update_audio_meter(volume_ctx_t *ctx){
float volume_db=ctx->get_volume(ctx->data);
float frac=(volume_db-UNSIGNIFICANT_VOLUME)/(float)(-UNSIGNIFICANT_VOLUME+3.0);
if (frac<0) frac=0;
if (frac>1.0) frac=1.0;
if (frac<ctx->last_value){
frac=(frac*SMOOTH)+(ctx->last_value*(1-SMOOTH));
}
ctx->last_value=frac;
//g_message("volume_db=%f, frac=%f",volume_db,frac);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ctx->widget),frac);
return TRUE;
}
static void on_audio_meter_destroy(guint task_id){
g_source_remove(task_id);
}
void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data){
guint task_id=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"task_id"));
if (task_id==0){
volume_ctx_t *ctx=g_new(volume_ctx_t,1);
ctx->widget=w;
ctx->get_volume=get_volume;
ctx->data=data;
ctx->last_value=0;
g_object_set_data_full(G_OBJECT(w),"ctx",ctx,g_free);
task_id=g_timeout_add(50,(GSourceFunc)update_audio_meter,ctx);
g_object_set_data_full(G_OBJECT(w),"task_id",GINT_TO_POINTER(task_id),(GDestroyNotify)on_audio_meter_destroy);
}
}
void linphone_gtk_in_call_view_enable_audio_view(LinphoneCall *call){
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *audio_view=linphone_gtk_get_widget(callview,"incall_audioview");
//GtkWidget *mic=linphone_gtk_get_widget(callview,"incall_mic_icon");
GtkWidget *spk=linphone_gtk_get_widget(callview,"incall_spk_icon");
GtkWidget *mic_level=linphone_gtk_get_widget(callview,"mic_audiolevel");
GtkWidget *spk_level=linphone_gtk_get_widget(callview,"spk_audiolevel");
GdkPixbuf *pbuf;
//gtk_image_set_from_pixbuf(GTK_IMAGE(mic),(pbuf=create_pixbuf("mic_active.png")));
//g_object_unref(pbuf);
gtk_image_set_from_pixbuf(GTK_IMAGE(spk),(pbuf=create_pixbuf("speaker.png")));
g_object_unref(pbuf);
linphone_gtk_init_audio_meter(mic_level,(get_volume_t)linphone_call_get_record_volume,call);
linphone_gtk_init_audio_meter(spk_level,(get_volume_t)linphone_call_get_play_volume,call);
gtk_widget_show_all(audio_view);
}
void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
@ -340,6 +401,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
}
linphone_gtk_in_call_view_enable_audio_view(call);
}
void linphone_gtk_in_call_view_set_paused(LinphoneCall *call){
@ -383,6 +445,7 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"),FALSE);
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
gtk_widget_hide(linphone_gtk_get_widget(callview,"incall_audioview"));
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),FALSE);
linphone_gtk_enable_hold_button(call,FALSE,TRUE);
@ -394,14 +457,14 @@ void linphone_gtk_draw_mute_button(GtkButton *button, gboolean active){
g_object_set_data(G_OBJECT(button),"active",GINT_TO_POINTER(active));
if (active){
GtkWidget *image=create_pixmap("mic_muted.png");
gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));
/*gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));*/
if (image!=NULL) {
gtk_button_set_image(GTK_BUTTON(button),image);
gtk_widget_show(image);
}
}else{
GtkWidget *image=create_pixmap("mic_active.png");
gtk_button_set_label(GTK_BUTTON(button),_("Mute"));
/*gtk_button_set_label(GTK_BUTTON(button),_("Mute"));*/
if (image!=NULL) {
gtk_button_set_image(GTK_BUTTON(button),image);
gtk_widget_show(image);
@ -417,7 +480,8 @@ void linphone_gtk_mute_clicked(GtkButton *button){
void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive)
{
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
/*gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);*/
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
linphone_gtk_draw_mute_button(button,FALSE);
}
@ -459,5 +523,6 @@ void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gbo
g_return_if_fail(callview!=NULL);
button=linphone_gtk_get_widget(callview,"hold_call");
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
linphone_gtk_draw_hold_button(GTK_BUTTON(button),!holdon);
}

View file

@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define chdir _chdir
#endif
#if defined HAVE_NOTIFY1 || defined HAVE_NOTIFIED4
#if defined(HAVE_NOTIFY1) || defined(HAVE_NOTIFY4)
#define HAVE_NOTIFY
#endif
@ -321,6 +321,7 @@ GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_n
return NULL;
}
g_object_set_data(G_OBJECT(w),"builder",builder);
g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)g_object_unref,builder);
gtk_builder_connect_signals(builder,w);
return w;
}
@ -1554,13 +1555,13 @@ static void linphone_gtk_check_soundcards(){
static void linphone_gtk_quit(void){
linphone_gtk_uninit_instance();
gdk_threads_leave();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
#ifdef HAVE_NOTIFY
notify_uninit();
#endif
gdk_threads_leave();
}
#ifdef HAVE_GTK_OSX

View file

@ -80,11 +80,35 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="in_call_animation">
<object class="GtkHBox" id="incall_hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
<object class="GtkVBox" id="in_call_animation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="in_call_uri">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
@ -94,15 +118,62 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="in_call_uri">
<property name="visible">True</property>
<object class="GtkHBox" id="incall_audioview">
<property name="can_focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="justify">center</property>
<child>
<object class="GtkButton" id="incall_mute">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="relief">half</property>
<signal name="clicked" handler="linphone_gtk_mute_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="mic_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="incall_spk_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
<property name="icon-size">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="spk_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@ -147,32 +218,6 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="incall_hbuttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="incall_mute">
<property name="label" translatable="yes">Mute</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_mute_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="mute_pause_buttons">
<property name="visible">True</property>
@ -182,7 +227,6 @@
<child>
<object class="GtkButton" id="hold_call">
<property name="label" translatable="yes">Pause</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
@ -198,7 +242,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
<property name="position">3</property>
</packing>
</child>
</object>

View file

@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h"
static ms_thread_t pipe_thread;
static ortp_pipe_t server_pipe=-1;
static ortp_pipe_t server_pipe=(ortp_pipe_t)-1;
static gboolean server_pipe_running=TRUE;
static char *pipe_name;
@ -38,7 +38,7 @@ static void * server_pipe_thread(void *pointer){
do{
child=ortp_server_pipe_accept_client(server_pipe);
if (server_pipe_running && child!=-1){
if (server_pipe_running && child!=(ortp_pipe_t)-1){
char buf[256]={0};
if (ortp_pipe_read(child,(uint8_t*)buf,sizeof(buf))>0){
g_message("Received wakeup command with arg %s",buf);
@ -56,7 +56,7 @@ static void * server_pipe_thread(void *pointer){
static void linphone_gtk_init_pipe(const char *name){
pipe_name=g_strdup(name);
server_pipe=ortp_server_pipe_create(name);
if (server_pipe==-1){
if (server_pipe==(ortp_pipe_t)-1){
g_warning("Fail to create server pipe for name %s: %s",name,strerror(errno));
}
ms_thread_create(&pipe_thread,NULL,server_pipe_thread,NULL);
@ -64,7 +64,7 @@ static void linphone_gtk_init_pipe(const char *name){
bool_t linphone_gtk_init_instance(const char *app_name, const char *addr_to_call){
ortp_pipe_t p=ortp_client_pipe_connect(app_name);
if (p!=-1){
if (p!=(ortp_pipe_t)-1){
uint8_t buf[256]={0};
g_message("There is already a running instance.");
if (addr_to_call!=NULL){
@ -84,7 +84,7 @@ bool_t linphone_gtk_init_instance(const char *app_name, const char *addr_to_call
}
void linphone_gtk_uninit_instance(void){
if (server_pipe!=-1){
if (server_pipe!=(ortp_pipe_t)-1){
ortp_pipe_t client;
server_pipe_running=FALSE;
/*this is to unblock the accept() of the server pipe*/
@ -92,7 +92,7 @@ void linphone_gtk_uninit_instance(void){
ortp_pipe_write(client,(uint8_t*)" ",1);
ortp_client_pipe_close(client);
ms_thread_join(pipe_thread,NULL);
server_pipe=-1;
server_pipe=(ortp_pipe_t)-1;
g_free(pipe_name);
pipe_name=NULL;
}

View file

@ -30,6 +30,7 @@ public interface LinphoneCallParams {
boolean getVideoEnabled();
/**
* set audio bandwidth in kbits/s
* @param value 0 to disable limitation
*/
void setAudioBandwidth(int value);

View file

@ -619,4 +619,6 @@ public interface LinphoneCore {
void transferCall(LinphoneCall call, String referTo);
void transferCallToAnother(LinphoneCall callToTransfer, LinphoneCall destination);
LinphoneCall findCallFromUri(String uri);
}

@ -1 +1 @@
Subproject commit e52635ac0d64eeec2670ce05566644fe5f296a47
Subproject commit 279c7874e94cfd5d8dfc36a0d61eaf6d2acc6f4c

View file

@ -13,6 +13,7 @@ status-red.png \
status-offline.png \
contact-orange.png dialer-orange.png history-orange.png\
startcall-green.png stopcall-red.png addcall-green.png linphone.icns \
contact_starred.png contact_unstarred.png
contact_starred.png contact_unstarred.png \
speaker.png
EXTRA_DIST=$(pixmap_DATA)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pixmaps/speaker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B