<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I am trying to use DeviceSource Model
(as recommended by Ross )to stream the live video out. </font>
<br><font size=2 face="sans-serif">Unfortunately, the video encoder can
not be treated as a socket in the system that I have. I HAVE to run encoder
as</font>
<br><font size=2 face="sans-serif">a separate thread. So only option that
I have, is to register a callback function from doGetNextFrame()
in DeviceSource.cpp.</font>
<br><font size=2 face="sans-serif">At least, this is what I concluded after
going thru the archive on this mailing list.</font>
<br>
<br><font size=2 face="sans-serif"><b><i> registerCallback((TaskFuncOur
*)DeviceSource::deliverFrame, (void *)this) ;</i></b></font>
<br>
<br><font size=2 face="sans-serif">Video encoder thread invokes this function
when the encoded data is available. Now per recommended method, this should
copy the</font>
<br><font size=2 face="sans-serif">data received from encoder device into
fTo aread and then start a timer to invoke <b>FramedSource::afterGetting
</b> by doing</font>
<br>
<br><font size=2 face="sans-serif"> <b><i> nextTask() = envir().taskScheduler().scheduleDelayedTask(0,
(TaskFunc*)FramedSource::afterGetting, this);</i></b></font>
<br>
<br><font size=2 face="sans-serif">Here is the problem that I think I have,</font>
<br>
<br><font size=2 face="sans-serif">I cant call schedueDelayedTask function/method
from a different thread. I can run into concurrancy issues as DelayQueue::addEntry(),
</font>
<br><font size=2 face="sans-serif"> & DelayQueue::handleAlarm()
methods can step onto eachother as they can now be invoked from different
threads.</font>
<br>
<br><font size=2 face="sans-serif">Can anyone help me out here? </font>
<br><font size=2 face="sans-serif">or Am I totally missing something here?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br><font size=2 face="sans-serif">Ishwar Jasuja</font>
<br>
<br>