AnyChat技术支持论坛

标题: windows java客户端摄像头已打开但是视频无法显示 [打印本页]

作者: Bro2    时间: 2013-10-23 11:51
标题: windows java客户端摄像头已打开但是视频无法显示
如题,求助。
控制台打印:
[libx264 @ 0x9851680] lookaheadless mb-tree requires intra refresh or infinite keyint
[libx264 @ 0x9851680] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x9851680] profile Main, level 1.2
[swscaler @ 0x93735f0] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x9373830] No accelerated colorspace conversion
AEC settings:
      System Mode is     0
     Feature Mode is    -1
found from yuv420p to bgr24.
日志信息:
[2013-10-23 11:45:37(784)]        ---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2013-10-23 11:45:37(784)]        Load BRAnyChatCore.dll success!(V4.8 Build Time:Sep 10 2013 10:55:01)
[2013-10-23 11:45:37(784)]        Load BRMiscUtil.dll success!(V4.8 Build Time:Sep 10 2013 10:53:28)
[2013-10-23 11:45:37(815)]        Load BRMediaUtil.dll success!(V4.8 Build Time:Sep 10 2013 10:53:09)
[2013-10-23 11:45:37(815)]        Load BRMediaShow.dll success!(V4.8 Build Time:Sep 10 2013 10:53:32)
[2013-10-23 11:45:37(815)]        Load BRMediaCore.dll success!(V4.8 Build Time:Sep 10 2013 10:53:48)
[2013-10-23 11:45:42(331)]        Invoke        BRAC_Connect(192.168.254.56,8906)=0
[2013-10-23 11:45:42(331)]        Invoke        LoginServer(username=server)
[2013-10-23 11:45:42(441)]        CheckClientSocketLink         Connect(ip=192.168.254.56,port=8906)
[2013-10-23 11:45:42(503)]        Server version: V4.8(Build Time:2013-09-10 10:54:13, Server OS:Windows)
[2013-10-23 11:45:42(503)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2013-10-23 11:45:42(630)]        Message        OnLoginSystem(userid=500,errorcode=0,username=server), msg deliver worked(0)
[2013-10-23 11:45:42(646)]        Connection to streaming media server successfully!(udp delay:8ms)
[2013-10-23 11:45:42(677)]        Invoke        EnterRoom(roomid=1)
[2013-10-23 11:45:42(755)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=0)
[2013-10-23 11:45:42(755)]        Message        OnReceiveOnlineUser(count=1,roomid=1)
[2013-10-23 11:45:42(843)]        Win7 AEC Audio Capture Driver(麦克风 (Conexant 20671 SmartAudio HD))
[2013-10-23 11:45:42(873)]        Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
[2013-10-23 11:45:42(873)]        Audio codec init, handle:1, 11, 1, 16000, 16, 15850
[2013-10-23 11:45:42(904)]        Audio Playback Device Init(0, 1, 16000, 16), WaveOut Playback Driver
[2013-10-23 11:45:50(140)]        Invoke        UserCameraControl(userid=-1,bOpen=1)
[2013-10-23 11:45:50(140)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2013-10-23 11:45:50(156)]        Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x0, l:0, t:160, r:200, b:360)
[2013-10-23 11:45:51(407)]        MinCroppingSize(640, 480)        MaxCroppingSize(640, 480)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(422)]        MinCroppingSize(640, 480)        MaxCroppingSize(640, 480)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(422)]        MinCroppingSize(640, 360)        MaxCroppingSize(640, 360)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(422)]        MinCroppingSize(640, 360)        MaxCroppingSize(640, 360)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(438)]        MinCroppingSize(352, 288)        MaxCroppingSize(352, 288)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(438)]        MinCroppingSize(352, 288)        MaxCroppingSize(352, 288)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(438)]        MinCroppingSize(320, 240)        MaxCroppingSize(320, 240)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(438)]        MinCroppingSize(320, 240)        MaxCroppingSize(320, 240)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(438)]        MinCroppingSize(800, 448)        MaxCroppingSize(800, 448)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(454)]        MinCroppingSize(800, 448)        MaxCroppingSize(800, 448)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(454)]        MinCroppingSize(960, 540)        MaxCroppingSize(960, 540)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(454)]        MinCroppingSize(960, 540)        MaxCroppingSize(960, 540)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(454)]        MinCroppingSize(1280, 720)        MaxCroppingSize(1280, 720)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(454)]        MinCroppingSize(1280, 720)        MaxCroppingSize(1280, 720)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(469)]        MinCroppingSize(424, 240)        MaxCroppingSize(424, 240)        Format(YUY2, 0x32595559)
[2013-10-23 11:45:51(469)]        MinCroppingSize(424, 240)        MaxCroppingSize(424, 240)        Format(YUY2, 0x8d2681)
[2013-10-23 11:45:51(469)]        MinCroppingSize(640, 480)        MaxCroppingSize(640, 480)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(469)]        MinCroppingSize(640, 480)        MaxCroppingSize(640, 480)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(469)]        MinCroppingSize(640, 360)        MaxCroppingSize(640, 360)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(469)]        MinCroppingSize(640, 360)        MaxCroppingSize(640, 360)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(563)]        MinCroppingSize(352, 288)        MaxCroppingSize(352, 288)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(563)]        MinCroppingSize(352, 288)        MaxCroppingSize(352, 288)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(579)]        MinCroppingSize(320, 240)        MaxCroppingSize(320, 240)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(579)]        MinCroppingSize(320, 240)        MaxCroppingSize(320, 240)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(579)]        MinCroppingSize(800, 448)        MaxCroppingSize(800, 448)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(594)]        MinCroppingSize(800, 448)        MaxCroppingSize(800, 448)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(594)]        MinCroppingSize(960, 540)        MaxCroppingSize(960, 540)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(594)]        MinCroppingSize(960, 540)        MaxCroppingSize(960, 540)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(610)]        MinCroppingSize(1280, 720)        MaxCroppingSize(1280, 720)        Format(MJPG, 0x47504a4d)
[2013-10-23 11:45:51(610)]        MinCroppingSize(1280, 720)        MaxCroppingSize(1280, 720)        Format(MJPG, 0x8d2181)
[2013-10-23 11:45:51(610)]        Video Config Size(320, 240)        Format(YUY2, 25fps)
[2013-10-23 11:45:51(655)]        video init finish:320x240, YUY2, fps:25
[2013-10-23 11:45:51(781)]        Audio FX Status: VAD:1, NS:2, AGC:8, AEC:4
[2013-10-23 11:45:52(541)]        video codec init:codec:1, 15fps, 320x240, bitrate:90000, quality:3, preset:3, gop:30, handle:2





