internal static void SetExposureMode(this MMALCameraComponent camera, MMAL_PARAM_EXPOSUREMODE_T mode)
        {
            MMALLog.Logger.Debug($"Setting exposure mode: {mode}");

            MMAL_PARAMETER_EXPOSUREMODE_T expMode = new MMAL_PARAMETER_EXPOSUREMODE_T(new MMAL_PARAMETER_HEADER_T(MMAL_PARAMETER_EXPOSURE_MODE, Marshal.SizeOf <MMAL_PARAMETER_EXPOSUREMODE_T>()),
                                                                                      mode);

            MMALCheck(MMALPort.mmal_port_parameter_set(camera.Control.Ptr, &expMode.hdr), "Unable to set exposure mode");
        }
        public static MMAL_PARAM_EXPOSUREMODE_T GetExposureMode(this MMALCameraComponent camera)
        {
            MMAL_PARAMETER_EXPOSUREMODE_T expMode = new MMAL_PARAMETER_EXPOSUREMODE_T(new MMAL_PARAMETER_HEADER_T(MMAL_PARAMETER_EXPOSURE_MODE, Marshal.SizeOf <MMAL_PARAMETER_EXPOSUREMODE_T>()),
                                                                                      new MMAL_PARAM_EXPOSUREMODE_T());

            MMALCheck(MMALPort.mmal_port_parameter_get(camera.Control.Ptr, &expMode.hdr), "Unable to get exposure mode");

            return(expMode.Value);
        }