CVS: main/input input.c,1.49,1.50 input.h,1.20,1.21
Update of /cvsroot/mplayer/main/input In directory mail:/var/tmp.root/cvs-serv8341/input Modified Files: input.c input.h Log Message: mpdemux.c|h moved to libinput, mpdemux_check_interrupt() -> mp_input_check_interrupt() Index: input.c =================================================================== RCS file: /cvsroot/mplayer/main/input/input.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- input.c 22 Oct 2002 14:32:17 -0000 1.49 +++ input.c 23 Oct 2002 14:46:19 -0000 1.50 @@ -1367,3 +1367,26 @@ } exit(0); } + +int +mp_input_check_interrupt(int time) { + mp_cmd_t* cmd; + if((cmd = mp_input_get_cmd(time,0)) == NULL) + return 0; + switch(cmd->id) { + case MP_CMD_QUIT: + case MP_CMD_PLAY_TREE_STEP: + case MP_CMD_PLAY_TREE_UP_STEP: + case MP_CMD_PLAY_ALT_SRC_STEP: + // The cmd will be executed when we are back in the main loop + if(! mp_input_queue_cmd(cmd)) { + mp_msg(MSGT_INPUT,MSGL_ERR,"mpdemux_check_interrupt: can't queue cmd %s\n",cmd->name); + mp_cmd_free(cmd); + } + return 1; + } + mp_cmd_free(cmd); + return 0; +} + + Index: input.h =================================================================== RCS file: /cvsroot/mplayer/main/input/input.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- input.h 17 Oct 2002 15:41:20 -0000 1.20 +++ input.h 23 Oct 2002 14:46:19 -0000 1.21 @@ -171,3 +171,8 @@ void mp_input_uninit(void); + +// Interruptible usleep: (used by libmpdemux) +int +mp_input_check_interrupt(int time); +
participants (1)
-
Arpi of Ize