Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
GeneralRe: ? : Operator Pin
Luc Pattyn21-Jul-10 8:05
sitebuilderLuc Pattyn21-Jul-10 8:05 
GeneralRe: ? : Operator Pin
Roger Wright21-Jul-10 8:35
professionalRoger Wright21-Jul-10 8:35 
GeneralRe: ? : Operator Pin
Eddy Vluggen21-Jul-10 9:12
professionalEddy Vluggen21-Jul-10 9:12 
GeneralRe: ? : Operator Pin
dan!sh 21-Jul-10 9:18
professional dan!sh 21-Jul-10 9:18 
AnswerRe: ? : Operator Pin
dan!sh 21-Jul-10 9:24
professional dan!sh 21-Jul-10 9:24 
AnswerRe: ? : Operator Pin
yu-jian21-Jul-10 9:37
yu-jian21-Jul-10 9:37 
AnswerRe: ? : Operator Pin
brunoseixas22-Jul-10 5:24
brunoseixas22-Jul-10 5:24 
QuestionStopping Process Pin
anveshvm21-Jul-10 6:06
anveshvm21-Jul-10 6:06 
I am using FFMPEG for streaming operations.
(https://www.transferbigfiles.com/a3209f95-ffcc-4c82-b722-041a24c26ec1?rid=KsWHbP3Lo/rxGH4YHVVVtA%3d%3d)

I started it using the following program

Process myProcess = new Process();
myProcess.StartInfo.FileName = @"ffmpeg.exe";
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.RedirectStandardInput = true;

myProcess.StartInfo.Arguments = "-i input.avi -vcodec copy -acodec copy output.avi";
myProcess.Start();

StreamWriter myStreamWriter = myProcess.StandardInput;

myStreamWriter.Write("113"); //using ascii of q
myStreamWriter.Flush();

myStreamWriter.Write('q');
myStreamWriter.Flush();

myStreamWriter.Close();


myProcess.WaitForExit();
myProcess.Close();


My intention is to close the program when I send "q" from the program (I meant a graceful exit without making any error).

But I can't close it by sending 'q' character or its corresponding ascii. When I run the program from the command line and I press q in the keyboard, program immediately gets closed.

Can you pls. help me?

Thank you

regards
anvesh
AnswerRe: Stopping Process Pin
PIEBALDconsult21-Jul-10 7:54
mvePIEBALDconsult21-Jul-10 7:54 
GeneralRe: Stopping Process Pin
anveshvm22-Jul-10 2:36
anveshvm22-Jul-10 2:36 
GeneralRe: Stopping Process Pin
PIEBALDconsult22-Jul-10 3:21
mvePIEBALDconsult22-Jul-10 3:21 
GeneralRe: Stopping Process Pin
anveshvm22-Jul-10 4:16
anveshvm22-Jul-10 4:16 
GeneralRe: Stopping Process Pin
PIEBALDconsult22-Jul-10 3:35
mvePIEBALDconsult22-Jul-10 3:35 
AnswerRe: Stopping Process Pin
PIEBALDconsult21-Jul-10 17:36
mvePIEBALDconsult21-Jul-10 17:36 
Questionsave data structure in resource dll Pin
Jassim Rahma21-Jul-10 5:36
Jassim Rahma21-Jul-10 5:36 
AnswerRe: save data structure in resource dll Pin
Ennis Ray Lynch, Jr.21-Jul-10 5:40
Ennis Ray Lynch, Jr.21-Jul-10 5:40 
GeneralRe: save data structure in resource dll Pin
Jassim Rahma21-Jul-10 5:44
Jassim Rahma21-Jul-10 5:44 
Questionproblem writing in doc file Pin
Dhyanga21-Jul-10 5:29
Dhyanga21-Jul-10 5:29 
AnswerRe: problem writing in doc file Pin
Ennis Ray Lynch, Jr.21-Jul-10 5:38
Ennis Ray Lynch, Jr.21-Jul-10 5:38 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:48
Dhyanga21-Jul-10 5:48 
AnswerRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 5:39
mveOriginalGriff21-Jul-10 5:39 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:42
Dhyanga21-Jul-10 5:42 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 5:51
mveOriginalGriff21-Jul-10 5:51 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:54
Dhyanga21-Jul-10 5:54 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 6:03
mveOriginalGriff21-Jul-10 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.