예제 #1
0
        /// <summary>
        /// 对方同意视频,并初使化视频后,本地也进行视频初使化
        /// </summary>
        /// <param name="msg"></param>
        void ReturnAcceptVideoInitMethod(XMPP.protocol.client.Message msg)
        {
            UserInfo user1;
            UserInfo user2;
            CSS.IM.XMPP.protocol.client.Message res_msg;
            RemotVideoUDPPort = msg.GetTagInt("UDPPort");
            RemotVideoUDPIP = IPAddress.Parse(msg.GetTag("UDPIP"));

            user1 = new UserInfo();
            user1.LocalIP = RemotVideoUDPIP;
            user1.LocalPort = RemotVideoUDPPort;

            avForm.SetRemoteAddress(user1, RemotVideoUDPPort);

            user2 = new UserInfo();
            user2.LocalIP = Program.LocalHostIP;
            user2.LocalPort = ListenBasicUDPPort;

            avForm.SetLocalAddress(user2);

            avForm.iniAV(CSS.IM.Library.AV.VideoSizeModel.W320_H240);

            res_msg = new CSS.IM.XMPP.protocol.client.Message();
            res_msg.Type = MessageType.chat;
            res_msg.To = TO_Jid;
            res_msg.SetTag("m_type", 3);
            XmppConn.Send(res_msg);//告诉对我准备好了

            if (avForm.callSoundPlayer != null)
                avForm.callSoundPlayer.Stop();
        }
예제 #2
0
        /// <summary>
        /// 对方同意视频,并初使化视频后,本地也进行视频初使化
        /// </summary>
        /// <param name="msg"></param>
        void ReturnAcceptMethod(XMPP.protocol.client.Message msg)
        {
            UserInfo user1;
            UserInfo user2;
            CSS.IM.XMPP.protocol.client.Message res_msg;
            VideoRemotUDPPort = msg.GetTagInt("UDPPort");
            VideoRemotUDPIP = IPAddress.Parse(msg.GetTag("UDPIP"));

            user1 = new UserInfo();
            user1.LocalIP = VideoRemotUDPIP;
            user1.LocalPort = VideoRemotUDPPort;

            avForm.SetRemoteAddress(user1, VideoRemotUDPPort);

            user2 = new UserInfo();
            user2.LocalIP = Program.LocalHostIP;
            user2.LocalPort = int.Parse(LocalVideoUDPPort);

            avForm.SetLocalAddress(user2);

            avForm.iniAV(VideoSizeModel.W320_H240);

            res_msg = new CSS.IM.XMPP.protocol.client.Message();
            res_msg.Type = MessageType.chat;
            res_msg.To = to_Jid;
            res_msg.SetTag("m_type", 3);
            res_msg.Body = "falg";
            _connection.Send(res_msg);//告诉对我准备好了
        }