[Live-devel] Multi-threading

Josep Aguilera jaguilera at a5security.com
Fri Dec 11 04:49:08 PST 2009


Hi Ross,

Following the FAQ list where is explained that the library assumes only a
thread of execution we created a
class where the UsageEnvironment variable as well as MediaSession,
MediaSubsession are defined. 
Each camera creates an instance of the class and launch a thread passing the
parameters of the class instance.

Therefore as you say in the FAQ, if each thread has its own UsageEnvironment
and event loop, it is possible to access simultaneously 
different threads to the library.

However still when we are trying to close the event loop (doEventLoop) and
we have more than one camera (with one works fine) the
library crash. See the crash code below.


memmove(unsigned char * 0x00000000, unsigned char * 0x07e6db04, unsigned
long 1460) line 171
GRABADORA5! BufferedPacket::use(unsigned char *,unsigned int,unsigned int
&,unsigned int &,unsigned short &,unsigned int &,struct timeval &,unsigned
int &,unsigned int &) + 110 bytes
GRABADORA5! MultiFramedRTPSource::doGetNextFrame1(void) + 232 bytes
GRABADORA5! MultiFramedRTPSource::networkReadHandler(class
MultiFramedRTPSource *,int) + 577 bytes
GRABADORA5! BasicTaskScheduler::SingleStep(unsigned int) + 441 bytes
GRABADORA5! BasicTaskScheduler0::doEventLoop(char *) + 26 bytes
CRTSPCamera::ThreadFunc(void * 0x07e53840) line 376 + 39 bytes
GRABADORA5! const DelayQueue::`vftable' address 0x0069ed28
GRABADORA5! BasicTaskScheduler0::~BasicTaskScheduler0(void) + 47 bytes


Thank you in advance.

Josep Aguilera.

-----Mensaje original-----
De: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] En nombre de Ross Finlayson
Enviado el: jueves, 10 de diciembre de 2009 18:14
Para: LIVE555 Streaming Media - development & use
Asunto: Re: [Live-devel] Crash on TaskScheduler DoEventLoop

>We implemented a code to obtain raw data from cameras IP via RTSP 
>using Live 555.
>In order to obtain it, we create a class which each time a new 
>camera it is connected
>a new thread of the class is started.

Have you read the FAQ entry about threads?
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list