changeset 651:617ae66624b3

-ss patch by Loring Holden
author arpi_esp
date Thu, 26 Apr 2001 22:10:25 +0000
parents 78cffa191a1e
children 3865228653c4
files cfg-mplayer.h libvo/x11_common.c mplayer.c
diffstat 3 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Thu Apr 26 22:07:59 2001 +0000
+++ b/cfg-mplayer.h	Thu Apr 26 22:10:25 2001 +0000
@@ -58,7 +58,7 @@
 	{"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
 	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
-//	{"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
+	{"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
 	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
 	{"abs", &audio_buffer_size, CONF_TYPE_INT, CONF_MIN, 0, 0},
--- a/libvo/x11_common.c	Thu Apr 26 22:07:59 2001 +0000
+++ b/libvo/x11_common.c	Thu Apr 26 22:10:25 2001 +0000
@@ -92,6 +92,8 @@
    case wsSpace:     mplayer_put_key(' '); break;
    case wsEscape:    mplayer_put_key(KEY_ESC); break;
    case wsEnter:     mplayer_put_key(KEY_ENTER); break;
+   case wsPageUp:    mplayer_put_key(KEY_PAGE_UP); break;
+   case wsPageDown:  mplayer_put_key(KEY_PAGE_DOWN); break;
    case wsq:
    case wsQ:         mplayer_put_key('q'); break;
    case wsp:
--- a/mplayer.c	Thu Apr 26 22:07:59 2001 +0000
+++ b/mplayer.c	Thu Apr 26 22:10:25 2001 +0000
@@ -1668,6 +1668,11 @@
     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 '+':
       buffer_delay+=0.1;  // increase audio buffer delay
@@ -1715,6 +1720,10 @@
       mixer_usemaster=!mixer_usemaster;
       break;
   }
+  if (seek_to_sec) {
+     rel_seek_secs += seek_to_sec;
+     seek_to_sec = 0;
+  }
   if(rel_seek_secs)
   if(file_format==DEMUXER_TYPE_AVI && demuxer->idx_size<=0){
     printf("Can't seek in raw .AVI streams! (index required, try with the -idx switch!)  \n");