mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
android: improve android linphone app (video calls)
This commit is contained in:
parent
36a9938903
commit
9db25e99e4
4 changed files with 30 additions and 1 deletions
|
|
@ -1230,6 +1230,10 @@ extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_enableCamera(JNIEnv *en
|
|||
linphone_call_enable_camera((LinphoneCall *)lc, (bool_t) b);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCallImpl_cameraEnabled(JNIEnv *env, jobject thiz, jlong lc){
|
||||
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);
|
||||
}
|
||||
|
|
@ -1370,6 +1374,28 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_setVideoDevice(JNIEnv *e
|
|||
return -1;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getVideoDevice(JNIEnv *env,jobject thiz,jlong pCore) {
|
||||
LinphoneCore* lc = (LinphoneCore *) pCore;
|
||||
const char** devices = linphone_core_get_video_devices(lc);
|
||||
if (devices == NULL) {
|
||||
ms_error("No existing video devices\n");
|
||||
return -1;
|
||||
}
|
||||
const char* cam = linphone_core_get_video_device(lc);
|
||||
if (cam == NULL) {
|
||||
ms_error("No current video device\n");
|
||||
} else {
|
||||
int i=0;
|
||||
while(devices[i] != NULL) {
|
||||
if (strcmp(devices[i], cam) == 0)
|
||||
return i;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
ms_warning("Returning default (0) device\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneCallImpl_getAuthenticationToken(JNIEnv* env,jobject thiz,jlong ptr) {
|
||||
LinphoneCall *call = (LinphoneCall *) ptr;
|
||||
const char* token = linphone_call_get_authentication_token(call);
|
||||
|
|
|
|||
|
|
@ -152,6 +152,8 @@ public interface LinphoneCall {
|
|||
LinphoneCallParams getCurrentParamsCopy();
|
||||
|
||||
void enableCamera(boolean enabled);
|
||||
boolean cameraEnabled();
|
||||
|
||||
/**
|
||||
* Enables or disable echo cancellation.
|
||||
* @param enable
|
||||
|
|
|
|||
|
|
@ -477,6 +477,7 @@ public interface LinphoneCore {
|
|||
void setDeviceRotation(int rotation);
|
||||
|
||||
void setVideoDevice(int id);
|
||||
int getVideoDevice();
|
||||
|
||||
/**
|
||||
* Enables video globally.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit a82dcdbf8a4e8364bdcaa6f6fb88ca087f48a780
|
||||
Subproject commit af7bb8b24da40d653a89bc61cd7832db773fa48c
|
||||
Loading…
Add table
Reference in a new issue