Hi List,
Stone wrote:
After building the latest SVN today of the mplayer source, I noticed
that the slavemode patch from the vdr-mp3-plugin did not apply anymore.
Here is an attached working version of the patch for current SVN of
mplayer.
seems like the mplayer people are heavily working on their code. Again a
slight update to the diff, to make it working.
So long,
--
Patrick Cernko | mailto:errror@errror.org |
http://www.errror.org
Eva: "Geht das bei den Floeten mit etwas mehr PATOS?"
H.J.: "Is' dos der Schoofskaes'?"
--- mplayer.c (revision 22763)
+++ mplayer.c (working copy)
@@ -3548,6 +3548,25 @@
edl_decision = 0;
}
+#if 1
+ if(slave_mode){
+ float position=0.0;
+ float time=0.0;
+ if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video->video.dwLength>2) {
+ // get pos from frame number / total frames
+ position=(float)mpctx->d_video->pack_no*100.0/(float)mpctx->sh_video->video.dwLength;
+ }
+ else {
+ off_t len = ( mpctx->demuxer->movi_end - mpctx->demuxer->movi_start );
+ off_t pos = ( mpctx->demuxer->file_format == DEMUXER_TYPE_AUDIO?mpctx->stream->pos:mpctx->demuxer->filepos );
+ if(len>0) position=( pos - mpctx->demuxer->movi_start ) * 100.0 / len;
+ }
+ if(mpctx->sh_video) time=mpctx->d_video->pts;
+ else if(mpctx->sh_audio) time=mpctx->delay;
+ mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);
+ }
+#endif
+
#ifdef HAVE_NEW_GUI
if(use_gui){
guiEventHandling();