/// <summary> /// 时刻视频设备初始化 /// </summary> /// <param name="strGUId"></param> /// <param name="strServerIP"></param> /// <param name="uintControlPort"></param> /// <param name="uintVideoPort"></param> /// <param name="uintAudioPort"></param> /// <param name="uintStreamPort"></param> /// <returns></returns> public static Enum_SDKState SKVideoSDKInit(string strGUId, string strServerIP, int uintControlPort, int uintVideoPort, int uintAudioPort, int uintStreamPort, string strRecordDirectory = "") { SDKState.SDKEventCallBack(Enum_VideoType.SKVideo, Enum_SDKStateEventType.SDKInitStart); ProgParameter.strSKVideo_ClientUGID = strGUId; ProgParameter.strSKVideo_ServerIP = strServerIP; ProgParameter.uintSKVideo_ControlPort = Convert.ToUInt16(uintControlPort); ProgParameter.uintSKVideo_VideoPort = Convert.ToUInt16(uintVideoPort); ProgParameter.uintSKVideo_AudioPort = Convert.ToUInt16(uintAudioPort); ProgParameter.uintSKVideo_AVPort = Convert.ToUInt16(uintStreamPort); ProgParameter.strSKVideo_RecordDirectory = strRecordDirectory; SDK_SKVideoSDK.p_sdkc_set_server_av_port(ProgParameter.uintSKVideo_AVPort); //设置码流端口 SDK_SKVideoSDK.p_sdkc_init_client(strGUId, strServerIP , ProgParameter.uintSKVideo_ControlPort , ProgParameter.uintSKVideo_VideoPort , ProgParameter.uintSKVideo_AudioPort , ProgParameter.strSKVideo_RecordDirectory); //初始化 SDK_SKVideoSDK.p_sdkc_disable_hw_render(); //关闭客户端软解码 SKVideoSDKState = Enum_SDKState.SDK_Init; SDKState.SDKEventCallBack(Enum_VideoType.SKVideo, Enum_SDKStateEventType.SDKInitEnd); p_msg_demo_callback = new CallBack(callback); SDK_SKVideoSDK.p_sdkc_reg_msg_callback(p_msg_demo_callback); return(SKVideoSDKState); }