[Live-devel] multiple instances of live555 library
Jerry Johns
Jerry.Johns at nuvation.com
Mon Aug 24 15:08:36 PDT 2009
The LiveMedia library uses the magical world of select(), which allows
for monitoring multiple file handle descriptors (or in this case,
sockets) to monitor for incoming/outgoing data.
By blocking on this select() call, an event loop can process multiple
socket handles in a single execution context, effectively giving the
impression of multi-threaded behaviour.
LiveMedia has a scheduler that you registers a function callback with a
specific socket handle. A basic pseudo code would be:
loop:
{
select(descriptor set) --> Blocking call
for each SET file handle in descriptor set
look up corresponding function handler.
Invoke handler
end for
}
Jerry Johns
Design Engineer
Nuvation Research Corp - Canada
Tel: (519) 746-2304 ext. 221
www.nuvation.com <http://www.nuvation.com/>
________________________________
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Stas Oskin
Sent: Monday, August 24, 2009 3:14 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] multiple instances of live555 library
Hi Ross.
You don't do this. Please everybody, read the FAQ!
The "LIVE555 Streaming Media" software uses an event loop (a
single thread of control) for concurrency, instead of using multiple
threads.
Sorry for barging into this thread - an architecture question if I may.
I expirirmented with Live555 several times, and got left with a question
- if Live555 supports only a single event-loop, how it's possible to
effectively process multiple real-time sources?
I mean, if I get packets from 2 sources, there seems no way to process
them both, but only to launch a separate thread (via callback function
perhaps) which would handle them.
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090824/0b98fb05/attachment-0001.html>
More information about the live-devel
mailing list