[Live-devel] Problems with RTSPClient, CSeq variable and SANYO network cameras ...

Jeremy Noring jnoring at logitech.com
Thu Apr 1 21:18:11 PDT 2010


On Thu, Apr 1, 2010 at 7:06 PM, Ross Finlayson <finlayson at live555.com>wrote:

> I've found out that when you run a few different instances of RTSP clients
>> in separate threads CSeq number is not increased by one with each
>> consecutive request.
>> It's because CSeq number is a static variable in RTSPClient.
>>
>
> This is a perfect illustration of why you are not supposed to run LIVE555
> library code in multiple threads.  (Have you read the FAQ entry about
> threads?  If not, then why not (because you were asked to read the FAQ
> before you subscribed/posted to the mailing list)?)
>
> Instead, you should be using a single event loop (in a single thread) -
> even to make multiple RTSP client requests.
>

I interpret what the OP is doing as this section in the FAQ:

"Another possible way to access the code from multiple threads is to have
each thread use its own "UsageEnvironment" and "TaskScheduler" objects, and
thus its own event loop. The objects created by each thread (i.e., using its
own "UsageEnvironment") must not interact (except via global variables)."

...if there's a dedicated thread for each RTSPClient, with its own
UsageEnvironment and TaskScheduler objects, is that a valid configuration of
the library?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100401/7605c51b/attachment.html>


More information about the live-devel mailing list