annotate libmpdemux/mpdemux.c @ 7509:7c2605f7ab8d

sync
author frodone
date Thu, 26 Sep 2002 17:22:49 +0000
parents 8162d2f591f9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4822
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
1 #include "config.h"
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
2 #include <stdlib.h>
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
3
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
4 #include "../input/input.h"
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
5 int mpdemux_check_interrupt(int time) {
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
6 mp_cmd_t* cmd;
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
7 if((cmd = mp_input_get_cmd(time,0)) == NULL)
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
8 return 0;
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
9
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
10 switch(cmd->id) {
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
11 case MP_CMD_QUIT:
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
12 case MP_CMD_PLAY_TREE_STEP:
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
13 case MP_CMD_PLAY_TREE_UP_STEP:
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
14 case MP_CMD_PLAY_ALT_SRC_STEP:
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
15 // The cmd will be executed when we are back in the main loop
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
16 if(! mp_input_queue_cmd(cmd)) {
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
17 printf("mpdemux_check_interrupt: can't queue cmd %s\n",cmd->name);
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
18 mp_cmd_free(cmd);
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
19 }
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
20 return 1;
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
21 default:
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
22 mp_cmd_free(cmd);
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
23 return 0;
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
24 }
3e2c7bf57035 These 2 files are intended for code common to the whole lib
albeu
parents:
diff changeset
25 }