[MPlayer-dev-eng] [PATCH] Print screenshot message after screenshot file is saved

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Dec 6 12:25:40 CET 2014


On Sat, Dec 06, 2014 at 02:46:29AM +0400, Anton Sviridenko wrote:
> When screenshot is requeste from mplayer, mplayer prints message like
> 
> *** screenshot 'shot0001.png' ***
> 
> before the file is actually saved to disk. That's very inconvenient
> for application
> using mplayer in slave mode that wants to save screenshot files in some separate
> place with user-defined name. Because application has to wait until
> that file appears
> in mplayer's working directory and check somehow that it is fully written.
> 
> I suggest to move this message from gen_fname() to write_png() and
> print it after
> the file is closed

It seems reasonable, however I am not sure this will guarantee that the
file will be fully visible to another application when it sees the message,
so it might provide false safety.
It probably does work with local file systems though.


More information about the MPlayer-dev-eng mailing list