[MPlayer-cvslog] CVS: main mplayer.c,1.882,1.883

Sascha Sommer saschasommer at freenet.de
Sun Nov 6 19:05:42 CET 2005


On Sunday 06 November 2005 15:44, Tobias Diedrich CVS wrote:
> CVS change done by Tobias Diedrich CVS
>
> Update of /cvsroot/mplayer/main
> In directory mail:/var2/tmp/cvs-serv19930
>
> Modified Files:
> 	mplayer.c
> Log Message:
> Number of frames to show the OSD shouldn't be hardcoded, derive from fps
> instead
>
> Index: mplayer.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/mplayer.c,v
> retrieving revision 1.882
> retrieving revision 1.883
> diff -u -r1.882 -r1.883
> --- mplayer.c	5 Nov 2005 17:25:34 -0000	1.882
> +++ mplayer.c	6 Nov 2005 14:44:49 -0000	1.883
> @@ -2859,7 +2859,7 @@
>      case MP_CMD_SEEK : {
>        float v;
>        int abs;
> -      osd_show_percentage = 25;
> +      osd_show_percentage = sh_video->fps;
>        v = cmd->args[0].v.f;
>        abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
>        if(abs==2) { /* Absolute seek to a specific timestamp in seconds */
> @@ -2898,7 +2898,7 @@
>      case MP_CMD_AUDIO_DELAY : {
>        float v = cmd->args[0].v.f;
>        audio_delay += v;
> -      osd_show_av_delay = 9;
> +      osd_show_av_delay = sh_video->fps/2;
>        if(sh_audio) sh_audio->delay+= v;
>      } break;
>      case MP_CMD_SPEED_INCR : {
> @@ -2994,7 +2994,7 @@
>  	sub_delay = v;
>        else
>  	sub_delay += v;
> -      osd_show_sub_delay = 9; // show the subdelay in OSD
> +      osd_show_sub_delay = sh_video->fps/2; // show the subdelay in OSD
>      }
>  #endif
>      } break;
> @@ -3003,7 +3003,7 @@
>      if (sh_video) {
>        int movement = cmd->args[0].v.i;
>        step_sub(subdata, sh_video->pts, movement);
> -      osd_show_sub_delay = 9; // show the subdelay in OSD
> +      osd_show_sub_delay = sh_video->fps/2; // show the subdelay in OSD
>      }
>  #endif
>      } break;
> @@ -3023,7 +3023,7 @@
>  	/* Show OSD state when disabled, but not when an explicit
>  	   argument is given to the osd command, i.e. in slave mode. */
>  	if (v == -1 && osd_level <= 1)
> -	  osd_show_status = 9;
> +	  osd_show_status = sh_video->fps/2;
>        }
>  #endif
>      } break;
> @@ -3274,7 +3274,7 @@
>        if(v < 0){
>  	frame_dropping = (frame_dropping+1)%3;
>  #ifdef USE_OSD
> -       osd_show_framedropping=10;
> +       osd_show_framedropping=sh_video->fps/2;
>         vo_osd_changed(OSDTYPE_SUBTITLE);
>  #endif
>        }
> @@ -3424,7 +3424,7 @@
>       if(video_out && vo_config_count) {
>         video_out->control(VOCTRL_ONTOP, 0);
>  #ifdef USE_OSD
> -       osd_show_ontop=10;
> +       osd_show_ontop=sh_video->fps/2;
>         vo_osd_changed(OSDTYPE_SUBTITLE);
>  #endif
>       }
> @@ -3435,7 +3435,7 @@
>       if(video_out && vo_config_count) {
>         video_out->control(VOCTRL_ROOTWIN, 0);
>  #ifdef USE_OSD
> -       osd_show_rootwin=10;
> +       osd_show_rootwin=sh_video->fps/2;
>         vo_osd_changed(OSDTYPE_SUBTITLE);
>  #endif
>       }
> @@ -3473,7 +3473,7 @@
>  	if(sub_pos >100) sub_pos=100;
>  	if(sub_pos <0) sub_pos=0;
>  	vo_osd_changed(OSDTYPE_SUBTITLE);
> -        osd_show_sub_pos = 9;
> +        osd_show_sub_pos = sh_video->fps/2;
>        }
>  #endif
>      } break;
> @@ -3485,7 +3485,7 @@
>      	    sub_alignment = cmd->args[0].v.i;
>      	else
>              sub_alignment = (sub_alignment+1) % 3;
> -	osd_show_sub_alignment = 9;
> +	osd_show_sub_alignment = sh_video->fps/2;
>  	vo_osd_changed(OSDTYPE_SUBTITLE);
>        }
>  #endif
> @@ -3495,7 +3495,7 @@
>  #ifdef USE_SUB
>        if (sh_video) {
>  	sub_visibility=1-sub_visibility;
> -	osd_show_sub_visibility = 9; // show state of subtitle visibility in OSD
> +	osd_show_sub_visibility = sh_video->fps/2; // show state of subtitle
> visibility in OSD vo_osd_changed(OSDTYPE_SUBTITLE);
>        }
>  #endif
> @@ -3763,7 +3763,7 @@
>                  mp_msg(MSGT_FIXME, MSGL_FIXME,
> MSGTR_DvdnavEvent,dvd_nav_text); //osd_show_dvd_nav_delay = 60;
>
> -                osd_show_dvd_nav_highlight=1;
> +                osd_show_dvd_nav_highlight=sh_video->fps/2;
>                  osd_show_dvd_nav_sx=hevent->sx;
>                  osd_show_dvd_nav_ex=hevent->ex;
>                  osd_show_dvd_nav_sy=hevent->sy;
>

sh_video is NULL for audio only files. Please fix.

Sascha




More information about the MPlayer-cvslog mailing list