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
a779c59e
Commit
a779c59e
authored
Mar 02, 2011
by
Guillaume Beraudo
Browse files
Call duration accessor
Revert speaker on dtmf Remove useless public on interfaces.
parent
f515a560
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
23 deletions
+29
-23
coreapi/linphonecall.c
coreapi/linphonecall.c
+1
-1
coreapi/linphonecore.c
coreapi/linphonecore.c
+3
-4
coreapi/linphonecore.h
coreapi/linphonecore.h
+1
-1
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+5
-3
java/common/org/linphone/core/LinphoneCall.java
java/common/org/linphone/core/LinphoneCall.java
+16
-11
java/common/org/linphone/core/LinphoneCore.java
java/common/org/linphone/core/LinphoneCore.java
+3
-3
No files found.
coreapi/linphonecall.c
View file @
a779c59e
...
...
@@ -623,7 +623,7 @@ static void video_stream_event_cb(void *user_pointer, const MSFilter *f, const u
ms_warning
(
"In linphonecall.c: video_stream_event_cb"
);
switch
(
event_id
)
{
case
MS_VIDEO_DECODER_DECODING_ERRORS
:
ms_warning
(
"C
A
se is MS_VIDEO_DECODER_DECODING_ERRORS"
);
ms_warning
(
"C
a
se is MS_VIDEO_DECODER_DECODING_ERRORS"
);
linphone_call_send_vfu_request
((
LinphoneCall
*
)
user_pointer
);
break
;
default:
...
...
coreapi/linphonecore.c
View file @
a779c59e
...
...
@@ -3584,16 +3584,15 @@ static MSFilter *get_dtmf_gen(LinphoneCore *lc){
/**
* Plays a dtmf to the local user.
**/
void
linphone_core_play_dtmf
(
LinphoneCore
*
lc
,
char
dtmf
,
int
duration_ms
,
bool_t
speaker
){
void
linphone_core_play_dtmf
(
LinphoneCore
*
lc
,
char
dtmf
,
int
duration_ms
){
MSFilter
*
f
=
get_dtmf_gen
(
lc
);
if
(
f
==
NULL
){
ms_error
(
"No dtmf generator at this time !"
);
return
;
}
if
(
!
speaker
&&
!
linphone_core_in_call
(
lc
))
{
// If not in call and user doesn't want sound to go out from speaker
// TODO: update dtmf generator to only output on output stream if speaker is false.
// Play DTMF only when in call
if
(
!
linphone_core_in_call
(
lc
))
{
return
;
}
...
...
coreapi/linphonecore.h
View file @
a779c59e
...
...
@@ -911,7 +911,7 @@ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
void
linphone_core_set_play_file
(
LinphoneCore
*
lc
,
const
char
*
file
);
void
linphone_core_set_record_file
(
LinphoneCore
*
lc
,
const
char
*
file
);
void
linphone_core_play_dtmf
(
LinphoneCore
*
lc
,
char
dtmf
,
int
duration_ms
,
bool_t
speaker
);
void
linphone_core_play_dtmf
(
LinphoneCore
*
lc
,
char
dtmf
,
int
duration_ms
);
void
linphone_core_stop_dtmf
(
LinphoneCore
*
lc
);
int
linphone_core_get_current_call_duration
(
const
LinphoneCore
*
lc
);
...
...
coreapi/linphonecore_jni.cc
View file @
a779c59e
...
...
@@ -508,9 +508,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_playDtmf( JNIEnv* env
,
jobject
thiz
,
jlong
lc
,
jchar
dtmf
,
jint
duration
,
jboolean
speaker
)
{
linphone_core_play_dtmf
((
LinphoneCore
*
)
lc
,
dtmf
,
duration
,
speaker
);
,
jint
duration
)
{
linphone_core_play_dtmf
((
LinphoneCore
*
)
lc
,
dtmf
,
duration
);
}
extern
"C"
void
Java_org_linphone_core_LinphoneCoreImpl_stopDtmf
(
JNIEnv
*
env
,
jobject
thiz
...
...
@@ -1174,3 +1173,6 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setExpires(JNIEnv
linphone_proxy_config_expires
((
LinphoneProxyConfig
*
)
ptr
,
(
int
)
delay
);
}
extern
"C"
jint
Java_org_linphone_core_LinphoneCallImpl_getDuration
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
linphone_call_get_duration
((
LinphoneCall
*
)
ptr
);
}
\ No newline at end of file
java/common/org/linphone/core/LinphoneCall.java
View file @
a779c59e
...
...
@@ -137,50 +137,55 @@ public interface LinphoneCall {
/**
* Retrieves the call's current state.
**/
public
State
getState
();
State
getState
();
/**
* Returns the remote address associated to this call
*
**/
public
LinphoneAddress
getRemoteAddress
();
LinphoneAddress
getRemoteAddress
();
/**
* get direction of the call (incoming or outgoing).
* @return CallDirection
*/
public
CallDirection
getDirection
();
CallDirection
getDirection
();
/**
* get the call log associated to this call.
* @Return LinphoneCallLog
**/
public
LinphoneCallLog
getCallLog
();
LinphoneCallLog
getCallLog
();
public
LinphoneCallParams
getCurrentParamsCopy
();
LinphoneCallParams
getCurrentParamsCopy
();
public
void
enableCamera
(
boolean
enabled
);
void
enableCamera
(
boolean
enabled
);
/**
* Enables or disable echo cancellation.
* @param enable
*/
public
void
enableEchoCancellation
(
boolean
enable
);
void
enableEchoCancellation
(
boolean
enable
);
/**
* get EC status
* @return true if echo cancellation is enabled.
*/
public
boolean
isEchoCancellationEnabled
();
boolean
isEchoCancellationEnabled
();
/**
* Enables or disable echo limiter cancellation.
* @param enable
*/
public
void
enableEchoLimiter
(
boolean
enable
);
void
enableEchoLimiter
(
boolean
enable
);
/**
* get EL status
* @return true if echo limiter is enabled.
*/
public
boolean
isEchoLimiterEnabled
();
boolean
isEchoLimiterEnabled
();
/**
* Returns the object associated to a call this one is replacing.
* Call replacement can occur during transfer scenarios.
*/
public
LinphoneCall
getReplacedCall
();
LinphoneCall
getReplacedCall
();
/**
* @return call duration computed from media start
*/
int
getDuration
();
}
java/common/org/linphone/core/LinphoneCore.java
View file @
a779c59e
...
...
@@ -391,12 +391,12 @@ public interface LinphoneCore {
*/
public
void
sendDtmf
(
char
number
);
/**
* Initiate a dtmf signal to the speqker if not in call
* Initiate a dtmf signal to the speaker if not in call.
* Sending of the DTMF is done in another function.
* @param number
* @param duration in ms , -1 for unlimited
* @param speaker play dtmf on speaker
*/
public
void
playDtmf
(
char
number
,
int
duration
,
boolean
speaker
);
public
void
playDtmf
(
char
number
,
int
duration
);
/**
* stop current dtmf
*/
...
...
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