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

Anton Sviridenko anton at corp.bluecherry.net
Sat Dec 6 18:04:50 CET 2014


I think that visibility of screenshot file is not guaranteed when
master application and slave mplayer process are running on different
computers and read/write screenshots using shared network
storage/filesystem. But that's very strange use case :) Otherwise
screenshot file should be fully visible to other process through
filesystem cache, even if it is not physically stored yet. But anyway
this patch improves situation


On Sat, Dec 6, 2014 at 3:25 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> 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.
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng


More information about the MPlayer-dev-eng mailing list