[Live-devel] How to implement non-blocking fashion in custom doGetNextFrame()

Cristiano Belloni belloni at imavis.com
Tue Mar 4 03:09:42 PST 2008


Cristiano Belloni wrote:
> xcsmith at rockwellcollins.com wrote:
>   
>> 1. Are you inheriting from FramedSource, from DeviceSource, or 
>> modifying DeviceSource?
>>     
> Inheriting from FramedSource.
>   
>> 2. Is "isAwaitingData()" function an abbreviation for 
>> "isCurrentlyAwaitingData()", or are these separate functions?
>>     
> It's a separate function. Returns true if I have a new frame ready.
>   
>> 3. When you copy your data to fTo in deliverFrame(), are you using 
>> "memcpy()" or similar function to write the data?
>> 4. Does your "deliverFrame()" call "afterGetting()"?  You have to call 
>> "afterGetting()" so that the downstream filter / sink can begin 
>> handling your data. (Ross said this on the last thread post)
>>     
> memcpy.  And yes, it calls afterGetting()
>   
>> 5. Does your "afterGetting() function set fIsCurrentlyAwaitingData? If 
>> you don't set fIsCurrentlyAwaitingData to False, then as you see in 
>> FramedSource::getNextFrame(), the source->sink chain will quit. 
>> FramedSource.cpp line 64.
>>     
> Err.. I don't define any afterGetting
>   
>> Ross provided a general solution email earlier.  If you have more 
>> questions, I'd be interested in looking at what you've written.  I 
>> enjoy working with the filter code.  The source you've posted isn't 
>> enough for me to help more specifically.  Can you post all / more of 
>> your file or just send it to me?
>> ~xo
>>     
> Currently I'm experimenting modifying taskScheduler, and I'm rewriting 
> the code. A soon as I have some readable code, I'll gladly send it to you.
>
> Many thanks,
> Regards,
>
> Cristiano
>   
Just retrieved last version of the source from the repository. I'll mail 
it to you. Many thanks again,

Cristiano.

-- 
Belloni Cristiano
Imavis Srl.
www.imavis.com <http://www.imavis.com>
belloni at imavis.com <mailto://belloni@imavis.com>


More information about the live-devel mailing list