prothan
Posts: 4
Joined: Sun Jan 03, 2016 8:02 am

Get MMAL_PARAMETER_CAMERA_BURST_CAPTURE value

Sun Nov 06, 2016 5:58 am

In raspistill.c there is a line to set burstmode on the camera, shown below. I wanted to confirm that this setting was actually being set, so I checked to make sure that the return from the function was successful, which it was.

if (state.burstCaptureMode && frame==1)
{
mmal_port_parameter_set_boolean(state.camera_component->control, MMAL_PARAMETER_CAMERA_BURST_CAPTURE, 1);
}

However, I still would like a way to "get" the value. I have tried the two ways shown below, but both failed. Is it possible to get the current value of the MMAL_PARAMETER_CAMERA_BURST_CAPTURE setting?

--
MMAL_STATUS_T status
MMAL_BOOL_T x=0;
status = mmal_port_parameter_get_boolean(state.camera_component->control, MMAL_PARAMETER_CAMERA_BURST_CAPTURE, &x);
if(status != MMAL_SUCCESS) fprintf(stderr, "FAIL"); else fprintf(stderr, "SUCCESS"); -->this will FAIL, error is invalid parameter
if(x=0) fprintf(stderr, "FAIL"); else fprintf(stderr, "SUCCESS");--->this will FAIL
--
MMAL_STATUS_T status
MMAL_PARAMETER_BOOLEAN_T param;
param.hdr.id = MMAL_PARAMETER_CAMERA_BURST_CAPTURE;
param.hdr.size = sizeof(param);
status = mmal_port_parameter_get(state.camera_component->control, &param.hdr);
if(status != MMAL_SUCCESS) fprintf(stderr, "FAIL"); else fprintf(stderr, "SUCCESS"); -->this will FAIL, error is invalid parameter
--

Return to “Camera board”