[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE

Ross Finlayson finlayson at live555.com
Thu Jun 25 17:27:58 CEST 2015

>> The best way to use the LIVE555 library is to have *exactly one* thread that calls LIVE555 functions.
> How do you do 2 RTSP inputs?

Within the event loop.

Each RTSP source would have its own “RTSPClient” object.  You can create an arbitrary number of such objects (one for each RTSP source), and call the LIVE555 “RTSPClient” functions that send the “DESCRIBE”, “SETUP”, “PLAY” etc. RTSP commands on each one.  Note that these functions do not block.  Instead, you specify an (optional) ‘response handler function’ that will get called - from the event loop - after each RTSP response arrives.

In this ‘event-based’ application model, it is the event loop - rather than multiple threads - that gives you concurrency.  (Admittedly, this can be hard for some people to wrap their heads around, if they’re not familiar with event-based programming.)

If anyone's interested, note the code for our “testRTSPClient” demo application (included in the LIVE555 distribution), in which you can specify (on the command line) an arbitrary number (>=1) of “rtsp://“ URLs that you want to stream from.  This uses a single thread, with a single event loop (i.e., “doEventLoop()” call).

Ross Finlayson
Live Networks, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150625/4f859ce3/attachment.html>

More information about the vlc-devel mailing list