[Live-devel] High CPU Usage in DummySink

support support at vidhvatthamah.com
Wed Nov 2 15:59:55 PDT 2016


Hi,

I'm using the version live.2016.10.21.
I have derived a class called MyRTSPClient which has the base class as
RTSPClient. I have derived a class called DummySink which has the base
class as MediaSink.

In the function MyRTSPClient::AfterDescribe1 I create a sink like this and
call startPlaying.

dummySink = DummySink ::createNew(*m_env,m_baseStream, 300000);
subsession->sink = mpgSink;
sendSetupCommand(*subsession, AfterSetup, false, false);
bool ret = subsession->sink->startPlaying(*(subsession->readSource()),
subsessionAfterPlaying,
subsession);

The frames are received at
void DummySink ::afterGettingFrame1(unsigned frameSize, struct timeval
presentationTime)
{
addData(fBuffer, frameSize, presentationTime);
this->
continuePlaying();
}

and continueplaying implementation looks like this.

Boolean DummySink ::continuePlaying()
{

if (fSource == NULL)
{
return False;
}

fSource->getNextFrame(fBuffer, fBufferSize,
afterGettingFrame, this,
onSourceClosure, this);

return True;
}

I dont understand why the CPU usage is high. Event if I comment addData in
afterGettingFrame1. the CPU usage is constantly in 30 percent.

Thanks
Support Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20161103/eb96dda3/attachment.html>


More information about the live-devel mailing list