[Live-devel] ByteStreamFileSource afterGetting function problem
Engin Kurutepe
kurutepe at nue.tu-berlin.de
Mon Jan 15 07:28:15 PST 2007
Hello all,
I am working to make my H264RTPStreamFramer use asynchronous read
operations. Here is a snippet of code that i'm using:
void H264RTPStreamFramer::doGetNextFrame()
{
if ( ! isCurrentlyAwaitingData() ) return;
char first_byte = packetBuffer[0];
* fInputSource->getNextFrame(packetBuffer, 20,
afterGettingHeader,
this,
handleClosure,
this);
}
void H264RTPStreamFramer::afterGettingHeader(void* clientdata,
unsigned frameSize, unsigned numTruncatedBytes,
struct timeval presentationTime,
unsigned durationInMicroseconds )
{
* H264RTPStreamFramer *framer = (H264RTPStreamFramer*)clientdata;
if(framer == NULL)
return;
framer->afterGettingHeader1();
}
fInputSource is a ByteStreamFileSource. There are two breakpoints at the
lines marked with *. FramedSource::afterGetting(this) is called inside
afterGettingHeader1(), which also does some parsing on the header. The
Problem is that the second breakpoint is never reached. And the program
quits with the following error message:
BasicTaskScheduler::SingleStep(): select() fails: No error
Does that mean that fInputSource never finishes reading the 20 bytes
from the byte stream?
Thanks a lot,
Engin
More information about the live-devel
mailing list