Skip to content

Commit

Permalink
Raspicam: Add 3D controls to RaspistillYUV and RaspiVidYUV
Browse files Browse the repository at this point in the history
These two apps had missed the relevant calls to configure 3D
capture.

#579
  • Loading branch information
6by9 authored and popcornmix committed Oct 3, 2019
1 parent 5fbf5de commit 72bc33a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions host_applications/linux/apps/raspicam/RaspiStillYUV.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,16 @@ static MMAL_STATUS_T create_camera_component(RASPISTILLYUV_STATE *state)
goto error;
}

status = raspicamcontrol_set_stereo_mode(camera->output[0], &state->camera_parameters.stereo_mode);
status += raspicamcontrol_set_stereo_mode(camera->output[1], &state->camera_parameters.stereo_mode);
status += raspicamcontrol_set_stereo_mode(camera->output[2], &state->camera_parameters.stereo_mode);

if (status != MMAL_SUCCESS)
{
vcos_log_error("Could not set stereo mode : error %d", status);
goto error;
}

MMAL_PARAMETER_INT32_T camera_num =
{{MMAL_PARAMETER_CAMERA_NUM, sizeof(camera_num)}, state->common_settings.cameraNum};

Expand Down
10 changes: 10 additions & 0 deletions host_applications/linux/apps/raspicam/RaspiVidYUV.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,16 @@ static MMAL_STATUS_T create_camera_component(RASPIVIDYUV_STATE *state)
goto error;
}

status = raspicamcontrol_set_stereo_mode(camera->output[0], &state->camera_parameters.stereo_mode);
status += raspicamcontrol_set_stereo_mode(camera->output[1], &state->camera_parameters.stereo_mode);
status += raspicamcontrol_set_stereo_mode(camera->output[2], &state->camera_parameters.stereo_mode);

if (status != MMAL_SUCCESS)
{
vcos_log_error("Could not set stereo mode : error %d", status);
goto error;
}

MMAL_PARAMETER_INT32_T camera_num =
{{MMAL_PARAMETER_CAMERA_NUM, sizeof(camera_num)}, state->common_settings.cameraNum};

Expand Down

0 comments on commit 72bc33a

Please sign in to comment.