C#
[DllImport (“__Internal”)]
public static extern int createMP4([MarshalAs( UnmanagedType.LPStr )]string _filePath, int _imageCount);
C
int createMP4(char* _filePath, int _imageCount){
FILE f;
char fname = sprintf(_filePath, _filePath, 0);
if ((f = fopen(fname, “r”)))
{
fclose(f);
return 1;
}
return 0;
}
The problem is _filePath is always NULL and I have no idea what I am doing… well at least not in the C area.
In the end I want to use apples AVFoundation to create an MP4. Not even sure if this will work from C. But I first tried objectiveC and then felt like killing something. For the sake of everything living I switched to C. At least something is happening now.