-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VlcPlayer not be ready #150
Comments
Hi again, sorry to bombard you here; but I have some more information that might help. It's worth noting that I've also run into some Null Reference Exceptions in the VideoDisplayCallback method in VlcPlayer.Events.cs. I ended up adding this to the top of that method:
What seems to be happening is that if the VLC video ever gets hidden after it is loaded up in XAML, then things tend to go haywire because the _context and/or the DisplayThreadDispatcher end up being NULL. I expect that this is somehow related to the above issue as well. Bear in mind that my implementation is likely more complicated than usual because I am using transition animations to switch between videos and doing lots of hiding and showing various different videos at different times. It's an involved implementation; I will say that the last "Fix VlcPlayer can't unload and reload." commit did a lot of things to help fix the situation, so I really appreciate that. Hopefully we can resolve the rest of the issues. Thanks again, |
Check the last commit, I'm not sure, I just reproduce once. |
Killer, thank you! On it. |
From what I can immediately tell I think you've nailed it. Thank you, thank you, thank you. I'll speak up again if we run into any additional issues. |
You're welcome, if you have any issues, let me know, thanks. |
Hi Higankanshi, very much appreciate the awesome work you're doing here with this library. We're running into a bug where we're getting this error randomly and occasionally:
System.InvalidOperationException: VlcPlayer not be ready, if you want to use VlcPlay no in XAML, please read this Wiki: "https://github.com/higankanshi/Meta.Vlc/wiki/Use-VlcPlayer-with-other-controls".
at (VlcPlayer , IntPtr& , UInt32& , UInt32& , UInt32& , UInt32& , UInt32& )
at Meta.Vlc.Wpf.VlcPlayer.VideoFormatCallback(IntPtr& opaque, UInt32& chroma, UInt32& width, UInt32& height, UInt32& pitches, UInt32& lines)
We are in fact using the VlcPlayer in XAML. Here is the code I am using to initialize VlcPlayer:
` var options = new string[]
{
"-I",
"--dummy-quiet",
"--ignore-config",
"--no-video-title",
"--no-sub-autodetect-file"
};
`
In theory, this code should always be running before any videos are presented or displayed, because I have this code in the constructor of my ImageVideoView XAML class. However, I'm still randomly getting this error from time to time, because somehow DisplayThreadDispatcher is null in the VideoFormatCallback method in rare circumstances. I'm not sure why or how this is happening really.
I very much appreciate any help you can provide.
Thanks,
Jason
The text was updated successfully, but these errors were encountered: