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
1b78b453
Commit
1b78b453
authored
Aug 21, 2017
by
Sylvain Berfini
🐮
Browse files
Added LinphoneCall's setVideoWindowId method in JNI wrapper
parent
78824b02
Changes
3
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecore_jni.cc
View file @
1b78b453
...
...
@@ -7846,6 +7846,21 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallImpl_setListener(JNIEn
linphone_call_set_next_video_frame_decoded_callback
(
call
,
_next_video_frame_decoded_callback
,
listener
);
}
extern
"C"
void
Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
lc
,
jobject
obj
)
{
jobject
oldWindow
=
(
jobject
)
linphone_call_get_native_video_window_id
((
LinphoneCall
*
)
lc
);
if
(
obj
!=
NULL
)
{
obj
=
env
->
NewGlobalRef
(
obj
);
ms_message
(
"Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): NewGlobalRef(%p)"
,
obj
);
}
else
ms_message
(
"Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): setting to NULL"
);
linphone_call_set_native_video_window_id
((
LinphoneCall
*
)
lc
,(
void
*
)
obj
);
if
(
oldWindow
!=
NULL
)
{
ms_message
(
"Java_org_linphone_core_LinphoneCallImpl_setVideoWindowId(): DeleteGlobalRef(%p)"
,
oldWindow
);
env
->
DeleteGlobalRef
(
oldWindow
);
}
}
/*
* returns the java TunnelConfig associated with a C LinphoneTunnelConfig.
...
...
java/common/org/linphone/core/LinphoneCall.java
View file @
1b78b453
...
...
@@ -20,6 +20,8 @@ package org.linphone.core;
import
java.util.Vector
;
import
org.linphone.mediastream.video.AndroidVideoWindowImpl
;
/**
* Object representing a call. Calls are created using {@link LinphoneCore#invite(LinphoneAddress)} or passed to the application by listener {@link LinphoneCoreListener#callState}
*
...
...
@@ -404,6 +406,13 @@ public interface LinphoneCall {
*/
void
setListener
(
LinphoneCall
.
LinphoneCallListener
listener
);
/**
* Set the native video window id where the video is to be displayed.
* On Android, it must be of type {@link AndroidVideoWindowImpl}
* @param w window of type {@link AndroidVideoWindowImpl}
*/
void
setVideoWindow
(
Object
w
);
/**
* Indicates if remote party requested automatic answering to be performed.
* This is an indication - the application remains responsible for answering the call.
...
...
java/impl/org/linphone/core/LinphoneCallImpl.java
View file @
1b78b453
...
...
@@ -45,6 +45,7 @@ class LinphoneCallImpl implements LinphoneCall {
private
native
float
getAverageQuality
(
long
nativePtr
);
private
native
boolean
mediaInProgress
(
long
nativePtr
);
private
native
void
setListener
(
long
ptr
,
LinphoneCallListener
listener
);
private
native
void
setVideoWindowId
(
long
nativePtr
,
Object
wid
);
native
private
long
getDiversionAddress
(
long
nativePtr
);
native
private
Object
getStats
(
long
nativePtr
,
int
stream_type
);
native
private
LinphoneCore
getCore
(
long
nativePtr
);
...
...
@@ -295,6 +296,11 @@ class LinphoneCallImpl implements LinphoneCall {
setListener
(
nativePtr
,
listener
);
}
}
@Override
public
synchronized
void
setVideoWindow
(
Object
w
)
{
setVideoWindowId
(
nativePtr
,
w
);
}
public
LinphoneAddress
getDiversionAddress
()
{
long
lNativePtr
=
getDiversionAddress
(
nativePtr
);
...
...
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