[Live-devel] doGetNextFrame()
Julian Lamberty
julian.lamberty at mytum.de
Sat Jun 9 02:33:49 PDT 2007
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.live555.com/pipermail/live-devel/attachments/20070609/1419c087/attachment.bin
More information about the live-devel
mailing list