Android TextureView Display

How to use it

Since linphone-android's commit id 6a2a652957fdc0b347ddc2db7d37a6d3acb5c654 a new display filter for video calls is available.

It relies upon Android's TextureView instead of SurfaceView, and is much easier to use.

Here's how to use it:

TextureView mVideoView = view.findViewById(R.id.videoSurface);
TextureView mCaptureView = view.findViewById(R.id.videoCaptureSurface);

LinphoneManager.getLc().setNativeVideoWindowId(mVideoView);
LinphoneManager.getLc().setNativePreviewWindowId(mCaptureView);

There is no longer any need for the developper to use a listener and set/remove the view depending on the surface's state, everything is handled by the liblinphone SDK.

How to keep using the previous one

This filter is now used by default (since linphone's commit 3792f8c5cffc991425d4664d12873c8b60b3d934 and mediastreamer2's commit b44b9fcacb6db7948092ef107055b092f53b0def), but you can still continue to use the previous one using the GL2JNIView and the SurfaceView.

To do so, simply add the following inside the linphonerc_factory of your application:

[video]
displaytype=MSAndroidOpenGLDisplay
Tags:
Created by Sylvain Berfini on 2018/11/08 12:51