dmFXGetDMBuffer(3dm) dmFXGetDMBuffer(3dm)
dmFXGetDataPtr, dmFXGetRowLength - return a pointer to the pixels stored
in a DMfxbuffer
#include <dmedia/fx_buffer.h>
void* dmFXGetDataPtr
( DMfxbuffer* fxbuffer )
int dmFXGetRowLength
( DMfxbuffer* fxbuffer )
fxbuffer A buffer that was created with dmFXAllocateImageBuffers.
These functions are used to access the pixels stored in a DMfxbuffer.
Before calling them, you must first set up the buffer. To read pixels
from the buffer, call dmFXSetupInputImageBufferWithUsage, and specify
bufInputDirect. To write pixels into a buffer, call
dmFXSetupOutputImageBuffer and specify bufOutputDirect.
After the buffer has been set up for input or output access,
dmFXGetDataPtr will return a pointer to the first pixel in the buffer,
the one at the upper-left corner of the image.
When DMfxbuffers are allocated, they may be bigger than necessary to hold
the requested images. dmFXGetRowLength will return the number of pixels
to skip to get from the beginning of one row to the beginning of the
next.
If the buffer has not been set up correctly for direct access,
dmFXGetDataPtr will return NULL and dmFXGetRowLength will return 0.
Under normal circumstances, dmFXGetRowLength will return the width of the
buffer, as requested when it was created. Applications that use
DMfxbuffers can count on this. It can be useful, when debugging plugins,
to create buffers that have a larger internal width. If you are using
the debug version of libfxplugutils, setting the environment variable
FX_STRANGE_ROWBYTES to YES will cause it to create buffers where the
width of the storage area is greater than is needed.
Page 1
dmFXGetDMBuffer(3dm) dmFXGetDMBuffer(3dm)
dmFXAllocateImageBuffers(3dm), dmFXSetupInputImageBuffer(3dm),
dmFXSetupOutputImageBuffer(3dm), DMbuffer(4).
PPPPaaaaggggeeee 2222 [ Back ]
|