[MPlayer-dev-eng] run command patch

Diego Biurrun diego at biurrun.de
Tue Feb 21 23:06:00 CET 2012


On Wed, Feb 15, 2012 at 08:31:09PM +0100, Reimar Döffinger wrote:
> On Wed, Feb 15, 2012 at 08:16:52PM +0100, Jan Christoph Uhde wrote:
> > --- DOCS/tech/slave.txt	(revision 34728)
> > +++ DOCS/tech/slave.txt	(working copy)
> > @@ -508,11 +508,21 @@
> >  
> > -run <value>
> > -    Run <value> as shell command. In OSD menu console mode stdout and stdin
> > -    are through the video output driver.
> > +run <string>
> > +    Run <string> with expanded variables as shell command. In OSD menu
> > +    console mode stdout and stdin are through the video output driver.
> >  
> > +    Example:
> > +    <KEY> run "echo '${filename} ${stream_pos}' >> <path_to_file>"
> >  
> > +    A POSIX shell would not be able to expand the variables between
> > +    single quotes. So it should be obvious that ${<var_name>} strings are
> > +    not shell variables. The syntax with curly braces for shell variables
> > +    can not be used. Because the variable is either expanded to one
> > +    of MPlayer's properties or a string of length zero before the
> > +    command is passed to /bin/sh.
> 
> Ah.
> Maybe more clear:
> Note: MPlayer will do variable expansion on anything of the form
> ${somevar} before it is passed to the shell.
> This means that you cannot use this syntax for anything you actually
> want the shell to handle.
> Anything else will be passed on to the shell unchanged, so you can
> use e.g. $somevar to have the shell expand it instead of MPlayer.

But what does MPlayer expand?

Diego


More information about the MPlayer-dev-eng mailing list