<FONT size=2>
<P>Hi ross,</P>
<P>What do you think about to change something in the MP3StreamState class to allow MP3StreamState::readFromStream(unsigned char* buf, unsigned numChars) to read from another source than a file.</P>
<P>It will give the choice to read from file, or from any kind of buffer. </P>
<P>I have changed MP3StreamState::readFromStream() access type from private to protected, so i could have created a generic MP3streamState able to handle file input type and some other extra inputs types. May be it will be better to virtualize MP3StreamState::readFromStream(), i don't know.</P>
<P> </P>
<P>If you decide to add this little change to the next release then there will be an another interesting (to my mind) modification to do. I explain:</P>
<P>For now, the MP3FileSource class use an MP3streamState object to read from stream , but it will be interesting to create a generic MP3Source which would use the generic MP3StreamState class instead MP3streamState class. For now the MP3streamState used by theMP3FileSource is instanced in the constructor:</P>
<P>MP3FileSource::MP3FileSource(UsageEnvironment& env, FILE* fid)</P>
<P>: FramedFileSource(env, fid),</P>
<P>fStreamState(new MP3StreamState(env)) { }</P>
<P>So i'm not able to use the generic StreamState class instead of the MP3StreamState one without adding change to the MP3FileSource class.</P>
<P>Can we add a public method</P>
<P>MP3FileSource::assignStreamState(GenericMP3StreamState *streamState) Or modify the MP3FileSource::CreateNew() method to take the desired streamState in input parameter.</P>
<P> </P>
<P>Adding those kind of modification would allow peoples to reuse MP3FileSource class and MP3StreamState class to read from another source type without having to modify those class.</P></FONT>
<DIV style="FONT-SIZE: 12px; FONT-FAMILY: verdana, arial">
<DIV></DIV></DIV><DIV style='{font-family:verdana, arial;font-size: 10px}'>
<DIV><br></DIV>
<DIV><br></DIV>
<DIV><EM>Accédez au courrier électronique de La Poste : www.laposte.net ;</EM></DIV>
<DIV><EM>3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)</EM></DIV>
</DIV>