mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
add video call activity
still to be debugged
This commit is contained in:
parent
8aa6a242ec
commit
c909af1791
2 changed files with 15 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ import android.view.SurfaceView;
|
|||
import android.view.Surface.OutOfResourcesException;
|
||||
import android.view.SurfaceHolder.Callback;
|
||||
|
||||
public class AndroidVideoWindowImpl implements VideoWindow {
|
||||
public class AndroidVideoWindowImpl implements Object {
|
||||
private Bitmap mBitmap;
|
||||
private SurfaceView mView;
|
||||
private Surface mSurface;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.util.Vector;
|
||||
|
||||
import android.view.SurfaceView;
|
||||
|
||||
|
||||
class LinphoneCoreImpl implements LinphoneCore {
|
||||
|
||||
|
|
@ -71,6 +73,9 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void addFriend(long nativePtr,long friend);
|
||||
private native void setPresenceInfo(long nativePtr,int minute_away, String alternative_contact,int status);
|
||||
private native long createChatRoom(long nativePtr,String to);
|
||||
private native void enableVideo(long nativePtr,boolean vcap_enabled,boolean display_enabled);
|
||||
private native boolean isVideoEnabled(long nativePtr);
|
||||
|
||||
|
||||
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||
mListener=listener;
|
||||
|
|
@ -296,10 +301,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public LinphoneChatRoom createChatRoom(String to) {
|
||||
return new LinphoneChatRoomImpl(createChatRoom(nativePtr,to));
|
||||
}
|
||||
public void setPreviewWindow(VideoWindow w) {
|
||||
public void setPreviewWindow(Object w) {
|
||||
if (mPreviewWindow!=null)
|
||||
mPreviewWindow.setListener(null);
|
||||
mPreviewWindow=(AndroidVideoWindowImpl)w;
|
||||
mPreviewWindow=new AndroidVideoWindowImpl((SurfaceView)w);
|
||||
mPreviewWindow.setListener(new AndroidVideoWindowImpl.VideoWindowListener(){
|
||||
public void onSurfaceDestroyed(AndroidVideoWindowImpl vw) {
|
||||
setPreviewWindowId(nativePtr,null);
|
||||
|
|
@ -310,7 +315,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
});
|
||||
}
|
||||
public void setVideoWindow(VideoWindow w) {
|
||||
public void setVideoWindow(Object w) {
|
||||
if (mVideoWindow!=null)
|
||||
mVideoWindow.setListener(null);
|
||||
mVideoWindow=(AndroidVideoWindowImpl)w;
|
||||
|
|
@ -324,5 +329,11 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
});
|
||||
}
|
||||
public void enableVideo(boolean vcap_enabled, boolean display_enabled) {
|
||||
enableVideo(nativePtr,vcap_enabled, display_enabled);
|
||||
}
|
||||
public boolean isVideoEnabled() {
|
||||
return isVideoEnabled(nativePtr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue