Hi Ross,
I am facing a typical problem where the streaming stops after some time if the
encoded frame buffer size is more. If I keep the buffer size less
(ActualSize/8), streaming goes normal.
I had implemented my own H264Source subclass of FramedSource (to read frames at
30fps from USB camera and encodes using VPU encoder).
I am triggering the streaming thread at every 20ms and using
testProgs/testRTSPClient for testing the reception of streams.
below is the code:
void H264Source::deliverFrame() {
if (!isCurrentlyAwaitingData()) return;
u32 EncFrameSize = 0;
u32& newFrameSize = EncFrameSize;
static int k = 0;
printf("Reading Frames: k = %d\r\n", k++);
/* Get the frames from the camera */
CameraDevice::getInstance()->GetFrame(m_pu8RawFrameBuff, m_u16RawBuffLen);
/* encode the frames with hardware encoder */
m_pEncoder->EncodeFrameBuff(m_pu8RawFrameBuff, m_u16RawBuffLen,
m_pu8EncFrameBuff, newFrameSize);
// After encoding newFrameSize can be maximum of 640 * 480 = 307200 */
if (newFrameSize > fMaxSize) {
fFrameSize = fMaxSize;
fNumTruncatedBytes = newFrameSize - fMaxSize;
} else {
fFrameSize = newFrameSize;
}
gettimeofday(&fPresentationTime, NULL);
memmove(fTo, m_pu8EncFrameBuff, fFrameSize);
FramedSource::afterGetting(this);
m_bProcessingDone = true;
}
Is the problem with newFrameSize being too large or any other reason?
Is my way to getting the frames and processing is correct or Any other better
way to accomplish this? What is the maximum size of frames that is supported ?
I need to pass complete frames only for compatibility with the receiver
application.
Thanks in advance.
Ashfaque_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel