[Live-devel] DeviceSource question

Ishwar.Jasuja at jci.com Ishwar.Jasuja at jci.com
Fri May 23 12:42:49 PDT 2008


Hi,

I am trying to use DeviceSource Model (as recommended by Ross )to stream 
the live video out. 
Unfortunately, the video encoder can not be treated as a socket in the 
system that I have. I HAVE to run encoder as
a separate thread. So only option that I have, is to register  a callback 
function from doGetNextFrame() in DeviceSource.cpp.
At least, this is what I concluded after going thru the archive on this 
mailing list.

 registerCallback((TaskFuncOur *)DeviceSource::deliverFrame, (void *)this) 
;

Video encoder thread invokes this function when the encoded data is 
available. Now per recommended method, this should copy the
data received from encoder device into fTo aread and then start a timer to 
invoke FramedSource::afterGetting  by doing

  nextTask() = envir().taskScheduler().scheduleDelayedTask(0, 
(TaskFunc*)FramedSource::afterGetting, this);

Here is the problem that I think I have,

I cant call schedueDelayedTask function/method from a different thread. I 
can run into concurrancy issues as DelayQueue::addEntry(), 
 & DelayQueue::handleAlarm() methods can step onto eachother as they can 
now be invoked from different threads.

Can anyone help me out here? 
or Am I totally missing something here?

Thanks
Ishwar Jasuja

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


More information about the live-devel mailing list