[Live-devel] Restart Capture Frame

Josep Aguilera jaguilera at a5security.com
Tue Dec 15 01:29:57 PST 2009


Dear Ross,

we are trying now change the treatment of the EventLoop because all our
problems is the multithreading using the schedule. We changed our code using
now only one thread to control that Eventloop.

We do this steps:

1.- Creation of the BasicUsageEnvironment with one schedule.

2.- Initialization of all threads using that Environment.

3.- Start the EventLoop.

4.- Our application processes.

5.- To destroy, we have the problems in that point, we start doing the next
code to destroy each thread (no EventLoop thread):

----------------------------------

        blockingValue = ~0; // Value to Stop the EventLoop 
        while() //Wait until the EventLoop is stopped

----------------------------------

        Medium::close(ourClient); // RTSPClient* ourClient
        g_pCaptureCtrl->m_bEnv->reclaim(); // UsageEnvironment* m_bEnv;
        StopCaptureFrame(); //Stop and destroy one thread

----------------------------------

6.- After that, we try to restart again all the threads (EventLoop thread
too) repeating point 1. Then the program crashes and we can look in the call
stack that information:

----------------------------------

memmove(unsigned char * 0x00000000, unsigned char * 0x02a74f74, 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
CCaptureCtrl::ThreadFunc(void * 0x0283de80) line 1922 + 34 bytes
GRABADORA5! const DelayQueue::`vftable' address 0x006a4fd8
GRABADORA5! BasicTaskScheduler0::~BasicTaskScheduler0(void) + 47 bytes
fffffcd8()

----------------------------------

The error is produced when we try to call the first time again the
EventLoop:

---------------------------

pCapCtrl->m_bEnv->taskScheduler().doEventLoop(&pCapCtrl->m_cBlockingValue/*0
*/);

---------------------------

Can do you help us to solve that?

Best Regards and Thank you in advance,

Josep Aguilera

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20091215/d0ca9dcf/attachment.html>


More information about the live-devel mailing list