Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using LibVlc.Net to embed Vlc in winforms using C++/Cli.
Dragged a 'VlcPlayerControl' Component from ToolBox to winforms UI
Followed this tutorial.
There are no Build errorsdss, but i see a run time error when i click on Play button.

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in dz.mediaplayer.vlc.dll<br />
Additional information: Package file not found.<br />


here's my code for button_click event. Error occurs at line 2 in code below
vlcPlayerControl1->Initialize();
DZ::MediaPlayer::Io::MediaInput^ Mi = gcnew DZ::MediaPlayer::Io::MediaInput(DZ::MediaPlayer::Io::MediaInputType::File, "D://video.mp4");
vlcPlayerControl1->Play(Mi);

File path is correct, i have video.mp4 in D drive
What Could be the issue?

Thanks

with regards
Posted
Comments
Richard MacCutchan 18-Jan-16 3:53am    
You should catch the exception and examine all the information provided to find out which file the error refers to. By the look of the message it is something in the libraries that is missing.
Prakash1206 19-Jan-16 12:17pm    
@Richard Thanks for your reply. i used 'try-catch' block and you were right, i had to put the libraries in the exe folder..i had extracted dll's into exe folder but it was expecting zip file!
anyways now its showing a new error..


DZ.MediaPlayer.Vlc.Exceptions.VlcTimeoutException: Timeout waiting required state.
at DZ.MediaPlayer.Vlc.VlcPlayer.waitForMediaState(VlcMediaInternal mediaInternal, VlcMediaState stateRequired)
at DZ.MediaPlayer.Vlc.VlcPlayer.startPlaying(VlcMediaPlayerInternal mediaplayer, VlcMediaInternal media)
at DZ.MediaPlayer.Vlc.VlcPlayer.PlayNext()
at DZ.MediaPlayer.Vlc.WindowsForms.VlcPlayerControl.Play(MediaInput mediaInput)
at Sample.MyForm.button2_Click_1(Object sender, EventArgs e) in c:\users\user\documents\visual studio 2013\projects\gui applications\sample\sample\myform.h:line 552
Richard MacCutchan 19-Jan-16 12:48pm    
Sorry but that error could be caused by any of a million conditions. You need to find someone who knows the internals of this library, or look at the source code and try to figure out what is happening.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900