[Live-devel] Take input from a live source instead of from a file

Ross Finlayson finlayson at live555.com
Mon Jun 2 21:58:51 PDT 2008


>But at the same time on transmiting a RTP packet,I need to capture a 
>frame into the buffers from the live souce(e.g,such like a 
>webcamera).Does it need mutithread programming?

No.  You can do this, within a single event loop, with a chain of 
three objects:

FrameCapture => Encoder => RTP_Sink
where:
	- "FrameCapture" is an instance of a new class (that you 
would write) that subclasses "FramedSource".  You should look at the 
"DeviceSource" code as a model for how you might do this.
	- "Encoder" is an instance of a new class (that you would 
write) that subclasses "FramedFilter".  It would compress each frame 
using your chosen codec.
	- "RTP_Sink" is an instance of the appropriate subclass of 
"RTPSink" (depending on the codec).

You would begin the streaming by calling
	RTP_Sink->startPlaying(Encoder, ...);
and then
	env->taskScheduler().doEventLoop();
to start the event loop.

-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20080602/1a07cc93/attachment.html>


More information about the live-devel mailing list