|
本帖最后由 xudalin 于 2014-8-12 16:09 编辑
我把CheckVideoStatus的方法中加了else判断 但好像没有用 要怎么设置呢?- if (!bOtherVideoOpened) {
- if (anychat.GetCameraState(userID) == 2 && anychat.GetUserVideoWidth(userID) != 0) {
- otherView.setBackgroundColor(Color.TRANSPARENT);
- SurfaceHolder holder = otherView.getHolder();
- // 如果是采用内核视频显示(非Java驱动),则需要设置Surface的参数
- if(AnyChatCoreSDK.GetSDKOptionInt(AnyChatDefine.BRAC_SO_VIDEOSHOW_DRIVERCTRL) != AnyChatDefine.VIDEOSHOW_DRIVER_JAVA) {
- holder.setFormat(PixelFormat.RGB_565);
- holder.setFixedSize(anychat.GetUserVideoWidth(userID), anychat.GetUserVideoHeight(userID));
- }
- Surface s = holder.getSurface();
- anychat.SetVideoPos(userID, s, 0, 0, 0, 0);
- bOtherVideoOpened = true;
- } else {
- otherView.setBackgroundColor(Color.BLACK);
- }
- }
- if (!bSelfVideoOpened) {
- if (anychat.GetCameraState(-1) == 2 && anychat.GetUserVideoWidth(-1) != 0) {
- myView.setBackgroundColor(Color.TRANSPARENT);
- SurfaceHolder holder = myView.getHolder();
- // 如果是采用内核视频显示(非Java驱动),则需要设置Surface的参数
- if(AnyChatCoreSDK.GetSDKOptionInt(AnyChatDefine.BRAC_SO_VIDEOSHOW_DRIVERCTRL) != AnyChatDefine.VIDEOSHOW_DRIVER_JAVA) {
- holder.setFormat(PixelFormat.RGB_565);
- holder.setFixedSize(anychat.GetUserVideoWidth(-1), anychat.GetUserVideoHeight(-1));
- }
- Surface s = holder.getSurface();
- anychat.SetVideoPos(-1, s, 0, 0, 0, 0);
- bSelfVideoOpened = true;
- } else {
- myView.setBackgroundColor(Color.BLACK);
- }
- }
复制代码 |
|