> Continuing question 1, I see that deliverFrame() is called by two callers, 
> doGetNextFrame(), which is called by sink object, and deliverFrame0(), which 
> is called by event loop when signalNewFrameData() emits an event. In my case, 
> I left signalNewFrameData() never called, hence deliverFrame0() never called.

Yes, that was the wrong thing for you to do - because it means that if 
“doGetFrame()” happens to get called when no frame is immediately available to 
be delivered, then “doGetFrame()” will return immediately, but no delivery will 
ever get done.  (See “DeviceSource.cpp”, line 92.)

You are doing event-driven programming; you need to understand this.  If no 
frame is immediately able to be delivered, then you should not ‘block’, waiting 
for a frame to come available.  Instead, you must arrange for an event to get 
handled when a frame later becomes available.  One common way to do this is to 
have a separate thread for you encoder; this thread would call no LIVE555 
library function *except* “triggerEvent()”.

This is all explained very clearly in our FAQ, and in the comments in 
“DeviceSource.cpp”.  Therefore - to avoid bothering the hundreds of mailing 
list subscribers any more - this will be my (and your) last posting on this 
topic.


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

Reply via email to