Mercurial > mplayer.hg
annotate fifo.c @ 9610:76c6d8f1ebf5
this is a combo patch that:
1) adds an experimental TS demuxer to mplayer
2) adds an input (streaming) interface from DVB cards.
It compiles and runs with the following versions of the drivers:
dvb-kernel (HEAD) (with stock kernel 2.4.20) and 0.9.4 (with kernel 2.4.18)
patch by Nico <nsabbi@libero.it>
some cleanups, ts demuxer fixes by me
author | arpi |
---|---|
date | Sun, 16 Mar 2003 20:13:28 +0000 |
parents | 44198b2f42db |
children | 0397b461f0fb |
rev | line source |
---|---|
113 | 1 |
2 // keyboard: | |
3 static int keyb_fifo_put=-1; | |
4 static int keyb_fifo_get=-1; | |
5 | |
6 static void make_pipe(int* pr,int* pw){ | |
7 int temp[2]; | |
8 if(pipe(temp)!=0) printf("Cannot make PIPE!\n"); | |
9 *pr=temp[0]; | |
10 *pw=temp[1]; | |
11 } | |
12 | |
13 void mplayer_put_key(int code){ | |
14 fd_set rfds; | |
15 struct timeval tv; | |
16 | |
17 /* Watch stdin (fd 0) to see when it has input. */ | |
18 FD_ZERO(&rfds); | |
19 FD_SET(keyb_fifo_put, &rfds); | |
20 tv.tv_sec = 0; | |
21 tv.tv_usec = 0; | |
22 | |
23 //retval = select(keyb_fifo_put+1, &rfds, NULL, NULL, &tv); | |
3014
16576e05b93a
Profiling fix by Artur Skawina <skawina@geocities.com>
atmos4
parents:
113
diff
changeset
|
24 if(select(keyb_fifo_put+1, NULL, &rfds, NULL, &tv)>0){ |
113 | 25 write(keyb_fifo_put,&code,4); |
26 // printf("*** key event %d sent ***\n",code); | |
27 } else { | |
28 // printf("*** key event dropped (FIFO is full) ***\n"); | |
29 } | |
30 } |