-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
Motivation and What I've done
I'm working on a ffmpeg/x264/x265.... GUI program, and I want to have realtime control: get the progress, pause and resume the encoding process. The challange is how to pause and resume. After searching and trying, I made it on linux/macos by using signal as following:
// pause
cmd.Process.Signal(syscall.SIGTSTP)
// resume
cmd.Process.Signal(syscall.SIGCONT)
Problem and thinking
The problem is on Windows, it does not work. Can't find signals working on windows. I've searched a lot, but failed.
Then I recall that pressing PauseBreak
and Enter
when encoding in terminal/cmd already has the same effect, yet I've no idea how to send special keyboard hotkey events to the process which is running command in golang. I do have searching but can't find it.
Thanks in advance :)