1、删除融云RTC功能,app能跑起来了。但是游戏IM出问题
This commit is contained in:
@@ -38,9 +38,6 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCVideoOutputFrameListener;
|
||||
import cn.rongcloud.rtc.base.RCRTCVideoFrame;
|
||||
|
||||
/**
|
||||
* 美颜模块管理类
|
||||
@@ -178,44 +175,6 @@ public class FaceManager implements SensorEventListener {
|
||||
private static final int CAMERA_SWITCH_SKIP_FRAME = 0;
|
||||
private volatile boolean mSkip;
|
||||
|
||||
/**
|
||||
* 渲染融云视频帧
|
||||
*/
|
||||
public void drawRongFrame(Context context) {
|
||||
RCRTCEngine.getInstance().getDefaultVideoStream().setVideoFrameListener(new IRCRTCVideoOutputFrameListener() {
|
||||
@Override
|
||||
public RCRTCVideoFrame processVideoFrame(RCRTCVideoFrame callVideoFrame) {
|
||||
//Log.i(TAG, "processVideoFrame: egl context " + EGL14.eglGetCurrentContext());
|
||||
if (pauseFace) {
|
||||
return callVideoFrame;
|
||||
}
|
||||
int width = callVideoFrame.getWidth();
|
||||
int height = callVideoFrame.getHeight();
|
||||
|
||||
if (mIsFirstFrame) {
|
||||
mIsFirstFrame = false;
|
||||
//initCsvUtil(context);
|
||||
mFURenderer.prepareRenderer(mFURendererListener);
|
||||
}
|
||||
//long start = System.nanoTime();
|
||||
mFURenderer.setInputOrientation(callVideoFrame.getRotation());
|
||||
FURenderOutputData data = mFURenderer.onDrawFrameInputWithReturn(callVideoFrame.getData(), width, height);
|
||||
/* long time = System.nanoTime() - start;
|
||||
if (mCSVUtils != null) {
|
||||
mCSVUtils.writeCsv(null, time);
|
||||
}*/
|
||||
if (mSkippedFrames > 0 || mSkip) {
|
||||
--mSkippedFrames;
|
||||
return callVideoFrame;
|
||||
}
|
||||
if (data != null && data.getImage() != null && data.getImage().getBuffer() != null) {
|
||||
callVideoFrame.setData(data.getImage().getBuffer());
|
||||
}
|
||||
return callVideoFrame;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录渲染工具,调试用,在processVideoFrame里使用
|
||||
@@ -278,12 +237,6 @@ public class FaceManager implements SensorEventListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 离开渲染界面时注销融云监听器,不然会绿屏
|
||||
*/
|
||||
public void onClose() {
|
||||
RCRTCEngine.getInstance().getDefaultVideoStream().setVideoFrameListener(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放资源
|
||||
|
||||
Reference in New Issue
Block a user