MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / term_init

Function term_init

ffmpeg-single-cmd/src/main/cpp/ffmpeg_mod.c:373–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371#endif
372
373void term_init(void)
374{
375#if HAVE_TERMIOS_H
376 if (!run_as_daemon && stdin_interaction) {
377 struct termios tty;
378 if (tcgetattr (0, &tty) == 0) {
379 oldtty = tty;
380 restore_tty = 1;
381
382 tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
383 |INLCR|IGNCR|ICRNL|IXON);
384 tty.c_oflag |= OPOST;
385 tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
386 tty.c_cflag &= ~(CSIZE|PARENB);
387 tty.c_cflag |= CS8;
388 tty.c_cc[VMIN] = 1;
389 tty.c_cc[VTIME] = 0;
390
391 tcsetattr (0, TCSANOW, &tty);
392 }
393 signal(SIGQUIT, sigterm_handler); /* Quit (POSIX). */
394 }
395#endif
396
397 signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */
398 signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */
399#ifdef SIGXCPU
400 signal(SIGXCPU, sigterm_handler);
401#endif
402#if HAVE_SETCONSOLECTRLHANDLER
403 SetConsoleCtrlHandler((PHANDLER_ROUTINE) CtrlHandler, TRUE);
404#endif
405}
406
407/* read a key without blocking */
408static int read_key(void)

Callers 2

assert_file_overwriteFunction · 0.85
ffmpeg_parse_optionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected