mirror of
https://github.com/mpv-player/mpv
synced 2024-10-02 16:25:33 +02:00
removed unused old keyboard fifo hack
removed unused allow_dshow hack git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7484 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5b7905fdd2
commit
2558c30739
50
fifo.c
50
fifo.c
@ -10,36 +10,6 @@ static void make_pipe(int* pr,int* pw){
|
||||
*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 @@ void mplayer_put_key(int code){
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
13
mplayer.c
13
mplayer.c
@ -180,15 +180,6 @@ char *video_codec=NULL; // override video codec
|
||||
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 @@ if(auto_quality>0){
|
||||
#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 @@ if(auto_quality>0){
|
||||
|
||||
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 @@ if(auto_quality>0){
|
||||
guiGetEvent( guiCEvent,(char *)guiSetPlay );
|
||||
}
|
||||
#endif
|
||||
if(pkey!=32 && pkey!=112 && pkey!=-1)
|
||||
mplayer_put_key(pkey); // pass on the key
|
||||
}
|
||||
|
||||
// handle -sstep
|
||||
|
Loading…
Reference in New Issue
Block a user