Mercurial > mplayer.hg
annotate libmpdemux/mpdemux.c @ 5214:dd79075bbd98
added a BMP file demuxer...yeah, that's right, a static image BMP file
demuxer; what, is that so weird?...:)
author | melanson |
---|---|
date | Wed, 20 Mar 2002 05:15:53 +0000 |
parents | 76491c4cb611 |
children | 8162d2f591f9 |
rev | line source |
---|---|
4822
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
1 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
2 #include "config.h" |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
3 #include <stdlib.h> |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
4 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
5 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
6 #ifdef HAVE_NEW_INPUT |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
7 #include "../input/input.h" |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
8 int mpdemux_check_interrupt(int time) { |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
9 mp_cmd_t* cmd; |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
10 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
|
11 return 0; |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
12 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
13 switch(cmd->id) { |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
14 case MP_CMD_QUIT: |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
15 case MP_CMD_PLAY_TREE_STEP: |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
16 case MP_CMD_PLAY_TREE_UP_STEP: |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
17 case MP_CMD_PLAY_ALT_SRC_STEP: |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
18 // 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
|
19 if(! mp_input_queue_cmd(cmd)) { |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
20 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
|
21 mp_cmd_free(cmd); |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
22 } |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
23 return 1; |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
24 default: |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
25 mp_cmd_free(cmd); |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
26 return 0; |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
27 } |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
28 } |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
29 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
30 #else // Default function |
4832 | 31 int mpdemux_check_interrupt(int time){ |
4822
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
32 usec_sleep(time*1000); |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
33 return 0; |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
34 } |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
35 #endif |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
36 |
3e2c7bf57035
These 2 files are intended for code common to the whole lib
albeu
parents:
diff
changeset
|
37 |