[vlc-devel] [PATCH 3/3] Added livehttp access_out module to support HTTP Live Streaming
Keary Griffin
kearygriffin at gmail.com
Wed May 12 22:03:45 CEST 2010
Thanks Geoffroy,
> I don't know if I really understand what you mean here, but on
> Windows, if you want to replace a file in use, there is one (strangely
> unknown) trick:
> -rename the old file to something else with MoveFile
> -replace by the new file with MoveFile
> -mark the old file for deletion with DeleteFile
>
> After the call to DeleteFile, the old file will not be deleted until
> all its handles have been closed, and no process will be able to open
> it again.
>
> It is still not atomic: someone could try to open the playlist after
> it has been moved and before it has been replaced.
>
I didn't know about that trick, but I'm not sure if that's going to be
to better or worse-- Now the problem (as you say ) is that the file
could be requested by the HTTP server while it is in a non-existent
state. I'm thinking (but not 100% sure) we are better off with the
server just getting an older (not yet updated & replace) playlist file
than a newer one.
More information about the vlc-devel
mailing list