[Osalp-dev] aflibMpgFile
Status: Abandoned
                
                Brought to you by:
                
                    daservis
                    
                
            | 
      
      
      From: Darrick S. <da...@dc...> - 2001-01-03 19:42:14
      
     | 
| Happy New Year - I'm curious what plans there are for improving the aflibMpgFile module. I've been playing around with it and added the ability to seek to a sample within the Mpeg file. I also rewrote the open routine so you get the total_sample length. It works well but It's kind of goofy. It doesn't work well when you do a lot of seeks. Currently I'm taking advantage of mpg123 ability to skip frames and just reopening the pipe when the position changes from the last read. This is quite slow though. However, I got some mpeg file specs and was planning on opening the mpeg file with fopen and then opening a pipe to mpg123. Then seek to what frame I need in the mpeg file and running that through the pipe. Also regarding magic and AFLIB_AUTO_TYPE. I think magic works well. If a programmer wants to use a file type which can't be determined by magic then I'm sure they don't want to use be able to auto detect as there is usually other things which need to be done to handle the file. However, concerning all the aflibAudioType enums. I think as opposed to this the module file should generate the list of supported audio types. So rather then: static aflibFile * open( aflibFileType type_enum, const string& file, aflibConfig* cfg = NULL, aflibStatus* status = NULL); you'd have: static aflibFile * open( const string& audio_type, const string& file, aflibConfig* cfg = NULL, aflibStatus* status = NULL); And for writing you should be able to open the file based on extension. That way you could save files similiar to how the gimp saves files. Also the programmer won't have to worry about adding new types. -Darrick |