summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/interface.c2
-rw-r--r--Gui/mplayer/mw.h29
-rw-r--r--Makefile6
-rwxr-xr-xconfigure33
-rw-r--r--input/input.c4
-rw-r--r--input/input.h5
-rw-r--r--libvo/vo_gl.c2
-rw-r--r--libvo/vo_gl2.c2
-rw-r--r--libvo/vo_sdl.c41
-rw-r--r--libvo/vo_xv.c2
-rw-r--r--libvo/x11_common.c6
-rw-r--r--mp-opt-reg.c5
-rw-r--r--mplayer.c389
13 files changed, 17 insertions, 509 deletions
diff --git a/Gui/interface.c b/Gui/interface.c
index 9caf1a245a..f2225f4e44 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -355,7 +355,6 @@ int guiGetEvent( int type,char * arg )
#endif
}
break;
-#ifdef HAVE_NEW_INPUT
case guiIEvent:
printf( "cmd: %d\n",(int)arg );
switch( (int)arg )
@@ -370,7 +369,6 @@ int guiGetEvent( int type,char * arg )
mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 );
}
break;
-#endif
case guiReDraw:
mplEventHandling( evRedraw,0 );
break;
diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h
index e1df60bad0..ba0ff8eed3 100644
--- a/Gui/mplayer/mw.h
+++ b/Gui/mplayer/mw.h
@@ -601,35 +601,6 @@ void mplMainKeyHandle( int KeyCode,int Type,int Key )
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 --git a/Makefile b/Makefile
index c613dc8e46..8d5ea0ee4d 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ INSTALL = install
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 @@ AO_LIBS = -Llibao2 -lao2
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
@@ -221,7 +221,7 @@ $(PRG_FIBMAP): fibmap_mplayer.o
ifeq ($(MENCODER),yes)
$(PRG_MENCODER): $(MENCODER_DEP)
./darwinfixlib.sh $(MENCODER_DEP) libmpcodecs/libmpencoders.a
- $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) -Llibmpcodecs -lmpencoders $(COMMON_LIBS) $(EXTRA_LIB) $(ENCORE_LIB) $(MLIB_LIB)
+ $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) -Llibmpcodecs -lmpencoders $(COMMON_LIBS) $(EXTRA_LIB) $(ENCORE_LIB) $(MLIB_LIB) $(LIRC_LIB)
endif
# Every mplayer dependency depends on version.h, to force building version.h
diff --git a/configure b/configure
index c309434e00..533ccc749d 100755
--- a/configure
+++ b/configure
@@ -957,7 +957,6 @@ _tv_v4l=auto
_tv_bsdbt848=auto
_streaming=yes
_vidix=auto
-_new_input=yes
_joystick=no
_xvid=auto
_divx4linux=auto
@@ -1097,8 +1096,6 @@ for ac_option do
--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 ;;
@@ -4153,22 +4150,16 @@ else
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
@@ -4183,11 +4174,7 @@ EOF
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
@@ -4293,7 +4280,6 @@ MENCODER = $_mencoder
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
@@ -4647,9 +4633,6 @@ $_def_cdparanoia
/* enables / disables vidix usage */
$_def_vidix
-/* enables / disables new input */
-$_def_new_input
-
/* enables / disables new input joystick support */
$_def_joystick
diff --git a/input/input.c b/input/input.c
index 9c23ee9b2a..96faeab436 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1,7 +1,5 @@
#include "../config.h"
-#ifdef HAVE_NEW_INPUT
-
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -1346,5 +1344,3 @@ static int mp_input_print_cmd_list(config_t* cfg) {
}
exit(0);
}
-
-#endif /* HAVE_NEW_INPUT */
diff --git a/input/input.h b/input/input.h
index 1652b78ef7..1b6d58f8e6 100644
--- a/input/input.h
+++ b/input/input.h
@@ -1,6 +1,3 @@
-
-#ifdef HAVE_NEW_INPUT
-
// All commands id
#define MP_CMD_SEEK 0
#define MP_CMD_AUDIO_DELAY 1
@@ -171,5 +168,3 @@ mp_input_init(void);
void
mp_input_uninit(void);
-
-#endif /* HAVE_NEW_INPUT */
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index bee1767d45..d202503a09 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -205,9 +205,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
| ButtonPressMask | ButtonReleaseMask
-#endif
);
// printf("Window setup ok\n");
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 800dc4a442..31d35345c4 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -709,9 +709,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
-#ifdef HAVE_NEW_INPUT
| ButtonPressMask | ButtonReleaseMask
-#endif
);
glVersion = glGetString(GL_VERSION);
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 80948b107d..656e7c20f8 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -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)
@@ -490,6 +488,9 @@ static int sdl_open (void *plugin, void *name)
//}
#endif
+ if (vo_doublebuffering)
+ priv->sdlflags |= SDL_DOUBLEBUF;
+
/* Setup Keyrepeats (500/30 are defaults) */
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/);
@@ -1208,50 +1209,14 @@ static void check_events (void)
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 --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 96b2c68579..31e874c67f 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -397,9 +397,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask |
((WinID==0) ? 0 : (PointerMotionMask
-#ifdef HAVE_NEW_INPUT
| ButtonPressMask | ButtonReleaseMask
-#endif
)));
XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
XSetWMNormalHints( mDisplay,vo_window,&hint );
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 2d9e5438d1..d352974be2 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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"
@@ -366,6 +364,7 @@ int vo_init( void )
vo_wm_type=vo_wm_detect();
+ saver_off(mDisplay);
return 1;
}
@@ -532,6 +531,7 @@ XSizeHints vo_hint;
void vo_x11_uninit()
{
+ saver_on(mDisplay);
if(vo_window!=None) vo_showcursor( mDisplay,vo_window );
#ifdef HAVE_NEW_GUI
@@ -624,7 +624,6 @@ int vo_x11_check_events(Display *mydisplay){
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 +645,6 @@ int vo_x11_check_events(Display *mydisplay){
#endif
mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1);
break;
-#endif
case PropertyNotify:
{
char * name = XGetAtomName( mydisplay,Event.xproperty.atom );
diff --git a/mp-opt-reg.c b/mp-opt-reg.c
index 7ec1e4c11d..2eda11ec78 100644
--- a/mp-opt-reg.c
+++ b/mp-opt-reg.c
@@ -1,21 +1,16 @@
-
#include "config.h"
#include <stdlib.h>
#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 --git a/mplayer.c b/mplayer.c
index 4adc7e6045..2dfb9af1ef 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -62,17 +62,11 @@ extern void* mDisplay; // Display* mDisplay;
#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,24 +353,13 @@ void uninit_player(unsigned int mask){
}
#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;
-
}
void exit_player(char* how){
@@ -467,7 +450,6 @@ if ((conffile = get_path("")) == NULL) {
// 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 +468,6 @@ static int libmpdemux_was_interrupted(int eof) {
mp_cmd_free(cmd);
}
return eof;
-#else
- return 0;
-#endif
}
int main(int argc,char* argv[], char *envp[]){
@@ -705,11 +684,6 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
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 +723,6 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
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 +733,6 @@ else if(!use_stdin)
mp_input_add_key_fd(0,1,NULL,NULL);
inited_flags|=INITED_INPUT;
current_module = NULL;
-#endif
//========= Catch terminate signals: ================
@@ -810,15 +782,11 @@ if(!use_stdin && !slave_mode){
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 +1856,7 @@ if(auto_quality>0){
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 +1870,7 @@ if(auto_quality>0){
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 +1881,8 @@ if(auto_quality>0){
}
#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 +1915,6 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
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 +2476,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
mp_cmd_free(cmd);
}
}
-#endif
+
if (seek_to_sec) {
int a,b; float d;