ESDK_RTP_Init() private method

private ESDK_RTP_Init ( ) : int
return int
示例#1
0
        /// <summary>
        /// 初始化rtp模块
        /// </summary>
        public void ESDK_RTP_Init()
        {
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            logEx.Trace("Enter: RtpAdapter.ESDK_RTP_Init().");

            try
            {
                int iRet = 0;
                if (!isInited)
                {
                    iRet = SdkRtpInterface.ESDK_RTP_Init();
                    logEx.Trace("Enter: RtpAdapter.ESDK_RTP_Init(). This is first init!");
                }
                if (iRet != 0)
                {
                    logEx.Error("RtpAdapter.ESDK_RTP_Init ,error:{0}", iRet);
                    isInited = false;
                }
                else
                {
                    logEx.Trace("Enter: RtpAdapter.ESDK_RTP_Init().Success");
                    isInited = true;
                }
                logEx.Trace("Enter: RtpAdapter.ESDK_RTP_Init(). inited is {0}!", isInited);
            }
            catch (System.Exception ex)
            {
                logEx.Error("RtpAdapter.ESDK_RTP_Init ,Exception:{0}", ex.ToString());
                isInited = false;
            }
        }