C# wrapper for array of three pointers
Posted
by fergs
on Stack Overflow
See other posts from Stack Overflow
or by fergs
Published on 2010-03-15T02:08:57Z
Indexed on
2010/03/15
4:19 UTC
Read the original article
Hit count: 319
I'm currently working on a C# wrapper to work with Dallmeier Common API light.
See previous posting: http://stackoverflow.com/questions/2430089/c-wrapper-and-callbacks
I've got pretty much everything 'wrapped' but I'm stuck on wrapping a callback which contains an array of three pointers & an array integers:
dlm_setYUVDataCllback
int(int SessionHandle, void (*callback) (long IPlayerID, unsigned char** yuvData,
int* pitch, int width, int height, int64_t ts, char* extData))
Function Set callback, to receive current YUV image.
Arguments SessionHandle: handle to current session.
Return PlayerID (see callback).
Callback - IPlayerId: id to the Player object
- yuvData: array of three pointers to Y, U and V part of image
The YUV format used is YUV420 planar (not packed).
char *y = yuvData[0];
char *u = yuvData[1];
char *v = yuvData[2];
- pitch: array of integers for pitches for Y, U and V part of image
- width: intrinsic width of image.
- height
- ts : timestamp of current frame
- extData: additional data to frame
How do I go about wrapping this in c#?
Any help is much appreciated.
© Stack Overflow or respective owner