[Mono-list] Recommended approach for embedding VLC in a Mono app?
Steve Ricketts
velocedge at hotmail.com
Wed May 19 15:43:02 EDT 2010
Ok, got it running on Vista and Mono on openSUSE. It doesn't work with rtmp,
at least yet. Still work to do there, but the rest of the stuff is working
fine. I don't know which change fixed it but I used a pictureBox for the
video window and the following code:
mediaPlayer = new Process();
mediaPlayer.StartInfo.CreateNoWindow = true;
mediaPlayer.StartInfo.UseShellExecute = false;
mediaPlayer.StartInfo.ErrorDialog = false;
mediaPlayer.StartInfo.RedirectStandardOutput = true;
mediaPlayer.StartInfo.RedirectStandardInput = true;
mediaPlayer.StartInfo.RedirectStandardError = true;
int hWin = videoPanel.Handle.ToInt32();
mediaPlayer.StartInfo.Arguments = string.Format("-slave -quiet -idle
-fixed-vo -wid {0} {1}", hWin, theURL);
mediaPlayer.StartInfo.FileName = "mplayer";
mediaPlayer.OutputDataReceived += HandleMediaPlayerOutputDataReceived;
mediaPlayer.ErrorDataReceived += HandleMediaPlayerErrorDataReceived;
mediaPlayer.Start();
mediaWriter = mediaPlayer.StandardInput;
mediaWriter.AutoFlush = true;
mediaPlayer.BeginErrorReadLine();
mediaPlayer.BeginOutputReadLine();
Thanks for all your help and advice. It's running now in live and on-demand
mode as a .dll. Now, if I could only do the same with VLC!! ;-)
--
View this message in context: http://mono.1490590.n4.nabble.com/Recommended-approach-for-embedding-VLC-in-a-Mono-app-tp2216492p2223459.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list