I have piece of C code:
#define AV_NUM_DATA_POINTERS 8
uint8_t *data[AV_NUM_DATA_POINTERS];
In the swift generated interface this looks like:
var data: (UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<UInt8>?)
There's a function that needs this data
variable. It's representation in C is as follows:
int sws_scale(..., const uint8_t *const srcSlice[], ...);
However swift produces the following signature:
func sws_scale(..., _ srcSlice: UnsafePointer<UnsafePointer<UInt8>?>!, ...) -> Int32
What's the best way to cast the huge tuple to a type that would work for the sws_scale
function?