# HG changeset patch # User arpi # Date 1032709071 0 # Node ID 44198b2f42db1690ae38e8ff697a30f793d9a969 # Parent 1056d2dc4f3af1c84470ac39ae2a7396df9abee7 removed unused old keyboard fifo hack removed unused allow_dshow hack diff -r 1056d2dc4f3a -r 44198b2f42db fifo.c --- a/fifo.c Sun Sep 22 14:28:29 2002 +0000 +++ b/fifo.c Sun Sep 22 15:37:51 2002 +0000 @@ -10,36 +10,6 @@ *pw=temp[1]; } -static inline int my_write(int fd,unsigned char* mem,int len){ - int total=0; - int len2; - while(len>0){ - len2=write(fd,mem+total,len); if(len2<=0) break; - total+=len2;len-=len2; -// printf("%d bytes received, %d left\n",len2,len); - } - return total; -} - -static inline int my_read(int fd,unsigned char* mem,int len){ - int total=0; - int len2; - while(len>0){ - len2=read(fd,mem+total,len); if(len2<=0) break; - total+=len2;len-=len2; -// printf("%d bytes received, %d left\n",len2,len); - } - return total; -} - - -void send_cmd(int fd,int cmd){ - int fifo_cmd=cmd; - write(fd,&fifo_cmd,4); -// fflush(control_fifo); -} - - void mplayer_put_key(int code){ fd_set rfds; struct timeval tv; @@ -58,23 +28,3 @@ // printf("*** key event dropped (FIFO is full) ***\n"); } } - -int mplayer_get_key(){ - fd_set rfds; - struct timeval tv; - int code=-1; - - /* Watch stdin (fd 0) to see when it has input. */ - FD_ZERO(&rfds); - FD_SET(keyb_fifo_get, &rfds); - tv.tv_sec = 0; - tv.tv_usec = 0; - - //retval = select(keyb_fifo_put+1, &rfds, NULL, NULL, &tv); - if(select(keyb_fifo_put+1, &rfds, NULL, NULL, &tv)>0){ - read(keyb_fifo_get,&code,4); -// printf("*** key event %d read ***\n",code); - } - return code; -} - diff -r 1056d2dc4f3a -r 44198b2f42db mplayer.c --- a/mplayer.c Sun Sep 22 14:28:29 2002 +0000 +++ b/mplayer.c Sun Sep 22 15:37:51 2002 +0000 @@ -180,15 +180,6 @@ char *audio_fm=NULL; // override audio codec family char *video_fm=NULL; // override video codec family -// IMHO this stuff is no longer of use, or is there a special -// reason why dshow should be completely disabled? - atmos :: -// yes, people without working c++ compiler can disable it - A'rpi -#ifdef USE_DIRECTSHOW -int allow_dshow=1; -#else -int allow_dshow=0; -#endif - // streaming: int audio_id=-1; int video_id=-1; @@ -1874,7 +1865,6 @@ #endif if(osd_function==OSD_PAUSE){ - int pkey=-1; mp_cmd_t* cmd; if(!quiet) { mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); @@ -1891,7 +1881,6 @@ while( (cmd = mp_input_get_cmd(20,1)) == NULL) { if(sh_video && video_out && vo_config_count) video_out->check_events(); - if((pkey=mplayer_get_key()) > 0) break; #ifdef HAVE_NEW_GUI if(use_gui){ guiEventHandling(); @@ -1915,8 +1904,6 @@ guiGetEvent( guiCEvent,(char *)guiSetPlay ); } #endif - if(pkey!=32 && pkey!=112 && pkey!=-1) - mplayer_put_key(pkey); // pass on the key } // handle -sstep