public void MessageReceived(LCM.LCM.LCM lcm, string channel, LCMDataInputStream data_stream) { if (channel == Channels.init_session_res_channel) { init_session_response_t response = new init_session_response_t(data_stream); var _ea = Notification.Instance; _ea.GetEvent <InitSessionResponseReceivedEvent>().Publish(response); } }
private void OnGetInitSessionResponse(init_session_response_t res) { if (res.ip_address == CamInfo.IP) { if (res.status_code == status_codes_t.OK) { if (CamInfo.VideoURL != null && CamInfo.VideoURL != "") { if (mjpegDecoder != null) { mjpegDecoder.ParseStream(new Uri(this.CamInfo.VideoURL, UriKind.Absolute), CamInfo.UserName, CamInfo.Password); } } else { CamInfo.getStreamUri(); } } else { connectionErrorHandler(); } } }