|
5#
楼主 |
发表于 2015-5-28 19:00:04
|
只看该作者
试了一下,还是不行,设置分辨率没变化。
这是我的改分辨率的代码,不知是否有问题。- private void intiVideoParams(VideoConfigEntity config) {
- anychatSDK.UserCameraControl(-1, 0);
-
- //设置帧率,默认为20fps
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL, config.mVideoFps);
- // 设置本地视频编码的码率(如果码率为0,则表示使用质量优先模式)
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL, config.mVideoBitrate);
- // 设置本地视频采集分辨率,默认为640*480
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, config.mResolutionWidth);
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL, config.mResolutionHeight);
- //消除回音
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_AUDIO_ECHOCTRL, config.mEnableAEC);
- // 设置本地视频编码的质量
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_QUALITYCTRL, config.mVideoQuality);
- //关键步骤,要设置该参数为VIDEO_MODE_CUSTOMCONFIG,上述参数才能生效
- AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_APPLYPARAM, config.mConfigMode);
-
- anychatSDK.UserCameraControl(-1, 1);
- }
复制代码 |
|