public void Show(string path) { Show(); var wih = new WindowInteropHelper(this); IntPtr hwnd = wih.Handle; if (!playerSdl) { _playerIntPtr = PlayerSdl.StartPlayer(path, hwnd); PlayerSdl.Play(_playerIntPtr); } else { _playerIntPtr = PlayerSdl.OpenSdl(path, hwnd); PlayerSdl.PlaySdl(_playerIntPtr); } //_playerIntPtr = PlayerSdl.StartPlayer(path, hwnd); //_playerIntPtr = NativePlayer.GetRtspPlayer(path, null, null, null, 10000, hwnd); //NativePlayer.SwitchSound(_playerIntPtr, true); //if (_playerIntPtr != IntPtr.Zero) //{ // //ShowFfmpeg(path); // //NativePlayer.Play(_playerIntPtr); //} //else //{ // Close(); //} }
public void CloseChild() { if (_playerIntPtr != IntPtr.Zero) { if (!playerSdl) { PlayerSdl.StopPlayer(_playerIntPtr); } else { PlayerSdl.StopSdl(_playerIntPtr); } } Close(); }