[Live-devel] True push DeviceSource

ssingh at neurosoft.in ssingh at neurosoft.in
Mon Oct 21 16:48:57 PDT 2013


Hi,

I am confused as how the event mechanism works in live555. I have a 
source that is fed with video and audio frames and I want to trigger 
doGetNextFrame() of my custom DeviceSource so that those frames are 
streamed using live555. For this I am using


m_eventID = envir().taskScheduler().createEventTrigger(deliverFrame0);
envir().taskScheduler().triggerEvent(m_eventID, this);

and

void MyStreamingDeviceSource::deliverFrame0(void* clientData)
{
     ((MyStreamingDeviceSource*)clientData)->doGetNextFrame();
}

But doGetFrame is called when I called videoSink->startPlaying() too 
which is not valid for me as I dont have any data yet to stream. I dont 
know what shall i do in this scenario. I am also trying to use 
isCurrentlyAwaitingData() but I am not sure what this function does. I 
checked in source and its just checking one boolean variable.

Also if i return prematurely after checking that i dont have any data it 
gives internalError() until i call FrameSource::afterGetting() which 
again is not valid as i dont have any data and there is no point telling 
the sink to stream null data.

So are the DeviceSources acts as Pull source or push source in live555. 
I am interested in push source which i can derive depending upon the 
data i receieve from other modules.


Thanks,
Caduceus


More information about the live-devel mailing list