AnyChat技术支持论坛

标题: AnyChat在安卓上如何设置视频参数? [打印本页]

作者: 一瓶爱因斯坦    时间: 2015-8-6 18:10
标题: AnyChat在安卓上如何设置视频参数?
anyChatCoreSDK.InitSDK(android.os.Build.VERSION.SDK_INT, 0);anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_GOPCTRL, "20");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL, "1000000");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, "640");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL, "480");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL, "20");

anyChatCoreSDK.InitSDK(android.os.Build.VERSION.SDK_INT, 0);anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_GOPCTRL, "30");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL, "500000");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, "640");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL, "480");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL, "12");

我在手机A上设置了如上参数, 然后手机B向A发起视频请求, 在上面的两个参数下, 显示的效果都一样, 很模糊 , 就像是不起作用一样?  完全不设置参数的话也没效果。。。  请问到底该怎么设置参数呢?

作者: 一瓶爱因斯坦    时间: 2015-8-6 18:11

anyChatCoreSDK.InitSDK(android.os.Build.VERSION.SDK_INT, 0);anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_GOPCTRL, "20");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL, "1000000");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, "640");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL, "480");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL, "20");

anyChatCoreSDK.InitSDK(android.os.Build.VERSION.SDK_INT, 0);anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_GOPCTRL, "30");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_BITRATECTRL, "500000");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, "640");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_HEIGHTCTRL, "480");
anyChatCoreSDK.SetSDKOptionString(AnyChatDefine.BRAC_SO_LOCALVIDEO_FPSCTRL, "12");

我在手机A上设置了如上参数, 然后手机B向A发起视频请求, 在上面的两个参数下, 显示的效果都一样, 很模糊 , 就像是不起作用一样?  完全不设置参数的话也没效果。。。  请问到底该怎么设置参数呢?
作者: admin    时间: 2015-8-6 18:15
您好,您的参数设置代码有问题,请参考helloAnyChat(源代码位于SDK包\src\helloAnyChat目录下)项目源代码,里面有设置视频质量的代码。

正常的代码应该是:
anyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_WIDTHCTRL, 640);
……
作者: admin    时间: 2015-8-6 18:30
相关代码位于:AnyChat for Android SDK\src\HelloAnyChat\src\com\example\helloanychat\MainActivity.java-->ApplyVideoConfig()




欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) Powered by Discuz! X3