Hi,

Stefan Nobis <[EMAIL PROTECTED]> writes:

> I wrote a small app to display video picture that i get via H261
> protocol (-> openh323 library). Via the openh323 library i get a
> pointer (void*) to the image data (if i understand everything
> correct, the image data is in RGB-24 format -- with a line like
> "P6 <width> <height> 0x255" prepended to the buffer i get a valid
> PPM file).
> 
> Now i want to display this buffer with DirectFB in a window
> surface. I have not found an ImageProvider for PPM, so i tried a
> quick and ugly hack like this:

Is there a particular reason you are using an image provider for this?

It is probably much simpler to create a surface of the right size,
lock it, copy your data to the surface (line by line since you need to
respect the pitch) and unlock the surface. Alternatively you can also
create a surface around your image data. You don't even need to do the
copying then. That's what the DSDESC_PREALLOCATED flag is good for.


Sven


-- 
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-users" as subject.

Reply via email to