[MPlayer-dev-eng] mplayer for windows and slave mode

Grzegorz Ląg grzeslag at tlen.pl
Tue Mar 18 13:48:10 CET 2008


Hi

I want to build some basic frontend, but i have some little problem with std input on windows.
I start to write some code in c# and all warks fine until i pass parameters through command line arguments.
But now I want to take some control under running process and i can't send some control commands.

I try something like this:

ProcessStartInfo prinf = new ProcessStartInfo();

            prinf.FileName = mPlayerGUI.Properties.Settings.Default["MplayerPath"].ToString();

            prinf.Arguments = " - ";
            prinf.UseShellExecute = false;
            prinf.RedirectStandardOutput = true;
            prinf.RedirectStandardInput = true;
            prinf.WindowStyle = ProcessWindowStyle.Hidden;
            prinf.CreateNoWindow = true;

            Process t = Process.Start(prinf);

            StreamWriter strwr   = t.StandardInput;
            strwr.Write("loadfile \"" + txtMovieFile.Text + "\"");
            strwr.Write("\n");
            strwr.Flush();
            strwr.Write("osdlevel 2\n");
            strwr.Flush();

            MessageBox.Show(t.StandardOutput.ReadToEnd());

            t.WaitForExit();
            t.Close();

Why I can't send commands by StandardInput?
I red meny articles on this mailing list, but i didn't find anything.

Sorry for my english ;)



More information about the MPlayer-dev-eng mailing list