public void Dispose() { if (_hik != null) { _hik.StreamEvent -= onHikStream; _hik.Dispose(); _hik = null; } if (_renderSource != null) { _renderSource.ImageSourceChanged -= onImageSource; _renderSource.Dispose(); _renderSource = null; } if (_decoder != null) { _decoder.Dispose(); _decoder = null; } if (_rtsp != null) { _rtsp.Dispose(); _rtsp = null; } }
private void disposeHikSource() { if (_hik != null) { _hik.HeaderEvent -= onHeader; _hik.StreamEvent -= onStream; _hik.Dispose(); } _hik = null; }
public HikPlayViewModel() { _ups = new UnpackPS(); _ups.Unpacked += _ups_Unpacked; _upsnew = new UnpackPSNew(); _upsnew.Unpacked += _upsnew_Unpacked; _rtsp = new StreamRtspServer(); //_socket = new StreamSocket(); _renderSource = new D3DImageSource(); _renderSource.ImageSourceChanged += onImageSource; //_hik = new HikStream("192.168.9.98", 8000, "admin", "12345", 1, false, IntPtr.Zero); _hik = new HikStream("192.168.9.155", 8000, "admin", "admin12345", 1, false, IntPtr.Zero); _hik.StreamEvent += onHikStream; //_hik.RtpFrameEvent += onRtpFrame; }
private void initHikSource() { _hik = new HikStream(VideoInfo.Ip, VideoInfo.Port, VideoInfo.UserName, VideoInfo.Password, VideoInfo.Channel, VideoInfo.IsSub, IntPtr.Zero); _hik.HeaderEvent += onHeader; _hik.StreamEvent += onStream; }