[Live-devel] full processor utilisation

Ross Finlayson finlayson at live.com
Mon Oct 4 17:35:45 PDT 2004


>I tried to broadcast video in multiple canals by using
>a Multithreading application (Visual C++,live
>2004-09-24),  each thread use the same code of
>testMPEG1or2VideoStreamer,  but this solution use 100%
>of processor, but no problem when I tried to broadcast
>the same video with the same number of threads with an
>old live (year 2003) (5% - 20% of processor),
>Did you face this problem before and how to solve it?

Have you read <http://www.live.com/liveMedia/faq.html#threads>??  You can 
access the "LIVE.COM Streaming Media" libraries from multiple threads *only 
if* each thread uses its own "UsageEnvironment" and "TaskScheduler" 
objects, and thus its own event loop (i.e., its own call to "doEventLoop()").

I have just added the following paragraph to the FAQ:

However, when using the "LIVE.COM Streaming Media" code, you should be 
familiar with event-driven programming, and understand that an event-driven 
application can perform at least as well as one that uses threads (unless 
you're actually running on a multiprocessor, in which case it's usually 
simpler to have your application consist of multiple processes (not just 
threads) - one running on each processor).  Note, in particular, that you 
*do not* need multiple threads in order to transmit (or receive) multiple 
streams concurrently.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list