Hi,

Am Samstag, 24. November 2007 10:31 schrieb Michael Riepe:
> Hi!
>
> Ralph Glasstetter wrote:
> > Anyhow,...  the bookmarks are now stored in additional *.add-files (in
> > seconds NOT and not byte positions as before), which are read out if
> > present with the same basename and location as the input TS. If someone
> > ever wants to implement bookmark support for another receiver type which
> > uses such a file, one could move the reading of the file to a separate
> > function...
>
> I think we should do so in the first place.
OK, than I'll move the filling of a given file to a buffer in memory
to a separate method... 

hmm,... member of which class? Still mpgfile/tsfile or better a differnet one 
since it's just kind of a general purpose utility function which has nothing 
to do with kind of read data...  and can I access it if it's a member of for 
instance dvbcut

>
> > PS: I had to change buffer::open() to store the file name in
> > the "files"-structure, to have acces to it in tsfile()... if you know a
> > better solution let me now... ;-)
>
> It would be better not to mess with the inbuffer class - that's always a
> little dangerous because you can easily break something.
>
> Maybe it's better not to use inbuffer in this case. It's meant solely
> for accessing MPEG files. Project files, for instance, aren't opened
> with an inbuffer either....

Noooo,... you misunderstood me... I didn't touched or used the inbuffer
for reading of that file, I just needed the name of the first mpeg-file
in class tsfile!!! 

But the only thing which was present/known in the tsfile constructor was the 
inbuffer "buf" with its methods... so I wrote a method 

inbuffer::getfilename(int filenum) {
  return files.at(filenum).name;
}

and just added the name to the files structure in inbuffer::open()!

Independent from that special purpose, I think it's anyhow usefull
to have the name there and not only the file descriptors and offsets...

>... And you should store the filename (or maybe
> only the prefix) inside the tsfile (or its parent, mpgfile) class where
> it is needed.
OK, ... one could have a tsfile:getfilenameprefix() method,..
but can I set the name from within dvbcut.cpp before the tsfile constructor is 
called??? I've no idea... I think it's easier to store the filename in the 
inbuffer class!

ciao
Ralph

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DVBCUT-user mailing list
DVBCUT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to