Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
075f13f2
Commit
075f13f2
authored
Aug 12, 2015
by
Margaux Clerc
Browse files
Remove textReceived callback
Made echo calibration at start
parent
0aef436d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
56 deletions
+17
-56
build/android/Android.mk
build/android/Android.mk
+1
-0
coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java
...java/org/linphone/core/tutorials/TutorialBuddyStatus.java
+0
-1
coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java
...lp/java/org/linphone/core/tutorials/TutorialChatRoom.java
+0
-4
coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java
...ava/org/linphone/core/tutorials/TutorialRegistration.java
+0
-1
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+11
-29
java/common/org/linphone/core/LinphoneCore.java
java/common/org/linphone/core/LinphoneCore.java
+1
-1
java/common/org/linphone/core/LinphoneCoreListener.java
java/common/org/linphone/core/LinphoneCoreListener.java
+0
-9
java/common/org/linphone/core/LinphoneCoreListenerBase.java
java/common/org/linphone/core/LinphoneCoreListenerBase.java
+0
-7
java/impl/org/linphone/core/LinphoneCoreImpl.java
java/impl/org/linphone/core/LinphoneCoreImpl.java
+3
-3
mediastreamer2
mediastreamer2
+1
-1
No files found.
build/android/Android.mk
View file @
075f13f2
...
...
@@ -118,6 +118,7 @@ LOCAL_C_INCLUDES += \
$(LOCAL_PATH)
/../build/android
\
$(LOCAL_PATH)
/../oRTP/include
\
$(LOCAL_PATH)
/../mediastreamer2/include
\
$(LOCAL_PATH)
/../mediastreamer2/src/audiofilters/
\
$(LOCAL_PATH)
/../../belle-sip/include
\
$(LOCAL_PATH)
/../../../gen
\
$(LOCAL_PATH)
/../../externals/libxml2/include
\
...
...
coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java
View file @
075f13f2
...
...
@@ -104,7 +104,6 @@ public class TutorialBuddyStatus implements LinphoneCoreListener {
public
void
displayMessage
(
LinphoneCore
lc
,
String
message
)
{}
public
void
displayWarning
(
LinphoneCore
lc
,
String
message
)
{}
public
void
globalState
(
LinphoneCore
lc
,
GlobalState
state
,
String
message
)
{}
public
void
textReceived
(
LinphoneCore
lc
,
LinphoneChatRoom
cr
,
LinphoneAddress
from
,
String
message
)
{}
public
void
callState
(
LinphoneCore
lc
,
LinphoneCall
call
,
State
cstate
,
String
msg
)
{}
public
void
callStatsUpdated
(
LinphoneCore
lc
,
LinphoneCall
call
,
LinphoneCallStats
stats
)
{}
public
void
ecCalibrationStatus
(
LinphoneCore
lc
,
EcCalibratorStatus
status
,
int
delay_ms
,
Object
data
)
{}
...
...
coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java
View file @
075f13f2
...
...
@@ -90,10 +90,6 @@ public class TutorialChatRoom implements LinphoneCoreListener, LinphoneChatMessa
public
void
callEncryptionChanged
(
LinphoneCore
lc
,
LinphoneCall
call
,
boolean
encrypted
,
String
authenticationToken
)
{}
public
void
notifyReceived
(
LinphoneCore
lc
,
LinphoneCall
call
,
LinphoneAddress
from
,
byte
[]
event
){}
public
void
dtmfReceived
(
LinphoneCore
lc
,
LinphoneCall
call
,
int
dtmf
)
{}
public
void
textReceived
(
LinphoneCore
lc
,
LinphoneChatRoom
cr
,
LinphoneAddress
from
,
String
message
)
{
//Deprecated
}
...
...
coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java
View file @
075f13f2
...
...
@@ -88,7 +88,6 @@ public class TutorialRegistration implements LinphoneCoreListener {
public
void
globalState
(
LinphoneCore
lc
,
GlobalState
state
,
String
message
)
{}
public
void
newSubscriptionRequest
(
LinphoneCore
lc
,
LinphoneFriend
lf
,
String
url
)
{}
public
void
notifyPresenceReceived
(
LinphoneCore
lc
,
LinphoneFriend
lf
)
{}
public
void
textReceived
(
LinphoneCore
lc
,
LinphoneChatRoom
cr
,
LinphoneAddress
from
,
String
message
)
{}
public
void
callState
(
LinphoneCore
lc
,
LinphoneCall
call
,
State
cstate
,
String
msg
)
{}
public
void
callStatsUpdated
(
LinphoneCore
lc
,
LinphoneCall
call
,
LinphoneCallStats
stats
)
{}
public
void
ecCalibrationStatus
(
LinphoneCore
lc
,
EcCalibratorStatus
status
,
int
delay_ms
,
Object
data
)
{}
...
...
coreapi/linphonecore_jni.cc
View file @
075f13f2
...
...
@@ -29,6 +29,7 @@ extern "C" {
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msmediaplayer.h"
#include "mediastreamer2/msutils.h"
#include "devices.h"
}
#include "mediastreamer2/msjava.h"
#include "private.h"
...
...
@@ -377,12 +378,6 @@ public:
vTable
->
notify_presence_received
=
notify_presence_received
;
}
/*void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message);*/
textReceivedId
=
env
->
GetMethodID
(
listenerClass
,
"textReceived"
,
"(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneChatRoom;Lorg/linphone/core/LinphoneAddress;Ljava/lang/String;)V"
);
if
(
textReceivedId
)
{
vTable
->
text_received
=
text_received
;
}
messageReceivedId
=
env
->
GetMethodID
(
listenerClass
,
"messageReceived"
,
"(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneChatRoom;Lorg/linphone/core/LinphoneChatMessage;)V"
);
if
(
messageReceivedId
)
{
vTable
->
message_received
=
message_received
;
...
...
@@ -522,7 +517,6 @@ public:
jmethodID
displayStatusId
;
jmethodID
newSubscriptionRequestId
;
jmethodID
notifyPresenceReceivedId
;
jmethodID
textReceivedId
;
jmethodID
messageReceivedId
;
jmethodID
isComposingReceivedId
;
jmethodID
dtmfReceivedId
;
...
...
@@ -786,23 +780,6 @@ public:
,
dtmf
);
handle_possible_java_exception
(
env
,
lcData
->
listener
);
}
static
void
text_received
(
LinphoneCore
*
lc
,
LinphoneChatRoom
*
room
,
const
LinphoneAddress
*
from
,
const
char
*
message
)
{
JNIEnv
*
env
=
0
;
jint
result
=
jvm
->
AttachCurrentThread
(
&
env
,
NULL
);
if
(
result
!=
0
)
{
ms_error
(
"cannot attach VM"
);
return
;
}
LinphoneCoreVTable
*
table
=
linphone_core_get_current_vtable
(
lc
);
LinphoneCoreData
*
lcData
=
(
LinphoneCoreData
*
)
linphone_core_v_table_get_user_data
(
table
);
env
->
CallVoidMethod
(
lcData
->
listener
,
lcData
->
textReceivedId
,
lcData
->
core
,
env
->
NewObject
(
lcData
->
chatRoomClass
,
lcData
->
chatRoomCtrId
,(
jlong
)
room
)
,
env
->
NewObject
(
lcData
->
addressClass
,
lcData
->
addressCtrId
,(
jlong
)
from
)
,
message
?
env
->
NewStringUTF
(
message
)
:
NULL
);
handle_possible_java_exception
(
env
,
lcData
->
listener
);
}
static
void
message_received
(
LinphoneCore
*
lc
,
LinphoneChatRoom
*
room
,
LinphoneChatMessage
*
msg
)
{
JNIEnv
*
env
=
0
;
jobject
jmsg
;
...
...
@@ -2008,24 +1985,29 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_needsEchoCalibration
ms_error
(
"Could not get soundcard %s"
,
card
);
return
TRUE
;
}
SoundDeviceDescription
*
sound_description
=
sound_device_description_get
();
if
(
sound_description
!=
NULL
&&
sound_description
==
&
genericSoundDeviceDescriptor
){
return
TRUE
;
}
if
(
ms_snd_card_get_capabilities
(
sndcard
)
&
MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER
)
return
FALSE
;
if
(
ms_snd_card_get_minimal_latency
(
sndcard
)
!=
0
)
return
FALSE
;
return
TRUE
;
}
extern
"C"
jboolean
Java_org_linphone_core_LinphoneCoreImpl_
needs
EchoCanceler
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
)
{
extern
"C"
jboolean
Java_org_linphone_core_LinphoneCoreImpl_
hasBuiltIn
EchoCanceler
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
)
{
MSSndCard
*
sndcard
;
MSSndCardManager
*
m
=
ms_snd_card_manager_get
();
const
char
*
card
=
linphone_core_get_capture_device
((
LinphoneCore
*
)
lc
);
sndcard
=
ms_snd_card_manager_get_card
(
m
,
card
);
if
(
sndcard
==
NULL
)
{
ms_error
(
"Could not get soundcard %s"
,
card
);
return
TRU
E
;
return
FALS
E
;
}
if
(
ms_snd_card_get_capabilities
(
sndcard
)
&
MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER
)
return
FALS
E
;
return
TRU
E
;
if
(
ms_snd_card_get_capabilities
(
sndcard
)
&
MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER
)
return
TRU
E
;
return
FALS
E
;
}
extern
"C"
jint
Java_org_linphone_core_LinphoneCoreImpl_getMediaEncryption
(
JNIEnv
*
env
...
...
java/common/org/linphone/core/LinphoneCore.java
View file @
075f13f2
...
...
@@ -1186,7 +1186,7 @@ public interface LinphoneCore {
* Returns true if the software echo canceler needs to be turned on.
* If the device has a builtin echo canceller, it will return false.
*/
boolean
needs
EchoCanceler
();
boolean
hasBuiltIn
EchoCanceler
();
void
enableIpv6
(
boolean
enable
);
...
...
java/common/org/linphone/core/LinphoneCoreListener.java
View file @
075f13f2
...
...
@@ -53,15 +53,6 @@ public interface LinphoneCoreListener {
*/
void
notifyPresenceReceived
(
LinphoneCore
lc
,
LinphoneFriend
lf
);
/**
* invoked when a new text message is received
* @param lc LinphoneCore
* @param room LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room.
* @param from LinphoneAddress from
* @param message incoming message
*/
void
textReceived
(
LinphoneCore
lc
,
LinphoneChatRoom
cr
,
LinphoneAddress
from
,
String
message
);
/**
* invoked when a new dtmf is received
* @param lc LinphoneCore
...
...
java/common/org/linphone/core/LinphoneCoreListenerBase.java
View file @
075f13f2
...
...
@@ -38,13 +38,6 @@ public class LinphoneCoreListenerBase implements LinphoneCoreListener {
}
@Override
public
void
textReceived
(
LinphoneCore
lc
,
LinphoneChatRoom
cr
,
LinphoneAddress
from
,
String
message
)
{
// TODO Auto-generated method stub
}
@Override
public
void
dtmfReceived
(
LinphoneCore
lc
,
LinphoneCall
call
,
int
dtmf
)
{
// TODO Auto-generated method stub
...
...
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
075f13f2
...
...
@@ -1057,10 +1057,10 @@ class LinphoneCoreImpl implements LinphoneCore {
public
synchronized
boolean
needsEchoCalibration
()
{
return
needsEchoCalibration
(
nativePtr
);
}
private
native
boolean
needs
EchoCanceler
(
long
ptr
);
private
native
boolean
hasBuiltIn
EchoCanceler
(
long
ptr
);
@Override
public
synchronized
boolean
needs
EchoCanceler
()
{
return
needs
EchoCanceler
(
nativePtr
);
public
synchronized
boolean
hasBuiltIn
EchoCanceler
()
{
return
hasBuiltIn
EchoCanceler
(
nativePtr
);
}
private
native
void
declineCall
(
long
coreptr
,
long
callptr
,
int
reason
);
@Override
...
...
mediastreamer2
@
cbdcaacb
Subproject commit
46c025c428a0bd7c351258ce0d20d6341e895287
Subproject commit
cbdcaacbb6a4938c2c5997049b4f701c664aa0f1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment