[MPlayer-dev-eng] [PATCHES] remove old input code, remove libvo2 references

Joey Parrish joey at yunamusic.com
Wed Aug 28 00:30:50 CEST 2002


On Wed, Aug 28, 2002 at 12:25:00AM +0200, Arpi wrote:
> hmm imho it's time to finaly remove the old input code.
> anyone volunteers?
> 
> 
> A'rpi / Astral & ESP-team

Below are two patches, one to remove the old input code, and one
to remove references to libvo2.  I hope I read correctly in DOCS
that libvo2 was abandoned.

--Joey

-- 

"All you need is love." --Darth Vader
-------------- next part --------------
diff -ur main.cvs/DOCS/mplayer.1 main.new/DOCS/mplayer.1
--- main.cvs/DOCS/mplayer.1	Thu Aug 22 21:03:25 2002
+++ main.new/DOCS/mplayer.1	Tue Aug 27 17:15:03 2002
@@ -1471,9 +1471,8 @@
 
 .SH "SLAVE MODE PROTOCOL"
 If the \-slave switch is given, playback is controlled by a 
-line\-based protocol. If the new input is enabled (default)
-each line must contain one command otherwise one of the 
-following tokens:
+line\-based protocol. Each line must contain one command
+otherwise one of the following tokens:
 .TP
 .B Commands
 .br
diff -ur main.cvs/Gui/interface.c main.new/Gui/interface.c
--- main.cvs/Gui/interface.c	Tue Aug 27 12:19:57 2002
+++ main.new/Gui/interface.c	Tue Aug 27 16:59:56 2002
@@ -355,7 +355,6 @@
 #endif
 	 }
 	break;
-#ifdef HAVE_NEW_INPUT
    case guiIEvent:
         printf( "cmd: %d\n",(int)arg );
 	switch( (int)arg )
@@ -370,7 +369,6 @@
 	       mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 );
 	 }
 	break;
-#endif
    case guiReDraw:
 	mplEventHandling( evRedraw,0 );
 	break;
diff -ur main.cvs/Gui/mplayer/mw.h main.new/Gui/mplayer/mw.h
--- main.cvs/Gui/mplayer/mw.h	Tue Aug 27 12:19:57 2002
+++ main.new/Gui/mplayer/mw.h	Tue Aug 27 17:00:10 2002
@@ -601,35 +601,6 @@
     switch ( Key )
      {
       case wsEnter:     msg=evPlay; break;
-#ifndef HAVE_NEW_INPUT
-      case '.':
-      case '>':         msg=evNext; break;
-      case ',':
-      case '<':         msg=evPrev; break;
-
-      case wsEscape:    msg=evExit; break;
-
-      case wsSpace:     msg=evPause; break;
-      case wsa:
-      case wsA:         msg=evAbout; break;
-      case wsb:
-      case wsB:         msg=evSkinBrowser; break;
-      case wse:
-      case wsE:         msg=evEqualizer; break;
-      case wsf:
-      case wsF:         msg=evFullScreen; break;
-      case wsl:
-      case wsL:         msg=evLoad; break;
-      case wsu:
-      case wsU:         msg=evLoadSubtitle; break;
-      case wsm:
-      case wsM:         msg=evMute; break;
-      case wss:
-      case wsS:         msg=evStop; break;
-      case wsp:
-      case wsP:         msg=evPlayList; break;
-#endif
-
       case wsXF86LowerVolume:  msg=evDecVolume; break;
       case wsXF86RaiseVolume:  msg=evIncVolume; break;
       case wsXF86Mute:         msg=evMute; break;
diff -ur main.cvs/Makefile main.new/Makefile
--- main.cvs/Makefile	Sun Aug 18 15:05:03 2002
+++ main.new/Makefile	Tue Aug 27 17:08:25 2002
@@ -33,7 +33,7 @@
 
 SRCS_COMMON = xacodec.c cpudetect.c codec-cfg.c cfgparser.c my_profile.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c
 SRCS_MENCODER = mencoder.c mp_msg-mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/osd.c libvo/sub.c libvo/font_load.c me-opt-reg.c
-SRCS_MPLAYER = mplayer.c mp_msg.c $(SRCS_COMMON) lirc_mp.c mixer.c mp-opt-reg.c
+SRCS_MPLAYER = mplayer.c mp_msg.c $(SRCS_COMMON) mixer.c mp-opt-reg.c
 
 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
@@ -51,7 +51,7 @@
 A_LIBS = $(ALSA_LIB) $(ARTS_LIB) $(NAS_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(SGIAUDIO_LIB)
 
 CODEC_LIBS = -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 -Lliba52 -la52 -Llibmpeg2 -lmpeg2 $(AV_LIB) $(FAME_LIB) $(XVID_LIB)
-COMMON_LIBS = $(CODEC_LIBS) -Llibmpdemux -lmpdemux  $(NEW_INPUT_LIB)  $(LIB_LOADER) $(A_LIBS) $(CSS_LIB) $(ARCH_LIB) -Lpostproc -lpostproc $(DECORE_LIB) -Llinux -losdep $(TERMCAP_LIB)  $(STREAMING_LIB) $(Z_LIB) $(GTK_LIBS) $(PNG_LIB) $(JPEG_LIB) $(GIF_LIB) $(CDPARANOIA_LIB) -lm
+COMMON_LIBS = $(CODEC_LIBS) -Llibmpdemux -lmpdemux  -Linput -linput  $(LIB_LOADER) $(A_LIBS) $(CSS_LIB) $(ARCH_LIB) -Lpostproc -lpostproc $(DECORE_LIB) -Llinux -losdep $(TERMCAP_LIB)  $(STREAMING_LIB) $(Z_LIB) $(GTK_LIBS) $(PNG_LIB) $(JPEG_LIB) $(GIF_LIB) $(CDPARANOIA_LIB) -lm
 ifeq ($(VIDIX),yes)
 MISC_LIBS += -Llibdha -ldha -Lvidix -lvidix
 endif
diff -ur main.cvs/configure main.new/configure
--- main.cvs/configure	Wed Aug 21 22:12:41 2002
+++ main.new/configure	Tue Aug 27 16:59:06 2002
@@ -157,7 +157,6 @@
                          (support for: http/mms/rtp) [enable]
   --disable-live         disable LIVE.COM Streaming Media support [disable]
   --disable-vidix        disable VIDIX stuff [enable on x86 *nix]
-  --disable-new-input    disable new input system [enable]
   --enable-joystick      enable joystick support in new input [disable]
   --enable-i18n          GNU internationalisation [disable]
   --disable-setlocale    disable setlocale using in mplayer [autodetect]
@@ -957,7 +956,6 @@
 _tv_bsdbt848=auto
 _streaming=yes
 _vidix=auto
-_new_input=yes
 _joystick=no
 _xvid=auto
 _divx4linux=auto
@@ -1097,8 +1095,6 @@
   --disable-streaming)	_streaming=no	;;
   --enable-vidix)	_vidix=yes	;;
   --disable-vidix)	_vidix=no	;;
-  --enable-new-input)	_new_input=yes	;;
-  --disable-new-input)	_new_input=no	;;
   --enable-joystick)	_joystick=yes	;;
   --disable-joystick)	_joystick=no	;;
   --enable-xvid)	_xvid=yes	;;
@@ -4149,22 +4145,16 @@
 fi
 echo Checking for vidix ... "$_vidix"
 
-_def_new_input='#undef HAVE_NEW_INPUT'
 _def_joystick='#undef HAVE_JOYSTICK'
-echo Checking for new input ... "$_new_input"
-if test "$_new_input" = yes ; then 
-  _def_new_input='#define HAVE_NEW_INPUT 1'
-  _ld_new_input="-Linput -linput"
-  if test "$_joystick" = yes ; then
-    if linux ; then
-       # TODO add some check
-       _def_joystick='#define HAVE_JOYSTICK 1'
-    else
-       _joystick="no (unsupported under $system_name)"
-    fi
+if test "$_joystick" = yes ; then
+  if linux ; then
+     # TODO add some check
+     _def_joystick='#define HAVE_JOYSTICK 1'
+  else
+     _joystick="no (unsupported under $system_name)"
   fi
-  echo Checking for joystick ... "$_joystick"
 fi
+echo Checking for joystick ... "$_joystick"
 
 echocheck "lirc"
 if test "$_lirc" = auto ; then
@@ -4179,11 +4169,7 @@
 fi
 if test "$_lirc" = yes ; then
   _def_lirc='#define HAVE_LIRC 1'
-  if test "$_new_input" = yes ; then
-     _ld_new_input="$_ld_new_input -llirc_client"
-  else
-     _ld_lirc='-llirc_client'
-  fi
+  _ld_lirc='-llirc_client'
 else
   _def_lirc='#undef HAVE_LIRC'
 fi
@@ -4289,7 +4275,6 @@
 ENCORE_LIB =  $_ld_encore $_ld_mp3lame
 DIRECTFB_INC = $_inc_directfb
 DIRECTFB_LIB = $_ld_directfb
-NEW_INPUT_LIB = $_ld_new_input
 CDPARANOIA_INC = $_inc_cdparnoia
 CDPARANOIA_LIB = $_ld_cdparanoia
 
@@ -4641,9 +4626,6 @@
 
 /* enables / disables vidix usage */
 $_def_vidix
-
-/* enables / disables new input */
-$_def_new_input
 
 /* enables / disables new input joystick support */
 $_def_joystick
diff -ur main.cvs/input/input.c main.new/input/input.c
--- main.cvs/input/input.c	Wed Aug 21 22:12:41 2002
+++ main.new/input/input.c	Tue Aug 27 17:14:01 2002
@@ -1,7 +1,5 @@
 #include "../config.h"
 
-#ifdef HAVE_NEW_INPUT
-
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -1347,4 +1345,3 @@
   exit(0);
 }
 
-#endif /* HAVE_NEW_INPUT */
diff -ur main.cvs/input/input.h main.new/input/input.h
--- main.cvs/input/input.h	Mon Aug  5 13:14:19 2002
+++ main.new/input/input.h	Tue Aug 27 17:12:55 2002
@@ -1,6 +1,4 @@
 
-#ifdef HAVE_NEW_INPUT
-
 // All commands id
 #define MP_CMD_SEEK   0
 #define MP_CMD_AUDIO_DELAY 1
@@ -172,4 +170,3 @@
 void
 mp_input_uninit(void);
 
-#endif /* HAVE_NEW_INPUT */
diff -ur main.cvs/libmpdemux/mpdemux.c main.new/libmpdemux/mpdemux.c
--- main.cvs/libmpdemux/mpdemux.c	Sat Feb 23 22:37:17 2002
+++ main.new/libmpdemux/mpdemux.c	Tue Aug 27 17:12:28 2002
@@ -2,8 +2,6 @@
 #include "config.h"
 #include <stdlib.h>
 
-
-#ifdef HAVE_NEW_INPUT
 #include "../input/input.h"
 int mpdemux_check_interrupt(int time) {
   mp_cmd_t* cmd;
@@ -26,12 +24,4 @@
     return 0;
   }
 }
-
-#else // Default function
-int mpdemux_check_interrupt(int time){
-  usec_sleep(time*1000);
-  return 0;
-}
-#endif
-
 
diff -ur main.cvs/libvo/vo_gl.c main.new/libvo/vo_gl.c
--- main.cvs/libvo/vo_gl.c	Sun Aug 11 14:12:47 2002
+++ main.new/libvo/vo_gl.c	Tue Aug 27 17:11:09 2002
@@ -204,11 +204,7 @@
 //	bpp = myximage->bits_per_pixel;
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
-	vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
-		     | ButtonPressMask | ButtonReleaseMask
-#endif
-        );
+	vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask );
 
 //  printf("Window setup ok\n");
 
diff -ur main.cvs/libvo/vo_gl2.c main.new/libvo/vo_gl2.c
--- main.cvs/libvo/vo_gl2.c	Sun Aug 11 14:12:47 2002
+++ main.new/libvo/vo_gl2.c	Tue Aug 27 17:11:18 2002
@@ -708,11 +708,7 @@
 	XSync(mDisplay, False);
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
-        vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
-		 | ButtonPressMask | ButtonReleaseMask
-#endif
-        );
+        vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask );
 
   glVersion = glGetString(GL_VERSION);
 
diff -ur main.cvs/libvo/vo_sdl.c main.new/libvo/vo_sdl.c
--- main.cvs/libvo/vo_sdl.c	Sun Aug 11 14:12:48 2002
+++ main.new/libvo/vo_sdl.c	Tue Aug 27 17:11:48 2002
@@ -121,10 +121,8 @@
 #include "x11_common.h"
 #endif
 
-#ifdef HAVE_NEW_INPUT
 #include "../input/input.h"
 #include "../input/mouse.h"
-#endif
 
 LIBVO_EXTERN(sdl)
 
@@ -1208,50 +1206,14 @@
 			break;
 			
 			case SDL_MOUSEBUTTONDOWN:
-#ifdef HAVE_NEW_INPUT
 				if(event.button.button == 4 || event.button.button == 5)
 					mplayer_put_key(MOUSE_BASE+event.button.button-1);
 				else
 					mplayer_put_key((MOUSE_BASE+event.button.button-1) | MP_KEY_DOWN);
-#else
-				switch(event.button.button) {
-					case 1: modifiers |= 1; break;
-					case 2: modifiers |= 2; break;
-					case 3: modifiers |= 4; break;
-					case 4:	/* wheel up */
-						if ((modifiers & 1))
-							mplayer_put_key(KEY_LEFT);
-						else if ((modifiers & 2))
-							mplayer_put_key('/');
-						else if ((modifiers & 4))
-							mplayer_put_key(KEY_PAGE_DOWN);
-						else
-							mplayer_put_key(KEY_DOWN);
-						break;
-					case 5:	/* wheel down */
-						if ((modifiers & 1))
-							mplayer_put_key(KEY_RIGHT);
-						else if ((modifiers & 2))
-							mplayer_put_key('*');
-						else if ((modifiers & 4))
-							mplayer_put_key(KEY_PAGE_UP);
-						else
-							mplayer_put_key(KEY_UP);
-						break;
-				}
-#endif
 				break;			    
 		
 			case SDL_MOUSEBUTTONUP:
-#ifdef HAVE_NEW_INPUT
 				mplayer_put_key(MOUSE_BASE+event.button.button-1);
-#else
-				switch(event.button.button) {
-					case 1: modifiers &= ~1; break;
-					case 2: modifiers &= ~2; break;
-					case 3: modifiers &= ~4; break;
-				}
-#endif
 				break;
 	
 			/* graphics mode selection shortcuts */
diff -ur main.cvs/libvo/vo_xv.c main.new/libvo/vo_xv.c
--- main.cvs/libvo/vo_xv.c	Wed Aug 21 22:12:41 2002
+++ main.new/libvo/vo_xv.c	Tue Aug 27 17:11:57 2002
@@ -396,11 +396,7 @@
         vo_hidecursor(mDisplay,vo_window);
 
         vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask |
-	((WinID==0) ? 0 : (PointerMotionMask
-#ifdef HAVE_NEW_INPUT
-		| ButtonPressMask | ButtonReleaseMask
-#endif
-	  )));
+	((WinID==0) ? 0 : (PointerMotionMask | ButtonPressMask | ButtonReleaseMask )));
         XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
         XSetWMNormalHints( mDisplay,vo_window,&hint );
 	XMapWindow(mDisplay, vo_window);
diff -ur main.cvs/libvo/x11_common.c main.new/libvo/x11_common.c
--- main.cvs/libvo/x11_common.c	Wed Aug 21 22:12:41 2002
+++ main.new/libvo/x11_common.c	Tue Aug 27 17:10:30 2002
@@ -32,10 +32,8 @@
 #include <X11/extensions/xf86vmode.h>
 #endif
 
-#ifdef HAVE_NEW_INPUT
 #include "../input/input.h"
 #include "../input/mouse.h"
-#endif
 
 #ifdef HAVE_NEW_GUI
 #include "../Gui/interface.h"
@@ -624,7 +622,6 @@
       case MotionNotify:
            if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; }
            break;
-#ifdef HAVE_NEW_INPUT
       case ButtonPress:
            if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; }
            // Ignore mouse whell press event
@@ -646,7 +643,6 @@
 	   #endif
            mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1);
            break;
-#endif
       case PropertyNotify: 
     	   {
 	    char * name = XGetAtomName( mydisplay,Event.xproperty.atom );
Only in main.cvs/: lirc_mp.c
Only in main.cvs/: lirc_mp.h
diff -ur main.cvs/mp-opt-reg.c main.new/mp-opt-reg.c
--- main.cvs/mp-opt-reg.c	Mon May 13 08:15:30 2002
+++ main.new/mp-opt-reg.c	Tue Aug 27 17:07:08 2002
@@ -4,18 +4,14 @@
 #include <stdio.h>
 #include "cfgparser.h"
 
-#ifdef HAVE_NEW_INPUT
 extern void mp_input_register_options(m_config_t* cfg);
-#endif
 extern void libmpdemux_register_options(m_config_t* cfg);
 extern void libvo_register_options(m_config_t* cfg);
 
 void
 mp_register_options(m_config_t* cfg) {
   
-#ifdef HAVE_NEW_INPUT
   mp_input_register_options(cfg);
-#endif
   libmpdemux_register_options(cfg);
   libvo_register_options(cfg);
 }
diff -ur main.cvs/mp_msg.h main.new/mp_msg.h
--- main.cvs/mp_msg.h	Wed Aug 21 22:12:41 2002
+++ main.new/mp_msg.h	Tue Aug 27 17:09:42 2002
@@ -47,7 +47,7 @@
 #define MSGT_DVD 17	// open.c (DVD init/read/seek)
 
 #define MSGT_PARSEES 18	// parse_es.c (mpeg stream parser)
-#define MSGT_LIRC 19	// lirc_mp.c and input lirc driver
+#define MSGT_LIRC 19	// input lirc driver
 
 #define MSGT_STREAM 20  // stream.c
 #define MSGT_CACHE 21 	// cache2.c
diff -ur main.cvs/mplayer.c main.new/mplayer.c
--- main.cvs/mplayer.c	Thu Aug 22 21:03:25 2002
+++ main.new/mplayer.c	Tue Aug 27 17:09:14 2002
@@ -62,17 +62,11 @@
 
 #include "cpudetect.h"
 
-#ifdef HAVE_LIRC
-#include "lirc_mp.h"
-#endif
-
 #ifdef HAVE_NEW_GUI
 #include "Gui/interface.h"
 #endif
 
-#ifdef HAVE_NEW_INPUT
 #include "input/input.h"
-#endif
 
 int slave_mode=0;
 int verbose=0;
@@ -359,21 +353,11 @@
   }
 #endif
 
-#ifdef HAVE_NEW_INPUT
   if(mask&INITED_INPUT){
     inited_flags&=~INITED_INPUT;
     current_module="uninit_input";
     mp_input_uninit();
   }
-#else
-#ifdef HAVE_LIRC
-  if(mask&INITED_LIRC){
-    inited_flags&=~INITED_LIRC;
-    current_module="uninit_lirc";
-    lirc_mp_cleanup();
-  }
-#endif
-#endif
 
   current_module=NULL;
 
@@ -467,7 +451,6 @@
 // if the operation fail we use this function to check if it was interrupted by the user.
 // The function return a new value for eof.
 static int libmpdemux_was_interrupted(int eof) {
-#ifdef HAVE_NEW_INPUT
   mp_cmd_t* cmd;
   if((cmd = mp_input_get_cmd(0,0)) != NULL) {
        switch(cmd->id) {
@@ -486,9 +469,6 @@
        mp_cmd_free(cmd);
   }
   return eof;
-#else
-  return 0;
-#endif
 }
 
 int main(int argc,char* argv[], char *envp[]){
@@ -705,11 +685,6 @@
 
   vo_init_osd();
 
-#if defined(HAVE_LIRC) && ! defined(HAVE_NEW_INPUT)
-  lirc_mp_setup();
-  inited_flags|=INITED_LIRC;
-#endif
-
 #ifdef HAVE_RTC
   if(!nortc)
   {
@@ -749,7 +724,6 @@
 make_pipe(&keyb_fifo_get,&keyb_fifo_put);
 
 // Init input system
-#ifdef HAVE_NEW_INPUT
 current_module = "init_input";
 mp_input_init();
 if(keyb_fifo_get > 0)
@@ -760,7 +734,6 @@
   mp_input_add_key_fd(0,1,NULL,NULL);
 inited_flags|=INITED_INPUT;
 current_module = NULL;
-#endif
 
 
   //========= Catch terminate signals: ================
@@ -810,15 +783,11 @@
       guiGetEvent( guiReDrawSubWindow,0 );
       while ( guiIntfStruct.Playing != 1 )
        {
-#ifdef HAVE_NEW_INPUT
         mp_cmd_t* cmd;                                                                                   
-#endif
 	usleep(20000);
 	guiEventHandling();
 	guiGetEvent( guiReDraw,NULL );
-#ifdef HAVE_NEW_INPUT
 	if ( (cmd = mp_input_get_cmd(0,0)) != NULL) guiGetEvent( guiIEvent,(char *)cmd->id );
-#endif
        } 
 
       guiGetEvent( guiSetDefaults,NULL );
@@ -1888,9 +1857,7 @@
 
   if(osd_function==OSD_PAUSE){
     int pkey=-1;
-#ifdef HAVE_NEW_INPUT    
     mp_cmd_t* cmd;
-#endif
       if(!quiet) {
 	mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused);
 	fflush(stdout);
@@ -1904,30 +1871,7 @@
       if (audio_out && sh_audio)
          audio_out->pause();	// pause audio, keep data if possible
 
-#ifdef HAVE_NEW_INPUT
       while( (cmd = mp_input_get_cmd(20,1)) == NULL) {
-#else /* HAVE_NEW_INPUT */
-      if(slave_mode) {
-        fd_set set;
-        struct timeval timeout;
-        while (1) {
-          usec_sleep(1000);
-          FD_ZERO (&set);
-          FD_SET (STDIN_FILENO, &set);
-          timeout.tv_sec = 0;
-          timeout.tv_usec = 1000;
-          if(1==select(FD_SETSIZE, &set, NULL, NULL, &timeout)) {
-            break;
-          }
-        }
-      } else {
-
-        while(
-#ifdef HAVE_LIRC
-             lirc_mp_getinput()<=0 &&
-#endif
-             (use_stdin || getch2(20)<=0) /* && mplayer_get_key()<=0*/){
-#endif /* HAVE_NEW_INPUT */
 	     if(sh_video && video_out && vo_config_count) video_out->check_events();
              if((pkey=mplayer_get_key()) > 0) break;
 #ifdef HAVE_NEW_GUI
@@ -1938,14 +1882,8 @@
              }
 #endif
              usleep(20000);
-#ifdef HAVE_NEW_INPUT
          }
       mp_cmd_free(cmd);
-#else
-             if(use_stdin) usec_sleep(1000); // do not eat the CPU
-         }
-      }
-#endif /* HAVE_NEW_INPUT */ 
          osd_function=OSD_PLAY;
       if (audio_out && sh_audio)
         audio_out->resume();	// resume audio
@@ -1978,330 +1916,6 @@
 
   current_module="key_events";
 
-#ifndef HAVE_NEW_INPUT
-/* slave mode */ 
- if(slave_mode) {
-   char buffer[1024];
-   fd_set set;
-   struct timeval timeout;
-   int arg;
-   
-   FD_ZERO (&set);
-   FD_SET (STDIN_FILENO, &set);
-   timeout.tv_sec = 0;
-   timeout.tv_usec = 1000;
-  
-   if(1 == select (FD_SETSIZE, &set, NULL, NULL, &timeout)) {
-     fgets(buffer, 1024, stdin);
-     if(!strcmp("play\n", buffer)) {
-       osd_function=OSD_PLAY;
-     } else if(!strcmp("stop\n", buffer)) {
-       osd_function=OSD_PAUSE;
-     } else if(!strncmp("seek ", buffer, 5)) {
-       sscanf(buffer+5, "%d", &arg);
-       rel_seek_secs = arg-d_video->pts;
-     } else if(!strncmp("skip ", buffer, 5)) {
-       sscanf(buffer+5, "%d", &arg);
-       rel_seek_secs = arg;
-     } else if(!strcmp("quit\n", buffer)) {
-       exit_player(MSGTR_Exit_quit);
-     } 
-   } else {
-     osd_function=OSD_PLAY;
-   }
- } else
- 
-/* interactive mode */
-{ int c;
-  while(
-#ifdef HAVE_LIRC
-      (c=lirc_mp_getinput())>0 ||
-#endif
-      (!use_stdin && (c=getch2(0))>0) || (c=mplayer_get_key())>0) switch(c){
-    // seek 10 sec
-    case KEY_RIGHT:
-      osd_function=OSD_FFW;
-      rel_seek_secs+=10;break;
-    case KEY_LEFT:
-      osd_function=OSD_REW;
-      rel_seek_secs-=10;break;
-    // seek 1 min
-    case KEY_UP:
-      osd_function=OSD_FFW;
-      rel_seek_secs+=60;break;
-    case KEY_DOWN:
-      osd_function=OSD_REW;
-      rel_seek_secs-=60;break;
-    // seek 10 min
-    case KEY_PAGE_UP:
-      rel_seek_secs+=600;break;
-    case KEY_PAGE_DOWN:
-      rel_seek_secs-=600;break;
-    // delay correction:
-    case '+':
-      audio_delay+=0.1;  // increase audio buffer delay
-      osd_show_av_delay = 9; // show the A-V delay in OSD
-      if(sh_audio) sh_audio->timer-=0.1;
-      break;
-    case '-':
-      audio_delay-=0.1;  // decrease audio buffer delay
-      osd_show_av_delay = 9; // show the A-V delay in OSD
-      if(sh_audio) sh_audio->timer+=0.1;
-      break;
-    // quit
-    case KEY_ESC: // ESC
-    case 'q': 
-      exit_player(MSGTR_Exit_quit);
-    case KEY_ENTER: // ESC
-      eof=1;  // force jump to next file : quit if no next file
-      break;
-    case 'g': grab_frames=2;break;
-    // pause
-    case 'p':
-    case ' ':
-      osd_function=OSD_PAUSE;
-      break;
-    case KEY_HOME:
-      {
-	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-	if(play_tree_iter_up_step(i,1,0) == PLAY_TREE_ITER_ENTRY)
-	  eof = PT_UP_NEXT;
-	play_tree_iter_free(i);
-      }
-      break;
-    case KEY_END:
-      {
-	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-	if(play_tree_iter_up_step(i,-1,0) == PLAY_TREE_ITER_ENTRY)
-	  eof = PT_UP_PREV;
-	play_tree_iter_free(i);
-      }
-      break;
-    case '>':
-      {
-	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-	if(play_tree_iter_step(i,1,0) == PLAY_TREE_ITER_ENTRY)
-	  eof = PT_NEXT_ENTRY;
-	play_tree_iter_free(i);
-      }
-      break;
-    case '<':
-      {
-	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
-	if(play_tree_iter_step(i,-1,0) == PLAY_TREE_ITER_ENTRY)
-	  eof = PT_PREV_ENTRY;
-	play_tree_iter_free(i);
-      }	
-      break;
-    case KEY_INS:
-      if(playtree_iter->num_files > 1 && playtree_iter->file < playtree_iter->num_files)
-	eof = PT_NEXT_SRC;
-      break;
-    case KEY_DEL:      
-      if(playtree_iter->num_files > 1 && playtree_iter->file > 1)
-	eof = PT_PREV_SRC;
-      break;
-    case 'o':  // toggle OSD
-      if(sh_video)
-	osd_level=(osd_level+1)%3;
-      break;
-    case 'z':
-      sub_delay -= 0.1;
-      osd_show_sub_delay = 9; // show the subdelay in OSD
-      break;
-    case 'x':
-      sub_delay += 0.1;
-      osd_show_sub_delay = 9; // show the subdelay in OSD
-      break;
-    case '9':
-    case '0':
-    case '*':
-    case '/': {
-        if(c=='*' || c=='0'){
-               mixer_incvolume();
-        } else {
-               mixer_decvolume();
-        }
-
-#ifdef USE_OSD
-        if(osd_level){
-          osd_visible=sh_video->fps; // 1 sec
-          vo_osd_progbar_type=OSD_VOLUME;
-          vo_osd_progbar_value=(mixer_getbothvolume()*256.0)/100.0;
-          vo_osd_changed(OSDTYPE_PROGBAR);
-          //printf("volume: %d\n",vo_osd_progbar_value);
-        }
-#endif
-      }
-      break; 
-
-#if 0  // change to 1 for absolute seeking tests
-    case '1':
-    case '2':
-    case '3':
-    case '4':
-    case '5':
-    case '6':
-    case '7':
-    case '8':
-	rel_seek_secs=0.99*(float)(c-'1')/7.0;
-	abs_seek_pos=3;
-	printf ("ABS seek to %5.3f   \n",rel_seek_secs);
-	break;
-#else
-    /* User wants to have screen shot */
-    case 'S':
-    case 's':
-		if(vo_config_count) video_out->control(VOCTRL_SCREENSHOT, NULL);
-		break;
-    // Contrast:
-    case '1':
-    case '2':
-        if(c=='2'){
-	    if ( ++vo_gamma_contrast > 100 ) vo_gamma_contrast = 100;
-        } else {
-	    --vo_gamma_contrast;
-	    if(v_hw_equ_cap & VEQ_CAP_CONTRAST)
-	    {
-		if(vo_gamma_contrast < -100) vo_gamma_contrast = -100;
-	    }
-	    else
-	    {
-    		if ( vo_gamma_contrast < 0 ) vo_gamma_contrast = 0;	    
-	    }
-        }
-	if(set_video_colors(sh_video,"Contrast",vo_gamma_contrast)){
-#ifdef USE_OSD
-    		if(osd_level){
-            	    osd_visible=sh_video->fps; // 1 sec
-	    	    vo_osd_progbar_type=OSD_CONTRAST;
-            	    vo_osd_progbar_value=((vo_gamma_contrast)<<8)/100;
-		    if(v_hw_equ_cap) vo_osd_progbar_value = ((vo_gamma_contrast+100)<<8)/200;
-	            vo_osd_changed(OSDTYPE_PROGBAR);
-		}
-#endif
-	}
-	break;
-
-    // Brightness:
-    case '3':
-    case '4':
-        if(c=='4'){
-	    if ( ++vo_gamma_brightness > 100 ) vo_gamma_brightness = 100;
-        } else {
-	    --vo_gamma_brightness;
-	    if(v_hw_equ_cap & VEQ_CAP_BRIGHTNESS)
-	    {
-		if(vo_gamma_brightness < -100) vo_gamma_brightness = -100;
-	    }
-	    else
-	    {
-    		if ( vo_gamma_brightness < 0 ) vo_gamma_brightness = 0;	    
-	    }
-        }
-	if(set_video_colors(sh_video,"Brightness",vo_gamma_brightness)){
-#ifdef USE_OSD
-    		if(osd_level){
-            	    osd_visible=sh_video->fps; // 1 sec
-	    	    vo_osd_progbar_type=OSD_BRIGHTNESS;
-            	    vo_osd_progbar_value=((vo_gamma_brightness)<<8)/100;
-		    if(v_hw_equ_cap) vo_osd_progbar_value = ((vo_gamma_brightness+100)<<8)/200;
-	            vo_osd_changed(OSDTYPE_PROGBAR);
-		}
-#endif
-	}
-	break;
-
-    // Hue:
-    case '5':
-    case '6':
-        if(c=='6'){
-	    if ( ++vo_gamma_hue > 100 ) vo_gamma_hue = 100;
-        } else {
-	    --vo_gamma_hue;
-	    if(v_hw_equ_cap & VEQ_CAP_HUE)
-	    {
-		if(vo_gamma_hue < -100) vo_gamma_hue = -100;
-	    }
-	    else
-	    {
-    		if ( vo_gamma_hue < 0 ) vo_gamma_hue = 0;	    
-	    }
-        }
-	if(set_video_colors(sh_video,"Hue",vo_gamma_hue)){
-#ifdef USE_OSD
-    		if(osd_level){
-            	    osd_visible=sh_video->fps; // 1 sec
-	    	    vo_osd_progbar_type=OSD_HUE;
-            	    vo_osd_progbar_value=((vo_gamma_hue)<<8)/100;
-		    if(v_hw_equ_cap) vo_osd_progbar_value = ((vo_gamma_hue+100)<<8)/200;
-	            vo_osd_changed(OSDTYPE_PROGBAR);
-		}
-#endif
-	}
-	break;
-
-    // Saturation:
-    case '7':
-    case '8':
-        if(c=='8'){
-	    if ( ++vo_gamma_saturation > 100 ) vo_gamma_saturation = 100;
-        } else {
-	    --vo_gamma_saturation;
-	    if(v_hw_equ_cap & VEQ_CAP_SATURATION)
-	    {
-		if(vo_gamma_saturation < -100) vo_gamma_saturation = -100;
-	    }
-	    else
-	    {
-    		if ( vo_gamma_saturation < 0 ) vo_gamma_saturation = 0;	    
-	    }
-        }
-	if(set_video_colors(sh_video,"Saturation",vo_gamma_saturation)){
-#ifdef USE_OSD
-    		if(osd_level){
-            	    osd_visible=sh_video->fps; // 1 sec
-	    	    vo_osd_progbar_type=OSD_SATURATION;
-            	    vo_osd_progbar_value=((vo_gamma_saturation)<<8)/100;
-		    if(v_hw_equ_cap) vo_osd_progbar_value = ((vo_gamma_saturation+100)<<8)/200;
-	            vo_osd_changed(OSDTYPE_PROGBAR);
-		}
-#endif
-	}
-	break;
-#endif
-
-    case 'd':
-      frame_dropping=(frame_dropping+1)%3;
-      mp_msg(MSGT_CPLAYER,MSGL_V,"== drop: %d ==  \n",frame_dropping);
-      break;
-      
-#ifdef USE_TV
-    case 'h':
-     if (tv_param_on == 1)
-        tv_step_channel(tv_handler, TV_CHANNEL_HIGHER);
-     break;
-    case 'l':
-     if (tv_param_on == 1)
-        tv_step_channel(tv_handler, TV_CHANNEL_LOWER);
-     break;
-    case 'n':
-     if (tv_param_on == 1)
-	 tv_step_norm(tv_handler);
-     break;
-    case 'b':
-     if (tv_param_on == 1)
-        tv_step_chanlist(tv_handler);
-     break;
-#endif
-
-    case 'f':
-	if(vo_config_count) video_out->control(VOCTRL_FULLSCREEN, 0);
-     break;
-  }
-} // keyboard event handler
-
-#else /* HAVE_NEW_INPUT */
 {
   mp_cmd_t* cmd;
   while( (cmd = mp_input_get_cmd(0,0)) != NULL) {
@@ -2863,7 +2477,6 @@
     mp_cmd_free(cmd);
   }
 }
-#endif
   if (seek_to_sec) {
     int a,b; float d;
     
-------------- next part --------------
diff -ur main.cvs/Makefile main.dev/Makefile
--- main.cvs/Makefile	Sun Aug 18 15:05:03 2002
+++ main.dev/Makefile	Tue Aug 27 17:21:29 2002
@@ -38,13 +38,8 @@
 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
 
-ifeq ($(VO2),yes)
-VO_LIBS = -Llibvo2 -lvo2
-VO_INC = -Ilibvo2
-else
 VO_LIBS = -Llibvo -lvo
 VO_INC = -Ilibvo
-endif
 V_LIBS = $(X_LIB) $(MP1E_LIB) $(GGI_LIB) $(MLIB_LIB) $(SDL_LIB) $(SVGA_LIB) $(AA_LIB) $(DIRECTFB_LIB)
 
 AO_LIBS = -Llibao2 -lao2
@@ -57,15 +52,10 @@
 endif
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) $(CDPARANOIA_INC)# -Wall
 
-PARTS = libfame libmpdemux libmpcodecs mp3lib liba52 libmp1e libmpeg2 libavcodec libao2 drivers linux postproc input libmpdvdkit
+PARTS = libfame libmpdemux libmpcodecs mp3lib liba52 libmp1e libmpeg2 libavcodec libao2 drivers linux postproc input libmpdvdkit libvo
 ifeq ($(VIDIX),yes)
 PARTS += libdha vidix
 endif
-ifeq ($(VO2),yes)
-PARTS += libvo2
-else
-PARTS += libvo
-endif
 
 ifeq ($(GUI),yes)
 PARTS += Gui
@@ -97,16 +87,11 @@
 .c.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-COMMON_DEPS = libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a
+COMMON_DEPS = libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a linux/libosdep.a postproc/libpostproc.a input/libinput.a libvo/libvo.a
 
 ifeq ($(VIDIX),yes)
 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
 endif
-ifeq ($(VO2),yes)
-COMMON_DEPS += libvo2/libvo2.a
-else
-COMMON_DEPS += libvo/libvo.a
-endif
 ifeq ($(FAME),yes)
 COMMON_DEPS += libfame/libfame.a
 endif
@@ -166,9 +151,6 @@
 
 libvo/libvo.a:
 	$(MAKE) -C libvo
-
-libvo2/libvo2.a:
-	$(MAKE) -C libvo2
 
 libao2/libao2.a:
 	$(MAKE) -C libao2
diff -ur main.cvs/configure main.dev/configure
--- main.cvs/configure	Wed Aug 21 22:12:41 2002
+++ main.dev/configure	Tue Aug 27 17:21:29 2002
@@ -20,7 +20,7 @@
 # GOTCHAS:
 #  - config files are currently:
 #    config.h config.mak libvo/config.mak libao2/config.mak
-#    Gui/config.mak libvo2/config.mak
+#    Gui/config.mak
 #
 #############################################################################
 
@@ -971,7 +971,6 @@
 _directfb=auto
 _zr=auto
 _largefiles=no
-_vo2=no
 _language=en
 _shm=auto
 _linux_devfs=no
@@ -1131,8 +1130,6 @@
   --disable-mtrr)	_mtrr=no	;;
   --enable-largefiles)	_largefiles=yes	;;
   --disable-largefiles)	_largefiles=no	;;
-  --enable-vo2)		_vo2=yes	;;
-  --disable-vo2)	_vo2=no		;;
   --enable-shm)		_shm=yes	;;
   --disable-shm)	_shm=no         ;;
   --enable-select)	_select=yes	;;
@@ -4220,8 +4217,6 @@
 
 OPENDIVX = $_opendivx
 
-VO2 = $_vo2
-
 PNG = $_mkf_png
 JPEG = $_mkf_jpg
 GIF = $_mkf_gif
@@ -4717,20 +4712,6 @@
 OPTIONAL_SRCS = $_vosrc
 OPTIONAL_OBJS = $_voobj
 EOF
-
-#############################################################################
-
-if test -d "libvo2" ; then
-
-echo "Creating libvo2/config.mak"
-_vo2obj=`echo $_vo2src | sed -e 's/\.c/\.o/g'`
-cat > libvo2/config.mak << EOF
-include ../config.mak
-OPTIONAL_SRCS = $_vo2src
-OPTIONAL_OBJS = $_vo2obj
-EOF
-
-fi
 
 #############################################################################
 
diff -ur main.cvs/dll_init.c main.dev/dll_init.c
--- main.cvs/dll_init.c	Sun Jun 23 11:01:35 2002
+++ main.dev/dll_init.c	Tue Aug 27 17:21:29 2002
@@ -24,11 +24,7 @@
 
 #include "dll_init.h"
 
-#ifdef USE_LIBVO2
-#include "libvo2/img_format.h"
-#else
 #include "libvo/img_format.h"
-#endif
 #include "linux/shmem.h"
 
 extern int divx_quality;
diff -ur main.cvs/find_sub.c main.dev/find_sub.c
--- main.cvs/find_sub.c	Mon Apr 15 14:17:12 2002
+++ main.dev/find_sub.c	Tue Aug 27 17:21:29 2002
@@ -8,13 +8,8 @@
 
 #include <stdio.h>
 
-#ifdef USE_LIBVO2
-#include "libvo2/libvo2.h"
-#include "libvo2/sub.h"
-#else
 #include "libvo/video_out.h"
 #include "libvo/sub.h"
-#endif
 #include "subreader.h"
 
 static int current_sub=0;
diff -ur main.cvs/xacodec.c main.dev/xacodec.c
--- main.cvs/xacodec.c	Sun Jun 23 11:01:35 2002
+++ main.dev/xacodec.c	Tue Aug 27 17:21:29 2002
@@ -29,11 +29,7 @@
 #include "codec-cfg.h"
 #include "stheader.h"
 
-#ifdef USE_LIBVO2
-#include "libvo2/img_format.h"
-#else
 #include "libvo/img_format.h"
-#endif
 #include "linux/timer.h"
 #include "xacodec.h"
 


More information about the MPlayer-dev-eng mailing list