Dear all,
I guess this is a basic question with an easy answer but I am a
beginner and I would much apreciate your feedbacks.
Let's say I have a library with some functionality to perform some
image processing on jpeg images.
One of functions in the library is similar to this:
myfunction_effect (&out_instance, &mysettings, I8 *buf_in, I32
size_in_buffer, I32 *progress_status);
where I8 is char data type (1 byte), I32 is int data type (4 bytes),
buf_in is the JPEG image buffer and size_in_buffer is the size of the
JPEG buffer.
Then I want to use this function in some other source code, let's call
it mycode, but mycode uses something like this
typedef struct
{ u16 *jpegImage;
u32 jpegLength;
} MY_JPEG_STRUCT;
Where u16 is unsigned short (2 bytes) and u32 is unsigned int
The problem is that the data types for the JPEG buffer pointer are
different from myfunctions_effect() and mycode where this library will
be used. Also, I cannot change the definition for MY_JPEG_STRUCT in
mycode.
Do you have any suggestion on what is the easiest way to solve this
problem? (either at the library side (provided I have access to the
library sources) or in mycode?
I hope I have explained clearly enough.
I would really apreciate your help.
Thank you in advance.
Regards,
R.