You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
I run Samples.Wpf.Advanced project and play blu-ray disc source
To set license for the blu ray disc i added setting environment vabiable MAKEMKVCON to windows constructor and when starting to play I write my blu-ray key in the memory mapped file.
It good works in normal conditions but if I eject the disc during loading or not call SetLicense() at all, the next call of VlcControl.Dispose never ends and the application is in deadlock
public MainWindow()
{
InitializeComponent();
var currentAssembly = Assembly.GetEntryAssembly();
var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName;
var libDirectory = new DirectoryInfo(System.IO.Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
vlcLibDirectory = new DirectoryInfo(libDirectory );
var localPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
var makemkvRelativePath = Environment.Is64BitProcess ? @"makemkvcon64.exe" : @"makemkvcon.exe";
var makemkvPath = Path.Combine(localPath, makemkvRelativePath);
Environment.SetEnvironmentVariable("MAKEMKVCON", makemkvPath);
}
private void PlayButtonClick(object sender, RoutedEventArgs e)
{
this.control?.Dispose();
this.control = new VlcControl();
this.ControlContainer.Content = this.control;
this.control.SourceProvider.CreatePlayer(this.vlcLibDirectory);
this.control.SourceProvider.MediaPlayer.Log += (_, args) =>
{
string message = $"libVlc : {args.Level} {args.Message} @ {args.Module}";
System.Diagnostics.Debug.WriteLine(message);
};
control.SourceProvider.MediaPlayer.Play(new Uri(@"bluray:///F:\"));
// Writing to memory mapped file here
SetLicense();
}
private void StopButtonClick(object sender, RoutedEventArgs e)
{
this.control?.Dispose(); // this call never ends if not calling SetLicense() or eject the disc during loading the disc
}
How to stop or dispose correctly VlcControl in this case?
I confirm that my issue doesn't happen in VLC itself.
The text was updated successfully, but these errors were encountered:
Looks similar to #625 : There are a lot of these issues in libvlc, and I was told they would likely be fixed in libvlc 4 with the new stop async.
Unfortunately, this project is dead and will never be compatible with libvlc4
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an issue about Vlc.DotNet.
Generic information
Summary
I run Samples.Wpf.Advanced project and play blu-ray disc source
To set license for the blu ray disc i added setting environment vabiable MAKEMKVCON to windows constructor and when starting to play I write my blu-ray key in the memory mapped file.
It good works in normal conditions but if I eject the disc during loading or not call SetLicense() at all, the next call of VlcControl.Dispose never ends and the application is in deadlock
How to stop or dispose correctly VlcControl in this case?
The text was updated successfully, but these errors were encountered: