void RtspTestWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                this.d3dSource = new D3DImageSource();

                if (this.d3dSource.SetupSurface(1920, 1080, SupportFormat.YV12))
                {
                    this.imageD3D.Source = this.d3dSource.ImageSource;
                }
                callBack = new RtspWrapper.VideoStreamComeDelegate(OnVideoStreamComing);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }

        }
 private void CloseVideo()
 {
     if (hwnd != IntPtr.Zero)
     {
         RtspWrapper.DestroyRtspClientSession(hwnd);
         hwnd = IntPtr.Zero;
         callBack = null;
     }
 }