3 static int keyb_fifo_put
=-1;
4 static int keyb_fifo_get
=-1;
6 static void make_pipe(int* pr
,int* pw
){
8 if(pipe(temp
)!=0) printf("Cannot make PIPE!\n");
13 void mplayer_put_key(int code
){
17 /* Watch stdin (fd 0) to see when it has input. */
19 FD_SET(keyb_fifo_put
, &rfds
);
23 //retval = select(keyb_fifo_put+1, &rfds, NULL, NULL, &tv);
24 if(select(keyb_fifo_put
+1, NULL
, &rfds
, NULL
, &tv
)>0){
25 write(keyb_fifo_put
,&code
,4);
26 // printf("*** key event %d sent ***\n",code);
28 // printf("*** key event dropped (FIFO is full) ***\n");