Compare commits
62 Commits
master
...
新改版_poyo_启
Author | SHA1 | Date | |
---|---|---|---|
|
e447824ea1 | ||
|
54eb9ea099 | ||
|
98cb22a706 | ||
|
767bc41820 | ||
|
ef99178d33 | ||
|
24fa740e05 | ||
|
d662d5c3ea | ||
|
b9a6d9b966 | ||
|
0586360408 | ||
|
9d8bef398a | ||
|
602417f45d | ||
|
86902a8f9b | ||
|
7cb89035d8 | ||
|
f39f2b483e | ||
|
15f19e39a7 | ||
|
10d1d22b8a | ||
|
96b302f0ee | ||
|
99d8df2ec3 | ||
|
4e42a4b04c | ||
|
c582376cc4 | ||
|
e58ce7932f | ||
|
9a72e54ca3 | ||
|
6de4523d27 | ||
|
40966e0b33 | ||
|
935a5a3ec5 | ||
|
34aaa61f11 | ||
|
5373f6b5bc | ||
|
c84fc9e8f1 | ||
|
b68b334e00 | ||
|
bfb172c1e8 | ||
|
277684b8e0 | ||
|
d181e0e743 | ||
|
361d23b9ef | ||
|
745702e36c | ||
|
0b62d4ddc4 | ||
|
23d3c9a915 | ||
|
8a23e76788 | ||
|
6f2de3a4d7 | ||
|
68f444b3fc | ||
|
f616fb1192 | ||
|
cd4d0c13c1 | ||
|
a8f92a1e38 | ||
|
a1b59733b3 | ||
|
f1670965b9 | ||
|
1985eebfb1 | ||
|
d299e579d6 | ||
|
02ee96e369 | ||
|
ed595ec1f4 | ||
|
5dc2b15bd8 | ||
|
08bc59f80e | ||
|
25a926e507 | ||
|
abfb8e74be | ||
|
6e0e195c20 | ||
|
0854d931d4 | ||
|
98a0009019 | ||
|
b9503b91f5 | ||
|
dee916ea7d | ||
|
2e1eb3c7b4 | ||
|
2102a3bfc2 | ||
|
1576a75c08 | ||
|
89e4373d81 | ||
|
59271ce709 |
@ -33,8 +33,7 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
// abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
}
|
||||
}
|
||||
aaptOptions {
|
||||
|
@ -38,6 +38,9 @@ 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;
|
||||
|
||||
/**
|
||||
* 美颜模块管理类
|
||||
@ -175,6 +178,44 @@ 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里使用
|
||||
@ -237,6 +278,12 @@ public class FaceManager implements SensorEventListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 离开渲染界面时注销融云监听器,不然会绿屏
|
||||
*/
|
||||
public void onClose() {
|
||||
RCRTCEngine.getInstance().getDefaultVideoStream().setVideoFrameListener(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放资源
|
||||
|
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_animoji.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_beauty.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_beauty_body.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_big_head.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_fine_sticker.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_makeup.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/ico_home_sticker.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_baihu.png
Normal file
After Width: | Height: | Size: 276 KiB |
Before Width: | Height: | Size: 58 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_baimao.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 131 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_douniuquan.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.8 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_frog_st.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 7.9 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_hashiqi.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_hetun.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.1 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_huangya.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.5 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_kaola.png
Normal file
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 14 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_kuloutou.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.8 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_qgirl.png
Normal file
After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 5.8 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_animoji_wuxia.png
Normal file
After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 107 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_baozi.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_bluebird.png
Normal file
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 8.7 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_fenhudie.png
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 9.5 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_lanhudie.png
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 9.5 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_tiger.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_tiger_bai.png
Normal file
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_tiger_huang.png
Normal file
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_ar_xiongmao.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 16 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_avatar_female.png
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
FaceUnity/src/main/res/mipmap-xxhdpi/icon_avatar_male.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |