Ejemplo n.º 1
0
        /// <summary>
        /// 设定通道名称
        /// </summary>
        /// <param name="_LoginID">登录ID</param>
        /// <param name="ChannelID">通道号</param>
        /// <param name="ChannelName">名称</param>
        /// <returns></returns>
        public bool SetChannelname(IntPtr _LoginID, int ChannelID, String ChannelName)
        {
            _CHANNELTITLE_INFO               = new NET_ENCODE_CHANNELTITLE_INFO();
            _CHANNELTITLE_INFO.dwSize        = (uint)Marshal.SizeOf(typeof(NET_ENCODE_CHANNELTITLE_INFO));
            _CHANNELTITLE_INFO.szChannelName = ChannelName;
            object videoObj = _CHANNELTITLE_INFO;
            bool   ret      = NETClient.SetEncodeConfig(_LoginID, EM_CFG_ENCODE_TYPE.CHANNELTITLE, ChannelID, videoObj, 5000);

            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取通道名称
        /// </summary>
        /// <param name="_LoginID">登录ID</param>
        /// <param name="ChannelID">通道号</param>
        /// <returns></returns>
        public String GetChannelname(IntPtr _LoginID, int ChannelID)
        {
            _CHANNELTITLE_INFO               = new NET_ENCODE_CHANNELTITLE_INFO();
            _CHANNELTITLE_INFO.dwSize        = (uint)Marshal.SizeOf(typeof(NET_ENCODE_CHANNELTITLE_INFO));
            _CHANNELTITLE_INFO.szChannelName = null;
            object videoObj = _CHANNELTITLE_INFO;
            bool   ret      = NETClient.GetEncodeConfig(_LoginID, EM_CFG_ENCODE_TYPE.CHANNELTITLE, ChannelID, ref videoObj, 5000);

            if (!ret)
            {
                // MessageBox.Show(NETClient.GetLastError());
                // return;
            }
            _CHANNELTITLE_INFO = (NET_ENCODE_CHANNELTITLE_INFO)videoObj;

            string strChannelName = _CHANNELTITLE_INFO.szChannelName;

            return(strChannelName);
        }