2010/12/19 Elias Gabriel Amaral da Silva <tolkiendili@gmail.com>:
2010/12/17 Reimar Döffinger <Reimar.Doeffinger@gmx.de>:
However being able to use arbitrary properties in commands might be a useful feature.
I implemented it, just for filename.
Attached is an implementation for MPLAYER_POS and MPLAYER_LEN as well. I talked with some people at #mplayerdev about it. It was suggested that I should avoid putting complexity at the code and do it with a slave mode wrapper. In my understanding, it would have to open some IPC channel (such as an unix socket), and the command run would have to ask it for such data through this channel. Also, the wrapper would have to handle UI. This would too complex. Also uau suggested that instead of keeping hard-coded environment variables (since the list of them could grow), one should expand mplayer variables on run parameter, like osd_show_property_text does. An issue would be how to handle multiple parameters, but it seems that string parameters already get " escaped, so one could write this command: run "my_script \"${filename}\" \"${length}\" \"${time_pos}\"" Where ${filename} would (deceptively) be expanded by mplayer, not by the shell. In any case, it seems this feature haven't attracted much interest, since it does something that could ultimately be done by slave mode. Uau seems unsure whether my feature is worth enough to be merged, even if I implement it in a more general fashion like he suggested. And I admit that may be the case that it will be useful just for me. Thoughts?