[MPlayer-users] Slave mode - detecting end of file.

Edd Barrett vext01 at gmail.com
Mon Feb 28 14:25:30 CET 2011


On Mon, Feb 28, 2011 at 11:17:56AM +0000, Edd Barrett wrote:
> 2011/2/28 Phil Rhodes <phil_rhodes at rocketmail.com>:
> >
> >>> A: 299.2 (04:59.2) of 299.0 (04:59.0)  1.5%
> >
> > There are certainly situations where this never actually appears.
> 
> Yup.
> 
> If you look at mplayer.c (trunk) line 3082, we see that when nothing
> is playing, mplayer will only respond to:
> MP_CMD_LOADFILE, MP_CMD_LOADLIST, MP_CMD_QUIT, MP_CMD_VO_FULLSCREEN,
> MP_CMD_GET_PROPERTY,  MP_CMD_SET_PROPERTY, MP_CMD_STEP_PROPERTY.
> 
> I am going to reccommend it responds to MP_CMD_GET_FILENAME too.
> 
> Will have a diff soon (if it works), but I am snowed under with real
> work, so bear with me.

Something like this. Note the lack of single quotes indicating that this is not
a literal filename.

Index: mplayer.c
===================================================================
--- mplayer.c	(revision 32981)
+++ mplayer.c	(working copy)
@@ -3101,6 +3101,9 @@
         case MP_CMD_QUIT:
             exit_player_with_rc(EXIT_QUIT, (cmd->nargs > 0)? cmd->args[0].v.i : 0);
             break;
+        case MP_CMD_GET_FILENAME:
+            mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_FILENAME=(none)\n");
+	    break;
         case MP_CMD_VO_FULLSCREEN:
         case MP_CMD_GET_PROPERTY:
         case MP_CMD_SET_PROPERTY:

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


More information about the MPlayer-users mailing list