/// <summary> /// 开始对讲 /// </summary> /// <param name="talkModel"></param> /// <returns></returns> public override bool StartTlak(Enum_TalkModel talkModel) { if (CurrentTalkStatus != Enum_TalkStatus.Null) //处于对讲中 先关闭 { StopTalk(); } StartTalking(null); int intResult = 0; int intLenght = 0; int intTalkChannel = CurrentTalkChannel.VideoTalkChannel - 1; callBack = new SDK_EzvizSDK.MsgHandler(Ezviz_MsgCallback); string strUser = CurrentVideoInfo.DVSAddress + "_" + CurrentTalkChannel.VideoTalkChannel; iUser = Marshal.StringToHGlobalAnsi(strUser); intResult = SDK_EzvizSDK.OpenSDK_AllocSessionEx(callBack, iUser, out intptrSessionID, out intLenght); IntPtr intptrdevSerial = Marshal.StringToHGlobalAnsi(CurrentVideoInfo.DVSAddress); SDK_EzvizSDK.OpenSDK_StartVoiceTalkEx(intptrSessionID, intptrdevSerial, CurrentTalkChannel.VideoTalkChannel); CurrentTalkStatus = (Enum_TalkStatus)(int)talkModel; return(false); }