> 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);
The "this" in the "triggerEvent()" call is wrong, because you should not be calling "triggerEvent()" from within one of your 'DeviceSource' class's member functions. "triggerEvent()" should be called from a *separate thread* - the thread that is doing your encoding. Because this separate thread is not the LIVE555 thread, then "triggerEvent()" is the *only* LIVE555 code that it is allowed to be calling. > void MyStreamingDeviceSource::deliverFrame0(void* clientData) > { > ((MyStreamingDeviceSource*)clientData)->doGetNextFrame(); > } No, don't do this. "deliverFrame0()" should call "deliverFrame()", as illustrated in the "DeviceSource" code. > But doGe[Next]tFrame is called when I called videoSink->startPlaying() too > which is not valid for me as I dont have any data yet to stream. That's OK. When data later *does* become available, then your separate 'encoder' thread will call "triggerEvent()", and then "deliverFrame()" will be called. Ross Finlayson Live Networks, Inc. http://www.live555.com/
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel