[MPlayer-users] DVD seeking and byte position

Nico Sabbi nsabbi at tiscali.it
Fri Jan 28 17:54:49 CET 2005


Thorben Kröger wrote:

>>stream_tell(stream) is the byte position of the stream playing.
>>stream is also accessible as demuxer->stream
>>    
>>
>
>Thanks! I changed the line in mplayer.c which prints the "==== PAUSE ====" 
>line to display the current byte position. This seems to work fairly well 
>together with -sb, but I'm still testing it.
>
>--- mplayer.c   2004-12-21 13:25:58.000000000 +0100
>+++ mplayer-new.c       2005-01-28 17:14:24.090238520 +0100
>@@ -2601,7 +2601,7 @@
>   if(osd_function==OSD_PAUSE){
>     mp_cmd_t* cmd;
>       if(!quiet) {
>-       mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused);
>+       mp_msg(MSGT_CPLAYER,MSGL_STATUS,"==== PAUSED ==== at %lld 
>bytes\n",stream_tell(demuxer->stream));
>        fflush(stdout);
>       }
> #ifdef HAVE_NEW_GUI
>
>Thorben
>
>  
>

better so:

-       mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused);
+       mp_msg(MSGT_CPLAYER,MSGL_STATUS,"==== PAUSED ==== at %llu  bytes\n",
(uint64_t) stream_tell(demuxer->stream));

so if _LARGEFILE_SOURCE is not defined you can still use it





More information about the MPlayer-users mailing list