[Live-devel] Latency increased for low fps source when multiple session created in same server for different source (Renish Tala)

Weber, Patrick Patrick.Weber at iecinfrared.com
Wed May 16 07:29:47 PDT 2018


I'm using the Live555 API for my RTSP server, and have not experienced this issue. I have several sources with varying frame rates between 8 and 30fps running on the same server. I'm triggering Live555 whenever a packet is available from the encoder, and have yet to experience the "not ready for the data yet" error. Here's my DeliverFrame method (CameraFrameSource is a FramedSource), which is called by both the trigger event and the overridden doGetNextFrame method (you DO have an overridden doGetNextFrame method, right?):

//====================================================================
// Deliver a frame from the RTSPSource object.
//====================================================================
void CameraFrameSource::DeliverFrame ()
{
	byte *frameData;
	unsigned frameSize;

	if (isCurrentlyAwaitingData ())
	{
		if (_encodedSource->GetFrame (&frameData, &frameSize, &_ulLastFrameSent))
		{
			if (frameSize > 0 && frameData != nullptr)
			{
				if (frameSize > fMaxSize)
				{
					fFrameSize = fMaxSize;
					fNumTruncatedBytes = frameSize - fMaxSize;
				}
				else
				{
					fFrameSize = frameSize;
					fNumTruncatedBytes = 0;
				}
				SetPresentationTime (_ulLastFrameSent);
				if (SafeMemCopy (fTo, frameData, frameSize))
					FramedSource::afterGetting (this);
			}
			_encodedSource->ReleaseFrame ();
			++_ulFramesDelivered;
		}
	}
}




More information about the live-devel mailing list