[Live-devel] Streaming from a device

Ross Finlayson finlayson at live555.com
Thu Sep 10 22:39:31 PDT 2009


>The card does not have a sockets interface.

OK, in this case I suggest using the "watchVariable" parameter to 
"doEventLoop()".  Have a separate thread that reads data from your 
interface, and then - when sufficient data is available for a frame - 
sets the "watchVariable" to some value non-zero.  (This should be 
this second thread's *only* interaction with the "LIVE555 Streaming 
Media" library.)

In your code, call "doEventLoop()" in a loop - e.g.,

char watchVariable;
while(1) {
	watchVariable = 0;
	scheduler->doEventLoop(&watchVariable);
	// If we get to this point, then we know that your separate 
thread has set "watchVariable" to a non-zero value
	// Call the appropriate function to handle the arrival of new 
data (e.g., "deliverFrame()")
};
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list