Hi,

I am working on D bindings for FFmpeg. I am trying to port the official examples of FFmpeg to D so that the bindings can be tested.

My question is how this function declaration is written in D.
int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
int w, int h, enum AVPixelFormat pix_fmt, int align);

My best guess is the following.
extern(C) int av_image_alloc(ref uint8_t[4] *pointers, ref int[4] linesizes, int w, int h, AVPixelFormat pix_fmt, int align_);

However, calling this would give nonsense value for the array passed as linesizes. I don't know how to look at the variable passed as pointers yet.

The whole source of the port is at https://gist.github.com/4466289, there you can also find the link to the original source.

Thanks,
Minh

Reply via email to