From: Stephan <quinte17@gm...> - 2005-11-28 07:53:56
> -----Original Message-----
> From: Mikael Bouillot [mailto:zjrdinhx@...]
> Sent: Saturday, November 26, 2005 6:26 PM
> To: Stephan
> Subject: Re: [fuse-devel] how to handle unknown file sizes
> > > Note that you could modularize your filesystem by keeping the
> > >FLAC->PCM and PCM->ogg parts as separate as possible. It would ease
> > >extension of you concept (e.g. FLAC->mp3 could be easily built from
> > >PCM->mp3).
> > i had the same idea. have one function which gets the data from
> the source
> > dir and then have a function which encode the data into the
> proper format.
> > so theoretically an any to any conversation could be done
> I was more thinking along the line of a *filesystem* which does
> FLAC->PCM and another one for PCM->ogg. Those two filesystems could then
> be combined to form a third one for FLAC->Ogg. I'm working on a FUSE
> project which does exactly that: combine filesystems in a modular
> fashion. You could also get the same result by mounting the two
> filesystems on top of each other.
i never thought in this direction. this idea is really good, but this can
also cause some mess. imagine you have flac->pcm and pcm->ogg, if someone
want to do a seek on the ogg output then a massive wait could occur.
> > > Just read the entire "file" once and store the resulting size
> > >somewhere, along with file modification time. It will be slow, but
> > >only the first time, and it doesn't need much storage space.
> > i dont think this is good. imagine you have 1000 flac files,
> which have to
> > be encoded in the first place? this needs a lot of time and cpu-power.
> > wouldnt it be better to store the size of a stream after this file was
> > encoded through a read? then you only have the problem that you
> dont know
> > the filesize for the first encode, but for the 2. this could be
> stored in a
> > database like mysql.. 1 table, 2 fields (kind of a fast md5sum, size)
> That's exactly what I meant :-)
> > i dont know if i ever get some working code, i have to figure
> some things
> > out before:
> > how to use the flac-lib, how to use the ogg-lib, and finaly how
> to get these
> > things together and hope the filesystem mapping is correct.
> At that point, you have two options: either you hack your way through,
> or you try to think the whole thing out beforehand in a nice, reusable
> and modular way. The first option will imply a lot of work but will
> probably get you a result in the end. The second might not, but it's
> also much more interesting.
i think i'm going to think most things through first :D and then i try to
get some working code, flac->pcm only... and then pcm->ogg...
thank you very much for your ideas