Note that the error about "atempting to read more than once" occurs if you call "getNextFrame()" on the *same* object a second time, before the 'after getting' function from the first call has been invoked. I.e., it's OK to do:

        source->getNextFrame(..., afterGettingFunc, ...);

        void afterGettingFunc(...) {
                source->getNextFrame(...);
        }

but you *cannot* do:

        source->getNextFrame(..., afterGettingFunc, ...);
        source->getNextFrame(...);
Hmm, I can't get it working:

The structure is:

void Transcoder::doGetNextFrame()
{
fInputSource->getNextFrame(inbuf, INBUF_SIZE, afterGettingFrame, this, handleClosure, this);
}

void Transcoder::afterGettingFrame(void* clientData, unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
{
   Transcoder* transcoder = (Transcoder*)clientData;
transcoder->afterGettingFrame1(numBytesRead, numTruncatedBytes, presentationTime, durationInMicroseconds);
}

void Transcoder::afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
{
   ...
   if(complete)
   {
      afterGetting(this);
   }
   else
   {
fInputSource->getNextFrame(inbuf, INBUF_SIZE, afterGettingFrame, this, handleClosure, this);
   }
}

This results in the "attempting to read more than once" error. I need the afterGettingFrame1 function to get new data like in dogetNextFrame() until complete != 0. How can I do that, i.e. how does the call to getNextFrame() have to look?

Thanks for your support!

Julian

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to