[MPlayer-dev-eng] [PATCH][RFC] force OSD time display when seeking

Joey Parrish joey at nicewarrior.org
Thu Sep 1 23:33:32 CEST 2005


Hello,

Attached is a patch that implements a feature request I've gotten from
my users.  When the user seeks, it forces the OSD to briefly display
the current timestamp and total time of the clip.

I imagine someone will probably prefer that this be an option which is
off by default.  :)  Comments are welcome and appreciated.

Thanks,
--Joey

-- 
"There are trivial truths and there are great truths.  The opposite of a
trivial truth is plainly false.  The opposite of a great truth is also true."
  --Neils Bohr
-------------- next part --------------
force the display of timecodes when seeking

diff -ur main.sofar/mplayer.c main.dev/mplayer.c
--- main.sofar/mplayer.c	2005-05-28 16:10:12.550553600 -0500
+++ main.dev/mplayer.c	2005-05-28 16:25:12.674868800 -0500
@@ -4144,6 +4144,10 @@
             snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60,percentage_text);
           else
             snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,percentage_text);
+      } else if(osd_level==1 && osd_visible && vo_osd_progbar_type == 0) {
+	  // forced timecode display
+          int len = demuxer_get_time_length(demuxer);
+          snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60);
       } else osd_text_tmp[0]=0;
       
       if(strcmp(vo_osd_text, osd_text_tmp)) {


More information about the MPlayer-dev-eng mailing list