[MPlayer-dev-eng] Re: [PATCH] Saved AVI index files with -saveidx and -idxfile

Alban Bedel albeu at free.fr
Mon Oct 13 10:08:34 CEST 2003


Hi D Richard Felker III,

on Fri, 10 Oct 2003 16:00:15 -0400 you wrote:

> On Fri, Oct 10, 2003 at 05:20:57PM +0200, Alban Bedel wrote:
> > BTW this patch give an idea. Having mencoder write this separate
> > index file regulary and mplayer re-read it everytime it change.
> > With that it should be possible to seek in a "beeing recorded
> > avi" :)
> > Ok, it's hackish ;) But that's a lot easier that writing proper
> > muxer, and optionaly demuxer, for a format that would support
> > seeking without index.
> 
> IMO this is silly and unnecessary. Here's a better implementation:
How nice adjectives !!! imHo you should first learn to calm down.
This kind of comments add nothing to the post (beside perhaps
raising your ego) and just piss off ppl when it's start to be really
recurent.

> When mencoder starts, seek to slightly before 4GB into the output file
> and write a plenty space for an index (all zeros). 
Now if you just had calmed down you would have noticed a big flaw here.
The whole idea of having a separate idx file was in the beginning for
avi files bigger than 4GB !!!!!
Anyway wherever you put the index, may it be 200GB the file may grow up
to this size.

> Then mmap this
> region of the file.
So let's limit this only to system wich have mmap !!!! Seriously i have
nothing against using mmap if avaible. But for such task it make no
sence to limit it to system wich have mmap.

> Then just keep writing an updated index to the
> mapped memory as you go. When mencoder exits, truncate the file at the
> proper length and put a real index there, fixing the index offset in
> the avi header. All decent filesystems have sparse file support, so
> this won't use up any extra space on them. Of course the feature
> should be optional (and disabled by default) for the few fools who
> insist on dual-booting and using fat32/ntfs/whatever junk. :)
And to those who have this other feature !! Let's be even more elitist !!

Also what happend if mencoder just crash ? Having a 4GB file wrote
to disk would really suck !!!!

imho your solution is only a small optimization of what i proposed.
So i don't really think that you proposal have any real advantages
compared to the portability drawbacks it imply.

So what again was "silly and unnecessary" ?
	Albeu
-- 

Everything is controlled by a small evil group
to which, unfortunately, no one we know belongs.




More information about the MPlayer-dev-eng mailing list