AnyChat技术支持论坛

标题: 视频聊天 能看到自己,说话也能听见,看不见对方视频 [打印本页]

作者: coolkissxia    时间: 2013-11-20 13:18
标题: 视频聊天 能看到自己,说话也能听见,看不见对方视频
[2013-11-20 13:11:07(027)]        ---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2013-11-20 13:11:07(028)]        Load libanychatcore.so success!(V4.8 Build Time:Nov 11 2013 06:26:35)
[2013-11-20 13:11:07(029)]        Android OS SDK Version:16, Support ARMv7:2, Support Neon:4
[2013-11-20 13:11:07(040)]        Load libmediautil_v7.so success!(V4.8 Build Time:Sep 20 2013 07:55:34)
[2013-11-20 13:11:07(046)]        Load libmediashow_4.0.so success!(V4.8 Build Time:Sep 10 2013 04:00:43)
[2013-11-20 13:11:07(057)]        Load libmediacore_4.1.so success!(V4.8 Build Time:Sep 20 2013 07:55:21)
[2013-11-20 13:11:07(063)]        CPU:2989.00 MIPS, Hardware:huawei
[2013-11-20 13:11:07(065)]        Apply video parameter:320x240, bitrate:150000, quality:3, gop:40, fps:10, preset:3, codec:0
[2013-11-20 13:11:07(066)]        Invoke        BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
[2013-11-20 13:11:07(067)]        Invoke        SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
[2013-11-20 13:11:07(068)]        Invoke        BRAC_SetSDKOption(BRAC_SO_CORESDK_USEHWCODEC=0)
[2013-11-20 13:11:07(068)]        Invoke        BRAC_SetSDKOption(BRAC_SO_STREAM_SMOOTHPLAYMODE=0)
[2013-11-20 13:11:07(070)]        Invoke        BRAC_Connect(192.168.1.230,8906)=0
[2013-11-20 13:11:07(117)]        Invoke        UserCameraControl(userid=-1,bOpen=1)
[2013-11-20 13:11:07(118)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2013-11-20 13:11:07(166)]        CheckClientSocketLink         Connect(ip=192.168.1.230,port=8906)
[2013-11-20 13:11:07(240)]        Server version: V4.8(Build Time:2013-07-11 14:52:24, Server OS:Windows)
[2013-11-20 13:11:07(242)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2013-11-20 13:11:08(242)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:11:08(378)]        Invoke        LoginServer(username=huanghe)
[2013-11-20 13:11:08(451)]        Message        OnLoginSystem(userid=-48,errorcode=0,username=huanghe), msg deliver worked(0)
[2013-11-20 13:11:08(462)]        Connection to streaming media server successfully!(udp delay:5ms)
[2013-11-20 13:11:08(582)]        Invoke        EnterRoom(roomid=1)
[2013-11-20 13:11:08(673)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=1)
[2013-11-20 13:11:08(675)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
[2013-11-20 13:11:08(676)]        Message        OnReceiveOnlineUser(count=2,roomid=1)
[2013-11-20 13:11:08(695)]        Invoke        UserCameraControl(userid=-1,bOpen=1)
[2013-11-20 13:11:08(696)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2013-11-20 13:11:08(697)]        Invoke        UserCameraControl(userid=-47,bOpen=1)
[2013-11-20 13:11:08(698)]        Invoke        UserSpeakControl(userid=-47,bOpen=1)
[2013-11-20 13:11:08(771)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:11:08(784)]        Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0
[2013-11-20 13:11:08(785)]        Audio codec init, handle:2, 11, 1, 16000, 16, 15850
[2013-11-20 13:11:08(821)]        Audio FX Status: VAD:1, NS:2, AGC:8, AEC:4
[2013-11-20 13:11:08(911)]        video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:3
[2013-11-20 13:11:22(491)]        Message        OnUserLeaveRoom(userid=-47,siteindex=0)
[2013-11-20 13:11:22(508)]        Invoke        UserCameraControl(userid=-47,bOpen=0)
[2013-11-20 13:11:22(509)]        Invoke        UserSpeakControl(userid=-47,bOpen=0)
[2013-11-20 13:11:31(982)]        Invoke        UserCameraControl(userid=-1,bOpen=0)
[2013-11-20 13:11:31(984)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
[2013-11-20 13:11:32(093)]        Invoke        LeaveRoom(roomid=-1)        Elapse:108 ms
[2013-11-20 13:11:32(104)]        Invoke        LogoutServer(userid=-48)        Elapse:9 ms
[2013-11-20 13:11:32(120)]        Invoke        BRAC_Release        Elapse:14 ms


我的流程是这样的,我在视频通话的Activity中 登录--进入房间聊天,我能听见声音 ,能看到自己,但是看不到对方视频,这是什么原因,求管理们帮忙


作者: 佰锐技术-卓剑锐    时间: 2013-11-20 13:33
你好,官方demo是否会这样?
作者: coolkissxia    时间: 2013-11-20 13:37
佰锐技术-卓剑锐 发表于 2013-11-20 13:33
你好,官方demo是否会这样?

不会 是我自己看了之后写的程序会出现这个问题,请帮忙解决下
作者: coolkissxia    时间: 2013-11-20 13:38
佰锐技术-卓剑锐 发表于 2013-11-20 13:33
你好,官方demo是否会这样?

[2013-11-20 13:24:36(422)]        ---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2013-11-20 13:24:36(424)]        Load libanychatcore.so success!(V4.8 Build Time:Nov 11 2013 06:26:35)
[2013-11-20 13:24:36(425)]        Android OS SDK Version:16, Support ARMv7:2, Support Neon:4
[2013-11-20 13:24:36(441)]        Load libmediautil_v7.so success!(V4.8 Build Time:Sep 20 2013 07:55:34)
[2013-11-20 13:24:36(449)]        Load libmediashow_4.0.so success!(V4.8 Build Time:Sep 10 2013 04:00:43)
[2013-11-20 13:24:36(461)]        Load libmediacore_4.1.so success!(V4.8 Build Time:Sep 20 2013 07:55:21)
[2013-11-20 13:24:36(469)]        CPU:2989.00 MIPS, Hardware:huawei
[2013-11-20 13:24:36(471)]        Apply video parameter:320x240, bitrate:150000, quality:3, gop:40, fps:10, preset:3, codec:0
[2013-11-20 13:24:36(472)]        Invoke        BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
[2013-11-20 13:24:36(473)]        Invoke        SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
[2013-11-20 13:24:36(474)]        Invoke        BRAC_SetSDKOption(BRAC_SO_CORESDK_USEHWCODEC=0)
[2013-11-20 13:24:36(480)]        Invoke        BRAC_SetSDKOption(BRAC_SO_STREAM_SMOOTHPLAYMODE=0)
[2013-11-20 13:24:36(482)]        Invoke        BRAC_Connect(192.168.1.230,8906)=0
[2013-11-20 13:24:36(571)]        CheckClientSocketLink         Connect(ip=192.168.1.230,port=8906)
[2013-11-20 13:24:36(634)]        Server version: V4.8(Build Time:2013-07-11 14:52:24, Server OS:Windows)
[2013-11-20 13:24:36(636)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2013-11-20 13:24:37(657)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:24:37(755)]        Invoke        LoginServer(username=huanghe)
[2013-11-20 13:24:37(863)]        Message        OnLoginSystem(userid=-50,errorcode=0,username=huanghe), msg deliver worked(0)
[2013-11-20 13:24:37(876)]        Connection to streaming media server successfully!(udp delay:5ms)
[2013-11-20 13:24:37(896)]        Invoke        EnterRoom(roomid=1)
[2013-11-20 13:24:38(093)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=1)
[2013-11-20 13:24:38(097)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
[2013-11-20 13:24:38(103)]        Message        OnReceiveOnlineUser(count=2,roomid=1)
[2013-11-20 13:24:38(164)]        Invoke        UserCameraControl(userid=-1,bOpen=1)
[2013-11-20 13:24:38(171)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2013-11-20 13:24:38(178)]        Invoke        UserCameraControl(userid=-49,bOpen=1)
[2013-11-20 13:24:38(183)]        Invoke        UserSpeakControl(userid=-49,bOpen=1)
[2013-11-20 13:24:38(215)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:24:38(262)]        Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0
[2013-11-20 13:24:38(263)]        Audio codec init, handle:1, 11, 1, 16000, 16, 15850
[2013-11-20 13:24:38(302)]        Audio FX Status: VAD:1, NS:2, AGC:8, AEC:4
[2013-11-20 13:24:38(359)]        video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:3
[2013-11-20 13:24:38(441)]        userid(-49) video decode delay:8ms
[2013-11-20 13:24:42(101)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:24:42(250)]        video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:5
[2013-11-20 13:24:50(593)]        video init finish:320x240, NV21, fps:25
[2013-11-20 13:24:50(739)]        video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:6
[2013-11-20 13:24:53(807)]        Invoke        UserCameraControl(userid=-1,bOpen=0)
[2013-11-20 13:24:53(811)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
[2013-11-20 13:24:53(930)]        Invoke        LeaveRoom(roomid=-1)        Elapse:112 ms
[2013-11-20 13:24:53(938)]        Invoke        LogoutServer(userid=-50)        Elapse:7 ms
[2013-11-20 13:24:53(974)]        Invoke        BRAC_Release        Elapse:35 ms

作者: 廖斌    时间: 2013-11-20 13:55
您好。从您发送的日志来看,您的调用流程基本没有问题,有一处是多余的,就是连接之后打开自己的音视频Invoke        UserCameraControl(userid=-1,bOpen=1)
[2013-11-20 13:11:07(118)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)。估计您的问题出在显示的时候。有调用设置视频参数?显示的时候有绑定surfaceview吗?
作者: coolkissxia    时间: 2013-11-20 14:08
廖斌 发表于 2013-11-20 13:55
您好。从您发送的日志来看,您的调用流程基本没有问题,有一处是多余的,就是连接之后打开自己的音视频Inv ...


public void OnAnyChatEnterRoomMessage(int dwRoomId, int dwErrorCode) {
                // TODO Auto-generated method stub
                Log.e("********VideoActivity*********", "OnAnyChatEnterRoomMessage");
                // 打开本地音视频
                anychat.UserCameraControl(-1, 1);
                anychat.UserSpeakControl(-1, 1);
                SurfaceHolder holder = myView.getHolder();
                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);

                userIDArray = anychat.GetOnlineUser();
                if (userIDArray.length > 0) {
                        for (int i = 0; i < userIDArray.length; i++) {
                                anychat.UserCameraControl(userIDArray, 1);
                                anychat.UserSpeakControl(userIDArray, 1);
                                if (AnyChatCoreSDK
                                                .GetSDKOptionInt(AnyChatDefine.BRAC_SO_VIDEOSHOW_DRIVERCTRL) == AnyChatDefine.VIDEOSHOW_DRIVER_JAVA) {
                                        int index = anychat.mVideoHelper.bindVideo(otherView
                                                        .getHolder());
                                        anychat.mVideoHelper.SetVideoUser(index, userIDArray);
                                }
                                SurfaceHolder holder1= otherView.getHolder();
                                holder1.setFormat(PixelFormat.RGB_565);
                                holder1.setFixedSize(anychat.GetUserVideoWidth(userIDArray),
                                                anychat.GetUserVideoHeight(userIDArray));
                                Surface s1 = holder.getSurface();
                                anychat.SetVideoPos(userIDArray, s1, 0, 0, 0, 0);
                        }
                }
        }


@Override
        public void OnAnyChatUserAtRoomMessage(int dwUserId, boolean bEnter) {
                // TODO Auto-generated method stub
                Log.e("********VideoActivity*********", "OnAnyChatUserAtRoomMessage"
                                + dwUserId);
                System.out.println(bEnter + "----------------'" + dwUserId);
                if (!bEnter) {
                        System.out.println("Leave----------" + dwUserId);
                        anychat.UserCameraControl(dwUserId, 0);
                        anychat.UserSpeakControl(dwUserId, 0);
                        bOtherVideoOpened = false;
                } else {
                        userID = dwUserId;
                        if (AnyChatCoreSDK
                                        .GetSDKOptionInt(AnyChatDefine.BRAC_SO_VIDEOSHOW_DRIVERCTRL) == AnyChatDefine.VIDEOSHOW_DRIVER_JAVA) {
                                int index = anychat.mVideoHelper.bindVideo(otherView
                                                .getHolder());
                                anychat.mVideoHelper.SetVideoUser(index, dwUserId);
                        }

                        anychat.UserCameraControl(dwUserId, 1);
                        anychat.UserSpeakControl(dwUserId, 1);

                        SurfaceHolder holder = otherView.getHolder();
                        holder.setFormat(PixelFormat.RGB_565);
                        holder.setFixedSize(anychat.GetUserVideoWidth(dwUserId),
                                        anychat.GetUserVideoHeight(dwUserId));
                        Surface s = holder.getSurface();
                        anychat.SetVideoPos(dwUserId, s, 0, 0, 0, 0);
                }
        }

您好  我就在这2个方法中用了  请您帮我看下 谢谢

作者: 廖斌    时间: 2013-11-20 14:51
coolkissxia 发表于 2013-11-20 14:08
public void OnAnyChatEnterRoomMessage(int dwRoomId, int dwErrorCode) {
                // TODO Auto-generated ...

您好。打开视频之后马上设置SetVideoPos或者SetVideoUser是不行的,必须要在检查到有视频数据流出的时候(标准demo中有体现,checkVideoStatus)。如果你需要一个activity操作所有anychat的demo,我这边有一个,可以发送您
作者: coolkissxia    时间: 2013-11-20 15:35
廖斌 发表于 2013-11-20 14:51
您好。打开视频之后马上设置SetVideoPos或者SetVideoUser是不行的,必须要在检查到有视频数据流出的时候 ...

请发给我下  494612524@qq.com





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