Hi all,
I am trying to create a program which burns time codes to a video. I am using ffmpeg for this. So far, I can successfully start ffmpeg in another thread and stop it when I need. But I can't read the live outputs from ffmpeg. This is my code.
void onBtnBurnClick(Control c, EventArgs e) {
if (!burnStarted) {
burnStarted = true;
btnBurn.text = "Stop Burning";
auto ffCmd = makeFFMPEGCommand(selVideo);
// ffPipe is a global ProcessPipes
auto tsk = task!runFFMPEG(ffCmd, &ffPipe, frm.handle);
tsk.executeInNewThread();
} else {
ffPipe.stdin.writeln("q");
ffPipe.stdin.close();
btnBurn.text = "Burn Time Code";
}
}
This is a button's click event.