[MPlayer-dev-eng] [PATCH] makes the seek sizes configurable (arrows/pageup/down)

Danny Rathjens dkr at hq.mycity.com
Tue Jan 8 04:26:00 CET 2002


How should I interpret the lack of response?
Is this patch wrong in some way?  or was it just a dumb idea?
I personally use it to change the smallseek time to 3 seconds
since I like to back up a little to hear a word occasionally.
Please give me some input.

Danny Rathjens wrote:

> I found myself editing the values in the source every update so I
> figured I should make them configurable.
> diff'd from cvs
> If this patch makes sense(e.g. option/variable naming) then let me
> know and I will patch the man page appropriately.
> 
> For my next slightly more ambitious project I was thinking of making
> all of the keyboard definitions configurable(perhaps allow pause and
> volume control with mouse).
> My plan is to stumble along blindly until I grow accustomed to the
> dark.  So I am staying away from the real a/v code until I figure
> out how it all works and how I could contribute to it, :)
> 
> 
> ------------------------------------------------------------------------
> 
> Index: cfg-mplayer.h
> ===================================================================
> RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
> retrieving revision 1.118
> diff -u -r1.118 cfg-mplayer.h
> --- cfg-mplayer.h	28 Dec 2001 13:28:06 -0000	1.118
> +++ cfg-mplayer.h	6 Jan 2002 21:14:51 -0000
> @@ -159,6 +159,9 @@
>  //	{"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_STRING, CONF_MIN, 0, 0},
> +	{"seeksmall", &seek_size_small, CONF_TYPE_INT, CONF_MIN, 0, 0},   // seconds to seek with left and right arrows
> +	{"seekmedium", &seek_size_medium, CONF_TYPE_INT, CONF_MIN, 0, 0}, // seconds to seek with up and down arrows
> +	{"seeklarge", &seek_size_large, CONF_TYPE_INT, CONF_MIN, 0, 0},   // seconds to seek with pageup and pagedown
>  	{"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
>  	{"noloop", &loop_times, CONF_TYPE_FLAG, 0, 0, -1},
>  	{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000},
> Index: mplayer.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/mplayer.c,v
> retrieving revision 1.359
> diff -u -r1.359 mplayer.c
> --- mplayer.c	1 Jan 2002 22:46:07 -0000	1.359
> +++ mplayer.c	6 Jan 2002 21:14:53 -0000
> @@ -164,6 +164,9 @@
>  // seek:
>  char *seek_to_sec=NULL;
>  off_t seek_to_byte=0;
> +int seek_size_small=10;
> +int seek_size_medium=60;
> +int seek_size_large=600;
>  off_t step_sec=0;
>  int loop_times=-1;
>  float rel_seek_secs=0;
> @@ -1858,22 +1861,22 @@
>      // seek 10 sec
>      case KEY_RIGHT:
>        osd_function=OSD_FFW;
> -      rel_seek_secs+=10;break;
> +      rel_seek_secs+=seek_size_small;break;
>      case KEY_LEFT:
>        osd_function=OSD_REW;
> -      rel_seek_secs-=10;break;
> +      rel_seek_secs-=seek_size_small;break;
>      // seek 1 min
>      case KEY_UP:
>        osd_function=OSD_FFW;
> -      rel_seek_secs+=60;break;
> +      rel_seek_secs+=seek_size_medium;break;
>      case KEY_DOWN:
>        osd_function=OSD_REW;
> -      rel_seek_secs-=60;break;
> +      rel_seek_secs-=seek_size_medium;break;
>      // seek 10 min
>      case KEY_PAGE_UP:
> -      rel_seek_secs+=600;break;
> +      rel_seek_secs+=seek_size_large;break;
>      case KEY_PAGE_DOWN:
> -      rel_seek_secs-=600;break;
> +      rel_seek_secs-=seek_size_large;break;
>      // delay correction:
>      case '+':
>        audio_delay+=0.1;  // increase audio buffer delay
> 
-- 

      _.,-*~`^'~*-,._ Danny Rathjens _.,-*~`^'~*-,._
"Do you believe in the Devil?  You know, a supreme evil being dedicated
to the temptation, corruption, and destruction of man?"
"I'm not sure man needs the help." --Bill Watterson as Calvin & Hobbes





More information about the MPlayer-dev-eng mailing list