Closed techyian closed 4 years ago
This again is due to the way .NET Core handles marshalling arrays using "ByValArray". The array being passed must equal the size specified in the "SizeConst" field or otherwise you'll receive an exception. Mono does not have this restriction and is quite happy to pass an array of lower size if asked.
I have also noticed using the value 256 "SizeConst" causes the MMAL_PARAMETER_CAMERA_ANNOTATE_V4_T
/MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T
structures to become too large, and MMAL throws a native exception:
mmal: mmal_vc_port_parameter_set: parameter too large (579 > 392)
As a result, I am lowering the SizeConst to 128 chars which brings the structure size down to 324 bytes and MMAL seems happy with that.