作者: 廖斌    时间: 2013-10-23 12:06
你好,从日志上面来看,已经成功视打开摄像头了
作者: 廖斌    时间: 2013-10-23 12:07
是不是你调用SetVideoPos设置的位置有问题,被其他控件遮住了?
作者: admin    时间: 2013-10-23 12:13
您好,用我们标准的Java客户端示例程序是否能够显示视频,从log看,SDK已经成功打开了摄像头,工作正常。
作者: Bro2    时间: 2013-10-23 12:22
廖斌 发表于 2013-10-23 12:06
你好,从日志上面来看,已经成功视打开摄像头了

下面是我的代码:
public class VideoFrame extends JFrame {
        /**
         *
         */
        private static final long serialVersionUID = 1L;
        private JPanel remoteVideoPanel;
        private JPanel localVideoPanel;
       
        public VideoFrame( ) {
                this.setLayout( null );
                remoteVideoPanel = new JPanel();
                localVideoPanel = new JPanel();
                remoteVideoPanel.setBackground( Color.GRAY );
                localVideoPanel.setBackground( Color.WHITE );
                this.add(localVideoPanel);
                this.add(remoteVideoPanel);
                this.setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE );
                this.setBounds( 200, 50, 950, 450 );
                localVideoPanel.setBounds( 0, 160, 200, 360 );
                remoteVideoPanel.setBounds( 200, 0, 750, 450 );
                this.setResizable( false );
        }
       
        public void showLocalVideo(AnyChatCoreSDK anychatCore) {
                anychatCore.SetVideoPos(-1, this, 0, 160, 200, 360);
                anychatCore.UserCameraControl(-1, 1);
                anychatCore.UserSpeakControl(-1, 1);
        }
       
        public void showRemoteVideo(AnyChatCoreSDK anychatCore, int remoteId) {
                anychatCore.SetVideoPos(remoteId, this, 200, 0, 750, 450);
                anychatCore.UserCameraControl(remoteId, 1);
                anychatCore.UserSpeakControl(remoteId, 1);
        }
       
        /*public static void main( String[] args ) {
                new VideoFrame().setVisible( true );
        }*/
}

作者: admin    时间: 2013-10-23 12:23
您好,根据您的log来看,您传的句柄好象是空的?
Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x0, l:0, t:160, r:200, b:360)

作者: Bro2    时间: 2013-10-23 12:24
admin 发表于 2013-10-23 12:13
您好,用我们标准的Java客户端示例程序是否能够显示视频,从log看,SDK已经成功打开了摄像头,工作正常。

可以了,调用视频显示需要自己用timer刷新吗?
作者: admin    时间: 2013-10-23 12:57
不需要设置timer刷新。
作者: Bro2    时间: 2013-10-23 15:59
Bro2 发表于 2013-10-23 12:24
可以了,调用视频显示需要自己用timer刷新吗?


我是说标准客户端可以显示,我的代码贴在上面了 还是没有显示啊 谢谢
作者: 廖斌    时间: 2013-10-23 16:03
Bro2 发表于 2013-10-23 15:59
我是说标准客户端可以显示,我的代码贴在上面了 还是没有显示啊 谢谢

根据您的log来看,您传的句柄好象是空的?

    Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x0, l:0, t:160, r:200, b:360)

你在调用SetVideoPos的时候,第二个参数给的Jframe实例是ok的吗


作者: Bro2    时间: 2013-10-23 16:28
廖斌 发表于 2013-10-23 16:03
根据您的log来看,您传的句柄好象是空的?

    Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x ...

将this打印出来的结果是:
显示视频窗口:cq.antian.acclient.ui.VideoFrame[frame0,200,50,950x450,invalid,hidden,layout=java.awt.BorderLayout,title=,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,0x0,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
作者: 廖斌    时间: 2013-10-23 16:34
你传给本地视频的VideoJframe是不是隐藏的,或者说调用本地视频的时候VideoJframe还没有初始化?
作者: Bro2    时间: 2013-10-23 16:39
廖斌 发表于 2013-10-23 16:34
你传给本地视频的VideoJframe是不是隐藏的,或者说调用本地视频的时候VideoJframe还没有初始化?

可以了 是因为还没有调用显示videoFrame 谢谢啊




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