public void MessageReceived(LCM.LCM.LCM lcm, string channel, LCMDataInputStream data_stream) { if (channel == Channels.stream_res_channel) { stream_uri_response_t response = new stream_uri_response_t(data_stream); var _ea = Notification.Instance; _ea.GetEvent <StreamUriResponseReceivedEvent>().Publish(response); } }
private void OnGetStreamUri(stream_uri_response_t res) { if (CamInfo.IP == res.ip_address) { if (res.status_code == status_codes_t.OK) { if (mjpegDecoder != null) { CamInfo.VideoURL = res.uri; mjpegDecoder.ParseStream(new Uri(CamInfo.VideoURL, UriKind.Absolute), CamInfo.UserName, CamInfo.Password); } } else { CamInfo.getStreamUri(); } } }