[FFmpeg-devel] Eliminating long
Jay L. T. Cornwall
jay
Mon Mar 31 00:09:27 CEST 2008
Hi,
The C 'long' type, used in the interoperable structure ByteIOContext
from avio.h, is causing problems with the Tao.FFmpeg C# wrapper library.
unsigned long checksum
unsigned long (*update_checksum)(unsigned long checksum, const
uint8_t *buf, unsigned int size);
Most structures can be marshalled from C# to C and back again with ease.
However C# fixes sizeof(long) to be 8 bytes on all platforms. In C it
varies with platform and compiler:
GCC 32-bit: 4 bytes
GCC 64-bit: 8 bytes
VC 32-bit: 4 bytes
VC 64-bit: 4 bytes
There is no reliable way to marshall this type into a managed structure
on all platforms. Could I request that the type be made explicit in
ByteIOContext, as 'unsigned int' or 'uint32_t'.
Thanks,
--
Jay L. T. Cornwall
http://www.jcornwall.me.uk/
More information about the ffmpeg-devel
mailing list