[Live-devel] Source, Frames and Parsers

Michael Braitmaier braitmaier at hlrs.de
Mon Aug 17 05:58:04 PDT 2009


Thanks for your reply. In fact I have discrete frames arriving one by 
one in the deliverFrame method, so I will check with the sufficient 
buffer size of the DeviceSource to avoid truncating of frames.

Michael

Ross Finlayson schrieb:
>> However I am still unclear on how stream parsers fit into this and 
>> for what purpose?
>
> Assuming that your data input class (derived from the "DeviceSource" 
> code) delivers discrete audio or video frames (i.e., one frame at a 
> time), then you won't need a 'stream parser' at all. (As the name 
> suggests, a 'stream parser' is used only for parsing byte streams.)
>
>
>> Furthermore if I implement my deliverFrame function for the 
>> DeviceSource and my received frame exceeds the fMaxSize, I would 
>> truncate the frame and set fNumTruncatedBytes accordingly,
>> however when would I pass on the remaining bytes of the frame?
>
> No, if data gets truncated like this, then the rest of the data never 
> gets delivered. Therefore, you should try to make sure that data 
> doesn't get truncated - by giving the sink object a sufficiently large 
> buffer to begin with,



More information about the live-devel mailing list