调整融云推流参数
This commit is contained in:
parent
628d9c7a1b
commit
88e27df986
@ -71,7 +71,7 @@ public class FaceManager implements SensorEventListener {
|
|||||||
* 配置美颜SDK
|
* 配置美颜SDK
|
||||||
*/
|
*/
|
||||||
public void initFURender(Context context) {
|
public void initFURender(Context context) {
|
||||||
|
initFaceUnity(context);
|
||||||
mFURenderer = FURenderer.getInstance();
|
mFURenderer = FURenderer.getInstance();
|
||||||
mFURenderer.setInputTextureType(FUInputTextureEnum.FU_ADM_FLAG_COMMON_TEXTURE);
|
mFURenderer.setInputTextureType(FUInputTextureEnum.FU_ADM_FLAG_COMMON_TEXTURE);
|
||||||
mFURenderer.setCameraFacing(CameraFacingEnum.CAMERA_FRONT);
|
mFURenderer.setCameraFacing(CameraFacingEnum.CAMERA_FRONT);
|
||||||
@ -105,9 +105,11 @@ public class FaceManager implements SensorEventListener {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void loadConfig(){
|
|
||||||
|
public void loadConfig() {
|
||||||
initFaceBeauty();
|
initFaceBeauty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initFaceBeauty() {
|
public void initFaceBeauty() {
|
||||||
FaceBeautyDataFactory faceBeautyDataFactory;
|
FaceBeautyDataFactory faceBeautyDataFactory;
|
||||||
faceBeautyDataFactory = new FaceBeautyDataFactory();
|
faceBeautyDataFactory = new FaceBeautyDataFactory();
|
||||||
@ -115,9 +117,9 @@ public class FaceManager implements SensorEventListener {
|
|||||||
for (String key : configMap.keySet()) {
|
for (String key : configMap.keySet()) {
|
||||||
if ("FilterViewHolder_".equals(key)) {
|
if ("FilterViewHolder_".equals(key)) {
|
||||||
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
||||||
if (filter.getKey().equals(configMap.get(key))&&!"origin".equals(configMap.get(key))) {
|
if (filter.getKey().equals(configMap.get(key)) && !"origin".equals(configMap.get(key))) {
|
||||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val")))/100, filter.getDesRes());
|
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"))) / 100, filter.getDesRes());
|
||||||
Log.i(TAG, "test: 设置滤镜 ="+filter.getKey()+" val = "+configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
Log.i(TAG, "test: 设置滤镜 =" + filter.getKey() + " val = " + configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,17 +127,17 @@ public class FaceManager implements SensorEventListener {
|
|||||||
String name = key.replace("BeautySkinViewHolder_", "");
|
String name = key.replace("BeautySkinViewHolder_", "");
|
||||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||||
if (bean.getKey().equals(name)) {
|
if (bean.getKey().equals(name)) {
|
||||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||||
Log.i(TAG, "test: 设置美颜 = "+bean.getKey()+" val = "+configMap.get(key));
|
Log.i(TAG, "test: 设置美颜 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(key.startsWith("BeautyShapeViewHolder")){
|
} else if (key.startsWith("BeautyShapeViewHolder")) {
|
||||||
String name = key.replace("BeautyShapeViewHolder_", "");
|
String name = key.replace("BeautyShapeViewHolder_", "");
|
||||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||||
if (bean.getKey().equals(name)) {
|
if (bean.getKey().equals(name)) {
|
||||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||||
Log.i(TAG, "test: 设置美肤 = "+bean.getKey()+" val = "+configMap.get(key));
|
Log.i(TAG, "test: 设置美肤 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,6 +279,7 @@ public class FaceManager implements SensorEventListener {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
isInit = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
});
|
});
|
||||||
configSPApp();
|
configSPApp();
|
||||||
//初始化美颜SDK
|
//初始化美颜SDK
|
||||||
FaceManager.initFaceUnity(this);
|
// FaceManager.initFaceUnity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -504,13 +504,13 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
|||||||
|
|
||||||
RCRTCVideoStreamConfig videoConfigBuilder = RCRTCVideoStreamConfig.Builder.create()
|
RCRTCVideoStreamConfig videoConfigBuilder = RCRTCVideoStreamConfig.Builder.create()
|
||||||
//设置分辨率
|
//设置分辨率
|
||||||
.setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_1080_1920)
|
.setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_720)
|
||||||
//设置帧率
|
//设置帧率
|
||||||
.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_24)
|
.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_30)
|
||||||
//设置最小码率,480P下推荐200
|
//设置最小码率,480P下推荐200
|
||||||
.setMinRate(250)
|
.setMinRate(250)
|
||||||
//设置最大码率,480P下推荐900
|
//设置最大码率,480P下推荐900
|
||||||
.setMaxRate(10000)
|
.setMaxRate(5000)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// 创建本地视频显示视图
|
// 创建本地视频显示视图
|
||||||
|
@ -489,7 +489,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
public void run() {
|
public void run() {
|
||||||
if (IMLoginManager.get(mContext).isHint()) {
|
if (IMLoginManager.get(mContext).isHint()) {
|
||||||
HintDialog fragment = new HintDialog();
|
HintDialog fragment = new HintDialog();
|
||||||
fragment.show(((FragmentActivity) mContext).getSupportFragmentManager(), "HintDialog");
|
fragment.show(MainActivity.this.getSupportFragmentManager(), "HintDialog");
|
||||||
fragment.setListener(new HintDialog.HintListener() {
|
fragment.setListener(new HintDialog.HintListener() {
|
||||||
@Override
|
@Override
|
||||||
public void requestPermission() {
|
public void requestPermission() {
|
||||||
|
Loading…
Reference in New Issue
Block a user