Web lists-archives.com

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




On Sat, Dec 06, 2014 at 09:04:50PM +0400, Anton Sviridenko wrote:
> 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

Yes, I mostly started thinking if it would make sense to add a fsync or
so, but I don't think it would change much and might slow things down
quite a bit.
I committed this and my other patch.
Btw. on this list it's appreciated if you avoid top-posting and instead reply
below an appropriate quote.

Thanks,
Reimar


> On Sat, Dec 6, 2014 at 3:25 PM, Reimar Döffinger
> <Reimar.Doeffinger@xxxxxx> 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@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng